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
Built Distribution
File details
Details for the file enchante-0.3.0.tar.gz
.
File metadata
- Download URL: enchante-0.3.0.tar.gz
- Upload date:
- Size: 7.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.12.2 Darwin/21.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7707a2b0401696cba7b0f41a466f119d5685f663773495b9abb18ee3dffa356c |
|
MD5 | f026f303fe3a53d167fd01662f377f05 |
|
BLAKE2b-256 | cc1899c858d32f1bf197ca3aab330560ab853f72f0666bedce27d4787c59abc3 |
File details
Details for the file enchante-0.3.0-py3-none-any.whl
.
File metadata
- Download URL: enchante-0.3.0-py3-none-any.whl
- Upload date:
- Size: 9.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.12.2 Darwin/21.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 49d2b41fd106f63eedfdf67df3422da007ac23b17d612cfadffa7fdb3a0e7476 |
|
MD5 | 761e270a9743e64747984139f1907020 |
|
BLAKE2b-256 | 6d458d3fca4462f48f42648e964a12b78ad517e6c9cb857e643da2e2bb968ed8 |