BM Database Framework - A lightweight database framework
Project description
BMDB - Minimal Schema Manager
A lightweight SQLAlchemy schema manager with YAML-based model definitions.
Installation
From GitHub
pip install git+https://github.com/BM-Framework/bmdb.git
From Pypi
pip install bmdb
From source (development)
git clone https://github.com/BM-Framework/bmdb.git
cd bmdb
pip install -e .
Usage
# Create a model
bmdb create-model User
# Add fields
bmdb add-fields User name String email String age Int
# Generate models
bmdb generate
# Run migration
bmdb migrate
Requirements
- Python 3.7+
- SQLAlchemy
- PostgreSQL (or other supported database)
Configuration
Create a .env file:
DB_CONNECTION="postgresql://user:password@localhost:5433/dbname"
License
MIT License
5. Add .gitignore
# Python
__pycache__/
*.py[cod]
*$py.class
*.so
.Python
.venv/
venv/
ENV/
env/
# BMDB specific
models.bmdb
.env
bmdb/models/generated/*.py
!bmdb/models/generated/__init__.py
# IDE
.vscode/
.idea/
*.swp
*.swo
# Distribution
dist/
build/
*.egg-info/
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
bmdb-1.1.0.tar.gz
(7.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
bmdb-1.1.0-py3-none-any.whl
(7.2 kB
view details)
File details
Details for the file bmdb-1.1.0.tar.gz.
File metadata
- Download URL: bmdb-1.1.0.tar.gz
- Upload date:
- Size: 7.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aa8120294922ae985d24accda7ec15fc565f8fe1f93795cd5a87c9950c885b8b
|
|
| MD5 |
84a657eeaa983acd8abb93ff8ebeaec9
|
|
| BLAKE2b-256 |
bbb299857287dd25ca71199ceaec7e31c1b4fd3392f51df0f0d1b5976bf6e180
|
File details
Details for the file bmdb-1.1.0-py3-none-any.whl.
File metadata
- Download URL: bmdb-1.1.0-py3-none-any.whl
- Upload date:
- Size: 7.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bd5b6c1deb990805064d215ac098f1a5091191872d419b443053705f647d74fc
|
|
| MD5 |
8fa560008a35c852b229ea15fd113747
|
|
| BLAKE2b-256 |
3738276f8a12d902da59a9fb237b0aa25a33f81cb93d9241708396e134ac7401
|