Skip to main content

The clean, modular Python web floorplan

Project description

Tatami Logo

Build Status Docs Status

PyPI - Downloads PyPI - Version


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

Built-in documentation is served automatically:

  • /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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tatami-0.0.2rc0.tar.gz (12.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tatami-0.0.2rc0-py3-none-any.whl (12.5 kB view details)

Uploaded Python 3

File details

Details for the file tatami-0.0.2rc0.tar.gz.

File metadata

  • Download URL: tatami-0.0.2rc0.tar.gz
  • Upload date:
  • Size: 12.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for tatami-0.0.2rc0.tar.gz
Algorithm Hash digest
SHA256 4a5011fdaaf267a00235fbd9f777e96a39c2b9a12aa3ff88e61c8d41b5dfbb68
MD5 9cff9ea56bea60d92a1642403e7afcf7
BLAKE2b-256 44107863386c4671320be9ace5ad8ae939a89354ebf17194754f3ed594db6696

See more details on using hashes here.

Provenance

The following attestation bundles were made for tatami-0.0.2rc0.tar.gz:

Publisher: pypi-publish.yml on ibonn/tatami

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tatami-0.0.2rc0-py3-none-any.whl.

File metadata

  • Download URL: tatami-0.0.2rc0-py3-none-any.whl
  • Upload date:
  • Size: 12.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for tatami-0.0.2rc0-py3-none-any.whl
Algorithm Hash digest
SHA256 18504d9027e0d3cbe4d9fc0d94aa24f5e3c629b829ea5c148f160dff3e4774eb
MD5 b36d66f489a7b69651dae237381d7ef4
BLAKE2b-256 7fac92beb3b094678e595f64cbfe41d60365d099a0a3f5e3b4867541497eda5a

See more details on using hashes here.

Provenance

The following attestation bundles were made for tatami-0.0.2rc0-py3-none-any.whl:

Publisher: pypi-publish.yml on ibonn/tatami

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page