DataMan is a dynamic, headless backend engine built on top of Django and Django REST Framework. It eliminates the boilerplate of writing standard CRUD APIs, routing, and serializers by allowing you to scaffold endpoints instantly from the command line while preserving your ability to inject custom business logic and strict validation whenever you need it.
Looking to build an API in 5 minutes? Check out the Developer Quickstart Tutorial.
Get a fully functional, paginated, and documented REST API running in 4 commands:
# 1. Install DataMan
pip install dataman-engine
# 2. Initialize project in current directory
dataman init
# 3. Scaffold an Employee table with full CRUD operations
dataman create table Employee -o crud
# 4. Apply migrations and start the server
dataman makemigration && dataman migrate
dataman server start
GET /api/default/employee/ — Paginated list with multi-column filtering, search, and ordering.POST /api/default/employee/ — Create records with validation and lifecycle hooks.GET /api/default/employee/{id}/ — Point lookup with automatic relational joins (?depth=1).PUT /api/default/employee/{id}/ — Full update.PATCH /api/default/employee/{id}/ — Partial update.DELETE /api/default/employee/{id}/ — Delete record.http://127.0.0.1:8000/api/docs/http://127.0.0.1:8000/api/schema/Building standard CRUD backends with existing frameworks requires boilerplate code:
Without DataMan:
Model ---> Serializer ---> ViewSet ---> Router ---> FilterSet ---> Permissions
With DataMan:
Model ---> Done! (Instant REST Endpoints + Swagger Docs + Auth)
| Framework | CRUD API Setup Requirements |
|---|---|
| Django REST Framework (DRF) | Model + Serializer + ViewSet + Router + FilterSet + Permissions |
| FastAPI | SQLAlchemy Model + Pydantic Schema + Router + Endpoints + Dependency Injection |
| DataMan | Django Model Only (Instant Endpoints, Swagger, Auth & Hooks) |
Every scaffolded endpoint automatically delivers production response envelopes:
// GET /api/default/employee/?is_active=true&search=Engineering&ordering=-created_at
{
"count": 48,
"next": "http://127.0.0.1:8000/api/default/employee/?page=2",
"previous": null,
"results": [
{
"id": 101,
"name": "Jane Doe",
"department": "Engineering",
"email": "jane.doe@example.com",
"is_active": true,
"created_at": "2026-09-19T18:00:00Z"
}
]
}
?is_active=true&salary__gte=80000).?search=Jane).?ordering=-created_at,salary).COUNT(*) overhead on million-row tables.?depth=1).DataMan provides native connection pooling, health probes, and migration routing for:
| Database | Support Level | Recommended Use |
|---|---|---|
| PostgreSQL | Primary / Production | 1M+ scale workloads, multi-database routing, high-concurrency ASGI |
| MySQL / MariaDB | Production | Enterprise relational storage with connection lifecycle pooling |
| SQLite | Prototyping | Zero-configuration local development and rapid test suites |
DataMan is designed for data-intensive enterprise architectures:
Every table generated under tables/<TableName>/ gives you modular files for fine-grained control:
config.py (API Settings)# tables/Customer/config.py
ALLOWED_OPERATIONS = ["C", "R"] # Only allow Create (POST) and Read (GET)
REQUIRE_AUTH = True # Lock down this endpoint
DEPTH = 1 # Automatically serialize nested Foreign Key relationships on read (GET)
# Advanced Filtering, Search & Ordering
FILTER_FIELDS = {
"price": ["gte", "lte", "exact"],
"name": ["icontains", "exact"],
"is_active": ["exact"],
}
SEARCH_FIELDS = ["^name", "^email"] # Prefix seek for optimal B-Tree index utilization
ORDERING_FIELDS = ["created_at", "price"]
Generate restricted, fine-grained access tokens directly from the CLI:
dataman token create "Frontend Service" --scopes "customer:read,order:create"
Use the token with standard Bearer or Token headers:
Authorization: Bearer <your_generated_token_key>
validation.py (Data Validation)Validate incoming JSON payloads before database execution. Raise ValidationError to immediately return 400 Bad Request.
# tables/Customer/validation.py
from rest_framework.exceptions import ValidationError
def validate_customer(data):
if "admin" in data.get("name", "").lower():
raise ValidationError({"name": "Reserved keyword used."})
data["name"] = data["name"].strip().title()
return data
service.py (Pre/Post Lifecycle Hooks)Run transactional business logic before or after database commits (before_create, after_create, before_update, after_update, before_destroy, after_destroy):
# tables/Order/service.py
from rest_framework.exceptions import ValidationError
from tables.Product.models import Product
def before_create(data):
product = Product.objects.get(id=data["product"])
quantity = int(data.get("quantity", 1))
if product.stock_quantity < quantity:
raise ValidationError({"quantity": "Insufficient inventory available."})
product.stock_quantity -= quantity
product.save()
return data
Organize large projects across isolated physical databases:
# 1. Create a database namespace
dataman create database analytics_db
# 2. Scaffold a table bound to that database
dataman create table events --database analytics_db
# 3. Run migrations across all databases (or target a single database)
dataman migrate --database analytics_db
Endpoints are automatically registered at api/<database_name>/<table_name>/ (e.g. api/default/employee/ or api/analytics_db/events/).
DataMan comes with built-in health check endpoints for Kubernetes, Docker, and AWS ECS:
GET /health/live/: Process liveness probe returning 200 OK.GET /health/ready/: Sanitized readiness probe validating database connectivity and migration synchronization (returns 200 OK or 503 Service Unavailable).GET /health/: Unified health status with database latency metrics.Start high-concurrency production server powered by Uvicorn:
dataman server start --asgi --host 0.0.0.0 --port 8000 --workers 4
DataMan is tested with 95%+ branch coverage, verifying authentication edge cases, multi-database routing, and dynamic lifecycle hooks.
uv run pytest tests/ -v
MIT License
59 commits
1 commits
Python
77.6%
HTML
22.4%
DataMan is a dynamic, headless backend engine built on top of Django and Django REST Framework. It eliminates the boilerplate of writing standard CRUD APIs, routing, and serializers by allowing you to scaffold endpoints instantly from the command line while preserving your ability to inject custom business logic and strict validation whenever you need it.
Looking to build an API in 5 minutes? Check out the Developer Quickstart Tutorial.
Get a fully functional, paginated, and documented REST API running in 4 commands:
# 1. Install DataMan
pip install dataman-engine
# 2. Initialize project in current directory
dataman init
# 3. Scaffold an Employee table with full CRUD operations
dataman create table Employee -o crud
# 4. Apply migrations and start the server
dataman makemigration && dataman migrate
dataman server start
GET /api/default/employee/ — Paginated list with multi-column filtering, search, and ordering.POST /api/default/employee/ — Create records with validation and lifecycle hooks.GET /api/default/employee/{id}/ — Point lookup with automatic relational joins (?depth=1).PUT /api/default/employee/{id}/ — Full update.PATCH /api/default/employee/{id}/ — Partial update.DELETE /api/default/employee/{id}/ — Delete record.http://127.0.0.1:8000/api/docs/http://127.0.0.1:8000/api/schema/Building standard CRUD backends with existing frameworks requires boilerplate code:
Without DataMan:
Model ---> Serializer ---> ViewSet ---> Router ---> FilterSet ---> Permissions
With DataMan:
Model ---> Done! (Instant REST Endpoints + Swagger Docs + Auth)
| Framework | CRUD API Setup Requirements |
|---|---|
| Django REST Framework (DRF) | Model + Serializer + ViewSet + Router + FilterSet + Permissions |
| FastAPI | SQLAlchemy Model + Pydantic Schema + Router + Endpoints + Dependency Injection |
| DataMan | Django Model Only (Instant Endpoints, Swagger, Auth & Hooks) |
Every scaffolded endpoint automatically delivers production response envelopes:
// GET /api/default/employee/?is_active=true&search=Engineering&ordering=-created_at
{
"count": 48,
"next": "http://127.0.0.1:8000/api/default/employee/?page=2",
"previous": null,
"results": [
{
"id": 101,
"name": "Jane Doe",
"department": "Engineering",
"email": "jane.doe@example.com",
"is_active": true,
"created_at": "2026-09-19T18:00:00Z"
}
]
}
?is_active=true&salary__gte=80000).?search=Jane).?ordering=-created_at,salary).COUNT(*) overhead on million-row tables.?depth=1).DataMan provides native connection pooling, health probes, and migration routing for:
| Database | Support Level | Recommended Use |
|---|---|---|
| PostgreSQL | Primary / Production | 1M+ scale workloads, multi-database routing, high-concurrency ASGI |
| MySQL / MariaDB | Production | Enterprise relational storage with connection lifecycle pooling |
| SQLite | Prototyping | Zero-configuration local development and rapid test suites |
DataMan is designed for data-intensive enterprise architectures:
Every table generated under tables/<TableName>/ gives you modular files for fine-grained control:
config.py (API Settings)# tables/Customer/config.py
ALLOWED_OPERATIONS = ["C", "R"] # Only allow Create (POST) and Read (GET)
REQUIRE_AUTH = True # Lock down this endpoint
DEPTH = 1 # Automatically serialize nested Foreign Key relationships on read (GET)
# Advanced Filtering, Search & Ordering
FILTER_FIELDS = {
"price": ["gte", "lte", "exact"],
"name": ["icontains", "exact"],
"is_active": ["exact"],
}
SEARCH_FIELDS = ["^name", "^email"] # Prefix seek for optimal B-Tree index utilization
ORDERING_FIELDS = ["created_at", "price"]
Generate restricted, fine-grained access tokens directly from the CLI:
dataman token create "Frontend Service" --scopes "customer:read,order:create"
Use the token with standard Bearer or Token headers:
Authorization: Bearer <your_generated_token_key>
validation.py (Data Validation)Validate incoming JSON payloads before database execution. Raise ValidationError to immediately return 400 Bad Request.
# tables/Customer/validation.py
from rest_framework.exceptions import ValidationError
def validate_customer(data):
if "admin" in data.get("name", "").lower():
raise ValidationError({"name": "Reserved keyword used."})
data["name"] = data["name"].strip().title()
return data
service.py (Pre/Post Lifecycle Hooks)Run transactional business logic before or after database commits (before_create, after_create, before_update, after_update, before_destroy, after_destroy):
# tables/Order/service.py
from rest_framework.exceptions import ValidationError
from tables.Product.models import Product
def before_create(data):
product = Product.objects.get(id=data["product"])
quantity = int(data.get("quantity", 1))
if product.stock_quantity < quantity:
raise ValidationError({"quantity": "Insufficient inventory available."})
product.stock_quantity -= quantity
product.save()
return data
Organize large projects across isolated physical databases:
# 1. Create a database namespace
dataman create database analytics_db
# 2. Scaffold a table bound to that database
dataman create table events --database analytics_db
# 3. Run migrations across all databases (or target a single database)
dataman migrate --database analytics_db
Endpoints are automatically registered at api/<database_name>/<table_name>/ (e.g. api/default/employee/ or api/analytics_db/events/).
DataMan comes with built-in health check endpoints for Kubernetes, Docker, and AWS ECS:
GET /health/live/: Process liveness probe returning 200 OK.GET /health/ready/: Sanitized readiness probe validating database connectivity and migration synchronization (returns 200 OK or 503 Service Unavailable).GET /health/: Unified health status with database latency metrics.Start high-concurrency production server powered by Uvicorn:
dataman server start --asgi --host 0.0.0.0 --port 8000 --workers 4
DataMan is tested with 95%+ branch coverage, verifying authentication edge cases, multi-database routing, and dynamic lifecycle hooks.
uv run pytest tests/ -v
MIT License
59 commits
1 commits
Python
77.6%
HTML
22.4%