- Make Dyntastic.batch_get work with keys that are aliases on the model fields.
- Improve error messages when validating keys passed to
get
,safe_get
orbatch_get
- Minor fixes to
batch_get
type hints
- Add support for
__table_region__
and__table_host__
to be lazy callables - Default
__table_region__
and__table_host__
toDYNTASTIC_REGION
andDYNTASTIC_HOST
environment variables if not otherwise defined
- Fix import error when using
pydantic>=2.5
- Add support for python3.12
- Add support for pydantic v2
- Support KEYS_ONLY and INCLUDE DynamoDB indexes
- Make commit limit configurable on
transaction()
context manager
- Fix issue with query returning no results when using a filter with sparse matches
- Add support for transaction writes using
transaction()
context manager - No longer commit batch when an exception is raised during the batch context
manager
__exit__
- Add support for
scan_index_forward
for specifying ascending (True) or descending (False) traversal of the index.
- Add support for
__table_host__
for local testing
- Make mypy linting more strict
- Fixed
batch_read
to support non-string hash keys
- Add
py.typed
marker to indicate this library ships with type hints
- No changes since 0.7.0a1
- Change dependency version pinning to be more flexible
- Only require
importlib_metadata
for python3.7 and earlier
- Added support for
__table_name__
being aCallable[[], str]
to allow dynamic table name - Added support for batch reads and writes
- Fixed
consistent_read
behavior forsafe_get
(previously was always set toTrue
)
- Added support for multiple subclasses within one table (
get_model
function)
- Fixed serialization of dynamo types when using Pydantic aliases
- Fixed compatibility with Pydantic aliases
- Added support for nested attribute conditions and update expressions
- Fixed bug where
refresh()
would cause nested Pydantic models to be converted to dictionaries instead of loaded into their models - Added Pydantic aliases (models will all be dumped using pydantic's
by_alias=True
flag).
BREAKING: Accessing attributes after calling update(..., refresh=False)
will trigger a ValueError. Read below for more information.
- Added built in safety for unrefreshed instances after an update. Any
attribute accesses on an instance that was updated with
refresh=False
will raise a ValueError. This can be fixed by callingrefresh()
to get the most up-to-date data of the item, or by callingignore_unrefreshed()
to explicitly opt-in to using stale data.
- Initial release