Skip to main content

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

Uploaded Source

Built Distribution

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

bmdb-1.0-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file bmdb-1.0.tar.gz.

File metadata

  • Download URL: bmdb-1.0.tar.gz
  • Upload date:
  • Size: 7.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.0

File hashes

Hashes for bmdb-1.0.tar.gz
Algorithm Hash digest
SHA256 129697bfad56fb37898927928dc378190228922c1d90a669f44539c230619176
MD5 9d4786aaedcb62ba4aeaf19e329ebfc2
BLAKE2b-256 258a91973e82609a76e2bd77096625a19591627badb24ca3f15f7e9b71eb7122

See more details on using hashes here.

File details

Details for the file bmdb-1.0-py3-none-any.whl.

File metadata

  • Download URL: bmdb-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

Hashes for bmdb-1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 91ae28791395ee155568b26314392f61e7109f04fe8f7b6af467229c577647b6
MD5 5d589b0ba942e4f52faf307baf002d1c
BLAKE2b-256 732dd69e5664451fd7ce7b40f264978679647adb980d7f71861cd699d9356a01

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