Skip to content

Releases: rickh94/ODetaM

v1.5.1

27 Jun 22:26
Compare
Choose a tag to compare

What's Changed

Full Changelog: v1.5.0...v1.5.1

v1.5.0 Change missing field behavior

14 Apr 17:54
Compare
Choose a tag to compare

No longer sets missing fields to None, rather allows pydantic to handle the default behavior.

v1.4.0 Add get_or_none and improve typing

24 Mar 21:38
Compare
Choose a tag to compare

This release adds a get_or_none method to get possibly null values without producing an error. It also adds lots of type hints to make development easier and more consistent.

v1.3.2 - Switch to builtin Deta async

08 Mar 19:59
Compare
Choose a tag to compare

The addition of async support in the official deta python sdk has allowed us to switch to that and remove a dependency. This was possible because of the work done here #7, thank you!

This also fixes bug #5 in #6, and another I found where the get methods could be passed None and wouldn't complain. This now raises since a primary key of None is obviously nonsense.

This also adds automated testing for python versions 3.10 and 3.11.

This release is also available on PyPi, which is obviously the best way to install.

Full Changelog: v1.2.0...v1.3.2

Add Async Support and integration tests

08 Sep 06:13
Compare
Choose a tag to compare

I've added async support! The api is basically the same, with a different import and async/await in your functions. It also requires aiodeta. Just pip install odetam aiodeta then from odetam.async_model import AsyncDetaModel.

Change Date/Datetime/Time serialization

04 Aug 16:02
Compare
Choose a tag to compare
  • Change datetime serialization behavior

    I have rewritten most of the serialization code to better handle datetimes.
    Unfornately, Deta does not have a built-in datetime type, so I hacked in some
    serialization that provides useful functionality. Previously, they were simply
    serialized to strings by pydantic's json serializer. Now dates, datetimes, and
    times are turned into numbers so that the usual number queries (as well as range)
    can be used. Previously, querying dates did not work at all.

    This change completely breaks compatibility with previous datetime fields.
    Data saved before 1.1.0 will create errors when serialized. Either pin to
    v1.0.5 (the latest version before this change) or update data. Models without
    date/datetime/time fields are not affected.

Update to Deta 1.0

04 Aug 12:56
Compare
Choose a tag to compare

The core Deta library has gone to v1.0 and introduced a few improvements
(breaking changes). The behavior of fetch and query is now more logical,
returning a FetchResponse object that handles the pagination elegantly
and has a .items that just contains the items returned. I've updated
to handle this behavior so this functionality works correctly.

Note: ODetaM is NOT handling the pagination yet, so Bases larger than
1000 records will break the get_all() method. This is also true if
a query returns more than 1000 results. For now I would recommend
writing more specific queries, but I hope to get this implemented at
some point.

I recommend updating to Deta v1.0 and ODetaM v1.0.5.