Skip to content

Commit

Permalink
feat!: use Pydantic 2 and move records to use computed_fields
Browse files Browse the repository at this point in the history
Pydantic 2 has breaking API changes, the most important for us is the
usage of compute_fields.

The accounting system expects datetime fields to be returned as integers
(i.e. epoch). We can use computed_fields for that, using properties.
This way we can internally store datetime objects, and just conver them
to integers when they are accessed. In order to do so, we define _epoch
properties.
  • Loading branch information
alvarolopez committed Sep 27, 2024
1 parent 248ffcd commit 2181e9c
Show file tree
Hide file tree
Showing 5 changed files with 404 additions and 286 deletions.
Loading

0 comments on commit 2181e9c

Please sign in to comment.