A Pydantic(+) model generator for Supabase
Project description
Supabase Pydantic Schemas
A project for generating Pydantic (& other) models from Supabase (& other) databases. Currently, this is ideal for integrating FastAPI with supabase-py as a primary use-case, but more updates are coming! This project is a inspired by the TS type generating capabilities of supabase cli. Its aim is to provide a similar experience for Python developers.
Installation
$ pip install supabase-pydantic # install
$ touch .env # create .env file
$ echo "DB_NAME=<your_db_name>" >> .env # add your postgres db name
$ echo "DB_USER=<your_db_user>" >> .env # add your postgres db user
$ echo "DB_PASS=<your_db_password>" >> .env # add your postgres db password
$ echo "DB_HOST=<your_db_host>" >> .env # add your postgres db host
$ echo "DB_PORT=<your_db_port>" >> .env # add your postgres db port
Usage
$ sb-pydantic gen models pydantic --local # generate pydantic models from local postgres db
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
supabase_pydantic-0.6.0.tar.gz
(22.4 kB
view hashes)
Built Distribution
Close
Hashes for supabase_pydantic-0.6.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 59cd6a98e1ed863c193407491935df4b09d0ce63ef99617844e7b273ab9ed91b |
|
MD5 | 37f098b8f0421e07dda3263fccb3ef4a |
|
BLAKE2b-256 | e7234c1628349e8410d61f251d928ee75f439d98ded956275b1f42188fd54398 |