The clean, modular Python web floorplan
Project description
The clean, modular Python web floorplan.
Tatami is a minimal, convention-powered web framework that builds your application from the ground up — guided by your directory structure, not boilerplate or ceremony.
Like traditional tatami mats that structure a Japanese room, Tatami lets you define the shape and flow of your web app naturally, simply by laying things out.
✨ Features
- 🔁 Automatic routing from file and folder structure
- 📦 Service injection via convention
- 🧩 Auto-loaded middleware, templates, and static assets
- 📖 Live OpenAPI docs (ReDoc, Swagger, RapiDoc)
- 🧠 Auto-generated endpoint documentation from docstrings and README
- ⚡ Zero-config startup — just run your app directory
🚀 Quick Start
pip install tatami
Create a new project:
tatami create myproject
Run your project:
tatami run myproject
Your API will be available at http://localhost:8000 with automatic docs at /docs/swagger.
🧠 Philosophy
Tatami is designed for:
- Structure-first design: Routes and services emerge from file layout.
- Simplicity: Eliminate configuration and glue code.
- Alignment: Your docs, code, and architecture reflect each other.
It's like FastAPI and Flask had a minimalist, Spring Boot-inspired child.
📚 Documentation
You can access the whole documentation for Tatami here
By the way, Tatami automatically generates your application’s documentation at the following endpoints:
/openapi.json- OpenAPI specification/docs/swagger- Swagger UI/docs/redoc- ReDoc/docs/rapidoc- RapiDoc
🔌 Example
Using decorators (recommended):
from tatami import get, post, router
from pydantic import BaseModel
class User(BaseModel):
name: str
age: int
class Users(router('/users')):
@get('/')
def list_users(self):
"""Returns all users in the system."""
return [{"id": 1, "name": "Alice", "age": 30}]
@post('/')
def create_user(self, user: User):
"""Creates a new user."""
return {"message": f"Created user {user.name}"}
@get('/{user_id}')
def get_user(self, user_id: int):
"""Get a specific user by ID."""
return {"id": user_id, "name": "Alice", "age": 30}
Using convention-based routing:
# In routers/users.py
class Users:
def get_users(self):
"""List all users"""
return [{"id": 1, "name": "Alice"}]
def post_user(self, user: User):
"""Create a new user"""
return {"created": user.name}
This automatically creates:
- GET /users/
- POST /users/
- GET /users/{user_id}
...with full OpenAPI schemas generated automatically.
🌱 Still Early
Tatami is experimental. Expect breaking changes, rapid iteration, and exciting ideas.
Contributions, feedback, and issue reports are more than welcome.
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 tatami-0.0.2rc2.tar.gz.
File metadata
- Download URL: tatami-0.0.2rc2.tar.gz
- Upload date:
- Size: 12.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
02447d69e99f7b4fc1a65d591685d3b2fd272b67125346ef5a636d3e0b780dcf
|
|
| MD5 |
2cd9d3f50a9696240ea7f9b70e25f81a
|
|
| BLAKE2b-256 |
ac9e8ae1a3297a213e395a325e4f23d24fa923a9827d04d1d0e085b056c10826
|
Provenance
The following attestation bundles were made for tatami-0.0.2rc2.tar.gz:
Publisher:
pypi-publish.yml on ibonn/tatami
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tatami-0.0.2rc2.tar.gz -
Subject digest:
02447d69e99f7b4fc1a65d591685d3b2fd272b67125346ef5a636d3e0b780dcf - Sigstore transparency entry: 340698632
- Sigstore integration time:
-
Permalink:
ibonn/tatami@db54d8d7c2d3189a9285bb08e79aa5671b6810b9 -
Branch / Tag:
refs/tags/v0.0.2rc2 - Owner: https://github.com/ibonn
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@db54d8d7c2d3189a9285bb08e79aa5671b6810b9 -
Trigger Event:
push
-
Statement type:
File details
Details for the file tatami-0.0.2rc2-py3-none-any.whl.
File metadata
- Download URL: tatami-0.0.2rc2-py3-none-any.whl
- Upload date:
- Size: 12.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9c49d677c6606fdaf496563bc0eee05bd82bcc683a319ef11e1210061f6de2da
|
|
| MD5 |
9498a978819835fa69f0d0188942b226
|
|
| BLAKE2b-256 |
1a68a9809bad4a4db0d3b85a885b02f5e66c66e4268a8dab75e65c8221501a96
|
Provenance
The following attestation bundles were made for tatami-0.0.2rc2-py3-none-any.whl:
Publisher:
pypi-publish.yml on ibonn/tatami
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tatami-0.0.2rc2-py3-none-any.whl -
Subject digest:
9c49d677c6606fdaf496563bc0eee05bd82bcc683a319ef11e1210061f6de2da - Sigstore transparency entry: 340698666
- Sigstore integration time:
-
Permalink:
ibonn/tatami@db54d8d7c2d3189a9285bb08e79aa5671b6810b9 -
Branch / Tag:
refs/tags/v0.0.2rc2 - Owner: https://github.com/ibonn
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@db54d8d7c2d3189a9285bb08e79aa5671b6810b9 -
Trigger Event:
push
-
Statement type: