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
Hashes for crudantic-0.0.23-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 09d98d00241ebc438a246b8d51e1d0fa32372f555ac521405af24be4be4b7996 |
|
MD5 | 66c9a3f51fc81917868112d002fc9d01 |
|
BLAKE2b-256 | c08e8a1dd052256b3c5ff878804f180585c61cbadc5e450fc925a0415eccfe92 |