Python package for the MDModels Rust crate
Project description
Python MD-Models
Build metadata-first Python apps from Markdown-defined models. mdmodels is the Python package for the MDModels Rust crate, with batteries included for data modeling, AI workflows, SQL/graph backends, and API generation. 🚀
Why MD-Models?
- 🧩 Model once in Markdown, then generate strongly typed Python models
- 🤖 Work with AI for extraction, mapping, Q&A, and similarity search
- 🗃️ Persist and query with SQL, vectors, and graph databases
- 🌐 Ship interfaces fast via REST, GraphQL, and MCP helpers
What's in the bag? 🎒
- 🧱 Core model tooling - Load, inspect, and work with metadata models
- 🐍 Pydantic generation - Generate rich Python model classes from MD-Models
- 🤖 LLM workflows - Extract, map, search, and answer questions over metadata
- 🗄️ SQL and vector search - Build SQL-backed stores and pgvector-style embedding workflows
- 🕸️ Graph databases - Build and query graph representations of your models
- 🌐 API generation - Expose model-backed services through REST and GraphQL helpers
- 🔌 MCP integrations - Create MCP-compatible interfaces for model and SQL workflows
Note: This package is actively evolving and APIs may change. Feedback and contributions are welcome. 🙌
Installation
We recommend using uv for a fast, reproducible Python workflow.
Install uv (if needed):
curl -LsSf https://astral.sh/uv/install.sh | sh
Install the base package:
uv pip install mdmodels
Install optional feature sets:
# LLM tools
uv pip install "mdmodels[chat]"
# Graph database tools
uv pip install "mdmodels[graph]"
# SQL backends
uv pip install "mdmodels[postgres]"
uv pip install "mdmodels[mysql]"
uv pip install "mdmodels[sqlserver]"
# Vector search (pgvector + embeddings)
uv pip install "mdmodels[pgvector]"
# API integrations
uv pip install "mdmodels[rest]"
uv pip install "mdmodels[graphql]"
# MCP integration
uv pip install "mdmodels[mcp]"
Documentation 📚
Guides, tutorials, and API usage:
Development
Run all tests:
uv run pytest
Run tests with coverage report:
uv run pytest --cov=mdmodels --cov-report=html
Run tests in Docker:
docker build --build-arg PYTHON_VERSION=3.12 -t mdmodels .
docker run -v $(pwd):/app mdmodels
Use the helper script:
./run-tests.sh --python=3.12
Skip expensive tests:
uv run pytest -m "not expensive"
Project details
Release history Release notifications | RSS feed
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
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
File details
Details for the file mdmodels-0.3.1.tar.gz.
File metadata
- Download URL: mdmodels-0.3.1.tar.gz
- Upload date:
- Size: 567.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fc4e78a2c7812cb176f334b5d661d24cbe2626b4adb07d7fcffccb8facbeb828
|
|
| MD5 |
25ab9a7de05361d00b1eb734293e898e
|
|
| BLAKE2b-256 |
12ca819e7118c1d960fe952166837fbf4d7f58934c22292f3d56fa6220550a4a
|
File details
Details for the file mdmodels-0.3.1-py3-none-any.whl.
File metadata
- Download URL: mdmodels-0.3.1-py3-none-any.whl
- Upload date:
- Size: 166.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
736ebb6a8d4d3aa495e98699c9dbbe1ce8601c54b50e1358de81f727a694f55a
|
|
| MD5 |
9b537ad1f1a7bf827fb50d4d2ba0e290
|
|
| BLAKE2b-256 |
9f938c8d34d900115fe0f87c3d03eca6d50faba4d507b8a49b9f1300d96cf109
|