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.1.tar.gz (6.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

enchante-0.3.1-py3-none-any.whl (9.7 kB view details)

Uploaded Python 3

File details

Details for the file enchante-0.3.1.tar.gz.

File metadata

  • Download URL: enchante-0.3.1.tar.gz
  • Upload date:
  • Size: 6.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.13.9 Darwin/24.5.0

File hashes

Hashes for enchante-0.3.1.tar.gz
Algorithm Hash digest
SHA256 c1bfd15d83e828f4bea1fb94e7ab1a2d0d17d57d29de89e2b5e0e9aa0595377d
MD5 bf2fc6bf04f27a43c84a66868de7b2e7
BLAKE2b-256 cc334925718b2916fad7e3c88ca8fb913a2fab338bbbc3a2dbf1a2e5219b6d9e

See more details on using hashes here.

File details

Details for the file enchante-0.3.1-py3-none-any.whl.

File metadata

  • Download URL: enchante-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 9.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.13.9 Darwin/24.5.0

File hashes

Hashes for enchante-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 750e656b358ba700553fdeb4cb6ccc133006645f707d874bfa9e2770c8d91ae5
MD5 ba175bc7a021447a019c9b5323ddd5c6
BLAKE2b-256 ef298fbe44f5ba4526adac2e28ab61e2d514b5c15aed0f85b5fd7eb8ebe1d564

See more details on using hashes here.

Supported by

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