A playground for testing Django ORM model configurations and queries in an isolated, sandboxed environment.
- Write and execute Django ORM code in the browser
- Execute code against Django PRs, branches, and tags
- View generated SQL queries with execution times
- Auto-generated ERD diagrams from your models
- Shareable code snippets
- Zen mode for distraction-free coding
- Vim keybindings support
- Docker and Docker Compose
- Git
- Clone the repository:
- Create a
.envfile in the project root:
PROJECT=dryorm
TAG=latest
DEBUG=True
PYTHONUNBUFFERED=1
SECRET_KEY="your-secret-key"
ENVIRONMENT=development
# Database
POSTGRES_USER=dryorm
POSTGRES_PASSWORD=dryorm
POSTGRES_DB=dryorm
POSTGRES_HOST=database
# Optional: GitHub token for higher API rate limits
GITHUB_TOKEN=""- Build and start the stack:
docker compose build
docker compose up -dThe application will be available at http://localhost:8000.
make frontend-install # Install frontend dependencies
make frontend-watch # Watch mode for frontend development
make frontend-build # Production build
make clean # Clean build artifactsExecutors are isolated Docker containers that run user-submitted code. To create a custom executor:
- A self-sufficient Docker image (preferably lightweight)
- Accepts
CODEas an environment variable - Returns JSON on success or exits with non-zero status on failure
{
"erd": "base64-encoded-erd-image",
"output": "print output here",
"returned": [
{"column1": "value1", "column2": "value2"}
],
"queries": [
{"sql": "SELECT * FROM ...", "time": "0.001"}
]
}docker run --rm -e CODE="$(cat models.py)" dryorm/executorDefine executors in the backend constants:
EXECUTOR = Executor(
image='dryorm-executor/python-django',
key='python/django',
memory='75m',
verbose='Python - Django',
max_containers=5,
)DryORM can fetch and run code against any Django reference from the official repository:
- Pull Requests - Test upcoming features or bug fixes before they're merged
- Branches - Run against development branches like
mainor stable branches - Tags - Use any Django release tag (e.g.,
v5.2,v4.2.10)
References are cached locally using git worktrees for fast subsequent access. This is useful for:
- Validating that a PR fixes your issue
- Testing code against unreleased Django versions
- Comparing behavior across different Django releases
To use, click the settings icon and select "GitHub Reference" to search and fetch the desired PR, branch, or tag.
Frontend: React 18, Vite, Tailwind CSS, CodeMirror 6
Backend: Django 5.2, PostgreSQL, Redis, Docker
Executors: Isolated Docker containers running Django 4.2/5.2 with PostgreSQL or MariaDB
Why does this exist?
To quickly test and share executable ORM snippets without setting up a full Django project.
Is this an official Django Software Foundation project?
No. This is a personal project. The theme is inspired by Django's official website.
Does it support other ORMs?
The architecture is ORM-agnostic. You will find existing executors for SQLAlchemy and PrismaJS in the repository, but they are disabled in production.
MIT License - see LICENSE for details.
