Skip to main content

A modern, high-performance Python web framework designed to transform your SQLAlchemy models directly into fully-featured, production-ready REST APIs with minimal code. Built with asyncio, SQLAlchemy, and Pydantic.

Project description

Jetio

Jetio Logo

The Zero-Boilerplate Python Framework for Rapid API Development

PyPI Version

Jetio is a modern, high-performance Python web framework designed to transform your SQLAlchemy models directly into fully-featured, production-ready REST APIs with minimal code. Stop writing boilerplate and start building what matters.


Key Features

  • Model-Driven APIs: Use standard SQLAlchemy models as your single source of truth for your database, validation, and API serialization.
  • Automatic CRUD: Instantly generate robust Create, Read, Update, and Delete endpoints for any model with a single line of code.
  • Secure by Design: Easily secure your auto-generated endpoints with a single flag and plug in your own authentication logic.
  • Async First: Built from the ground up on an async core (powered by Starlette) for maximum performance and scalability.
  • Automatic Docs: Get interactive and functional Swagger UI out of the box.
  • Flexible & Familiar: Escape the generator whenever you need to. Use familiar decorator-based routing for custom endpoints, giving you the best of both worlds.


Example

# model.py
from sqlalchemy.orm import Mapped
from jetio import JetioModel

class User(JetioModel):
    username: Mapped[str]
    email: Mapped[str]

class Minister(JetioModel):
    first_name: Mapped[str]
    last_name: Mapped[str]

Get Jetio to make your app

# app.py
from jetio import Jetio, CrudRouter, add_swagger_ui
from model import User, Minister

app = Jetio()
add_swagger_ui(app)

# Generate 5 CRUD routes per model
CrudRouter(model=User).register_routes(app)
CrudRouter(model=Minister).register_routes(app)


if __name__ == "__main__":
    app.run()

Database setup

Use your preferred DB tool.

or for quick dev environment, you can also change your app.py above to:

# app.py
from jetio import Jetio, CrudRouter, add_swagger_ui, Base, engine
from model import User, Minister
import asyncio

app = Jetio()
add_swagger_ui(app)

# Generate 5 CRUD routes per model
CrudRouter(model=User).register_routes(app)
CrudRouter(model=Minister).register_routes(app)


# --- Database and Server Startup ---
async def create_db_and_tables():
    async with engine.begin() as conn:
        await conn.run_sync(Base.metadata.create_all)
    print("Database tables created.")

if __name__ == "__main__":
    asyncio.run(create_db_and_tables())
    app.run()

Simplified Single File Setup

You could simply have the model classes in the main file as follows.

from jetio import Jetio, CrudRouter, JetioModel, add_swagger_ui, Base, engine
import asyncio
from sqlalchemy.orm import Mapped

class Staff(JetioModel):
    username: Mapped[str]
    email: Mapped[str]

class Report(JetioModel):
    title: Mapped[str]
    content: Mapped[str]

app = Jetio()
add_swagger_ui(app)

# Generate 5 CRUD routes per model
CrudRouter(model=Staff).register_routes(app)
CrudRouter(model=Report).register_routes(app)


# --- Database and Server Startup ---
async def create_db_and_tables():
    async with engine.begin() as conn:
        await conn.run_sync(Base.metadata.create_all)
    print("Database tables created.")

if __name__ == "__main__":
    asyncio.run(create_db_and_tables())
    app.run()

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

jetio-1.1.0.tar.gz (18.6 kB view details)

Uploaded Source

Built Distribution

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

jetio-1.1.0-py3-none-any.whl (20.9 kB view details)

Uploaded Python 3

File details

Details for the file jetio-1.1.0.tar.gz.

File metadata

  • Download URL: jetio-1.1.0.tar.gz
  • Upload date:
  • Size: 18.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.11

File hashes

Hashes for jetio-1.1.0.tar.gz
Algorithm Hash digest
SHA256 4037e739cb736d02052ca82120163385be335fad7e9734ab0e34da1bf9585eb8
MD5 f98e2cbdb074b7d2e0d44c14cd9acc48
BLAKE2b-256 c8fef7fd0a7a5d1efe72a21d93b266689091b425e3da66467f9dbd5727b738d8

See more details on using hashes here.

File details

Details for the file jetio-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: jetio-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 20.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.11

File hashes

Hashes for jetio-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9e78bc34f7cf8e76bd5244d30f462d57078993de0d02a5377bf8fd33ecf5f233
MD5 e4d16b26e22404a1989b2ef0028b0c3e
BLAKE2b-256 affe90dffe539a6ce47a75a52e6dcc98a1844128eac5e1a53812266fb65d06d2

See more details on using hashes here.

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