CLI tool to help scaffolding relational DB architecture as code
Project description
enchante
Simplify your DB management
Motivation
Imagine you're creating an API that connects to your SQL DB via SQLAlchemy. One of the biggest pain points is to create a structure that makes logical sense along with being easy to scale (as in add more tables easily).
Well, that's where enchante
comes in! Using the power of Pydantic, SQLAlchemy and Alembic, it'll be much easier to initialise and make changes to your database.
This CLI helps with creating and scaffolding the structure of your db architecture as python code.
Folder structure
db/
├─ migrations/
├─ [table_name]/
│ ├─ __init__.py
│ ├─ crud.py
│ ├─ model.py
│ ├─ schema.py
enchante.toml
Why not ...
?
Why not SQLModel instead of Pydantic + SQLALchemy?
SQLModel still has a long way to go with their current roadmap , but they're making good progress!How to use
- First run
enchante init <root_dir>
- Now you can run
enchante create <object_name>
Development
License: MIT
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
enchante-0.3.0.tar.gz
(7.6 kB
view hashes)