crudzilla
Generate Pydantic models and FastCRUD routers from your PostgreSQL database schema.
Installation
pip install crudzilla
# or
uv add crudzilla
Quick Start
export DATABASE_URL="postgresql://user:password@localhost:5432/mydb"
crudzilla # Pydantic models only
crudzilla --generate-routers # Include FastCRUD routers
crudzilla --generate-routers --include-sqlalchemy # Full generation
Options
| Option | Description |
|---|---|
-o, --output-dir |
Output directory for models (default: generated_models) |
--routers-dir |
Output directory for routers (default: src/app/routers/generated) |
--env-file |
Path to .env file containing DATABASE_URL |
--schema |
Database schema (default: public) |
--exclude-tables |
Tables to exclude (supports wildcards: audit_*, *_log) |
--include-sqlalchemy |
Generate SQLAlchemy models |
--generate-routers |
Generate FastCRUD routers |
--async-mode |
Generate async CRUD operations |
--dry-run |
Preview without writing files |
--backup |
Backup existing files before overwriting |
-v, --verbose |
Verbose output |
Output Structure
generated_models/
├── fastapi/
│ └── schema_public_latest.py # Pydantic schemas
└── sqlalchemy_models.py # SQLAlchemy models
src/app/routers/generated/
└── generated.py # FastCRUD routers
Usage in FastAPI
from fastapi import FastAPI
from src.app.routers.generated.generated import register_generated_routers
app = FastAPI()
register_generated_routers(app, prefix="/api/v1/db")
License
MIT
Metadata
Release files for crudzilla 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| crudzilla-0.1.0.tar.gz | 14.7 kB | Without provenance | Details for crudzilla-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| crudzilla-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for crudzilla-0.1.0-py3-none-any.whl |
Total release size: 29.9 kB
Release files / crudzilla-0.1.0.tar.gz
| Download URL | crudzilla-0.1.0.tar.gz |
|---|---|
| Size | 14.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
95974cfdee323aa068870aa64d44178fa0d26ff912b2fdce399f2315e81b4521
|
|
BLAKE2b-256 checksum How to use checksums |
f2cfaac2751c72fc6d7acec42c907947bfdad63b3f39afd416bdc7cd52e0ec14
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.5.21
|
Release files / crudzilla-0.1.0-py3-none-any.whl
| Download URL | crudzilla-0.1.0-py3-none-any.whl |
|---|---|
| Size | 15.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
11d5152be349a18cc2b1336df24d6c7ab8e5daee1377d3e50fc7d4d9bde14114
|
|
BLAKE2b-256 checksum How to use checksums |
27ec41913676371a98835d74b7bc5410792926b1dcbcec1ca5966ef471f2625b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.5.21
|
Security for crudzilla 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.