Skip to main content

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

  1. First run enchante init <root_dir>
  2. 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)

Uploaded Source

Built Distribution

enchante-0.3.0-py3-none-any.whl (9.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page