Quick and easy persistence for Pydantic models supporting basic CRUD operations
Project description
Crudantic
A simple persistence library for Pydantic that uses Google Cloud Datastore (Firestore in Datastore mode) as its default backend.
Ideally suited for developers using Pydantic on GCP with cloud functions or other serverless infrastructure like CloudRun.
Because sometimes you don't need a relational database or fully featured ORM; you just need to stash and grab objects while preserving type safety in your code.
Status
This is an alpha-preview with a minimal featureset:
- CRUD operations on objects
- Support for nested objects/entities via embedding
- Simple listing of objects by entity kind
- Backend is Google Cloud Firestore in Datastore mode
Installation
pip install crudantic
Note: Intermittent issues with pypi.org registrations, the library is available from github via: pip install TBS
In the meantime, clone this repo and install from there.
Usage
See examples
Developing / Contributing
I'm happy to review pull requests for bug fixes and new functionality.
To develop on the library:
git clone git@github.com:dbb613/crudantic.git
cd crudantic
git checkout development
poetry install
poetry build
Missing/Future Features
- Advanced configuration
- Nested objects are always embedded in the parent entity.
- Additional nested object strategies are planned:
- Ancestor/descendant entity instances
- Related top-level entity instances
- Transactions
- Schema versioning
- Enfore validate on Create/Save
- Filtering/Querying
- Bulk data migration
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file crudantic-0.0.23.tar.gz.
File metadata
- Download URL: crudantic-0.0.23.tar.gz
- Upload date:
- Size: 4.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.6.1 CPython/3.11.5 Darwin/23.1.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9d61e95c79913a3a381aabc2e5d91eb2fcdbbf566f936c32204edd2cde980af4
|
|
| MD5 |
3957d9be92bae4c316d1db2f1984758e
|
|
| BLAKE2b-256 |
8881634de6ef5eed4de8b7c8b1b5a90b23e3f9afdb17a06bfc39bbe9d1017156
|
File details
Details for the file crudantic-0.0.23-py3-none-any.whl.
File metadata
- Download URL: crudantic-0.0.23-py3-none-any.whl
- Upload date:
- Size: 6.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.6.1 CPython/3.11.5 Darwin/23.1.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
09d98d00241ebc438a246b8d51e1d0fa32372f555ac521405af24be4be4b7996
|
|
| MD5 |
66c9a3f51fc81917868112d002fc9d01
|
|
| BLAKE2b-256 |
c08e8a1dd052256b3c5ff878804f180585c61cbadc5e450fc925a0415eccfe92
|