Skip to main content

MiniAPI3

A lightweight Python web framework inspired by FastAPI, featuring async support, WebSocket capabilities, and middleware.

github repo

miniapi3 PyPI Downloads

Features

  • Async request handling
  • Route parameters
  • WebSocket support
  • Middleware system
  • Request validation
  • CORS support
  • Form data handling
  • ASGI compatibility

Installation

pip install miniapi3

For WebSocket support:

pip install miniapi3[websockets]

Quick Start

# main.py
from miniapi3 import MiniAPI, Request

app = MiniAPI()

@app.get("/")
async def hello():
    return {"message": "Hello, World!"}

@app.get("/users/{user_id}")
async def get_user(request: Request):
    user_id = request.path_params["user_id"]
    return {"user_id": user_id}

# WebSocket example
@app.websocket("/ws")
async def websocket_handler(ws):
    while True:
        message = await ws.receive()
        await ws.send(f"Echo: {message}")

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

uvicorn support

uvicorn main:app

Request Validation

pip install pydantic
from miniapi3 import MiniAPI
from pydantic import BaseModel

app = MiniAPI()

class UserCreate(BaseModel):
    name: str

@app.post("/users")
async def create_user(user: UserCreate):
    return dict(user)

CORS Middleware

from miniapi3 import MiniAPI, CORSMiddleware

app = MiniAPI()
app.add_middleware(CORSMiddleware, allow_origins=["*"])

HTML Response

from miniapi3 import MiniAPI, html

app = MiniAPI()

@app.get("/")
async def index():
    return html("<h1>Hello, World!</h1>")

Metadata

Release files for miniapi3 0.1.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for miniapi3 0.1.7
File Size Uploaded Provenance
miniapi3-0.1.7.tar.gz 10.9 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for miniapi3 0.1.7
File Interpreter ABI Platform
miniapi3-0.1.7-py3-none-any.whl Python 3 none any Details

Total release size: 23.7 kB

Release files / miniapi3-0.1.7.tar.gz

Download URL miniapi3-0.1.7.tar.gz
Size 10.9 kB
Tags Source
SHA-256 checksum
How to use checksums
88a63d5f8a20c02a81a41773f4af3c61cb16cf69565df5b4502fd77daef9428e
BLAKE2b-256 checksum
How to use checksums
c346dd1a2142f17862068d0f4fe9af0768a2f294a9f54c89608f72405c3ad2a2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.4.29

Release files / miniapi3-0.1.7-py3-none-any.whl

Download URL miniapi3-0.1.7-py3-none-any.whl
Size 12.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
62e0af35dce85febc3d8b97b161d2b745caa99c8ec635c23b94c09decb4193c7
BLAKE2b-256 checksum
How to use checksums
c0603a480fc1a5b5aeff305dc483ec8ae37bbc7e7b704e04a2d9cde4b63aa434
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.4.29

Security for miniapi3 0.1.7

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page