--- id: piccolo-api version: "1.11.0" license: MIT license_treatment: permissive maintenance: active --- # piccolo-api — Utilities for using the Piccolo ORM in ASGI apps, plus essential ASGI middleware such as authentication and rate limiting. License: permissive · Maintenance: active · Downloads: 583.5K/mo ## What it is and what it does Piccolo API bridges Piccolo ORM tables and ASGI web frameworks like FastAPI and Starlette, automatically generating REST endpoints from your database schema. It eliminates boilerplate by letting you define a table in Piccolo and immediately expose it as a queryable API, with built-in support for filtering, pagination, and standard CRUD operations. Beyond endpoint generation, the package includes a suite of production-ready ASGI middleware: session and token authentication, rate limiting, CSRF protection, and Content Security Policy headers. It also integrates tightly with Pydantic, allowing you to derive validation schemas directly from your Piccolo table definitions. The library targets modern Python versions and is actively maintained. Use it for: - Quickly prototype a REST API backed by a Piccolo database without writing individual route handlers. - Add authentication and rate limiting to an existing FastAPI or Starlette application via drop-in middleware. - Generate Pydantic models from Piccolo tables to standardize request/response validation. - Build a data admin interface or internal tool that exposes database tables as queryable endpoints. - Secure an ASGI application with CSRF and CSP headers using pre-built middleware components. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Exposes Piccolo ORM tables as REST endpoints in ASGI applications and provides essential middleware for authentication, rate limiting, CSRF protection, and content security. Yes. The package is actively maintained, has no known vulnerabilities, installs cleanly, and solves a real problem—automating REST endpoint generation from Piccolo tables while providing essential middleware. It's a good fit if you're building with FastAPI or Starlette and Piccolo ORM. The MIT license poses no restrictions. ## Install pip install piccolo-api uv add piccolo-api poetry add piccolo-api ## Installing piccolo-api Before you install: Low install friction with a pure-Python wheel. Active maintenance with a release within the last week. Requires Python 3.10 or later and depends on FastAPI, Piccolo, Pydantic, and related web libraries. License in practice: MIT license is permissive; you can use this package in commercial and proprietary projects with minimal restrictions. Quickstart: pip install piccolo-api from piccolo_api.rest import create_tables from fastapi import FastAPI app = FastAPI() # Mount Piccolo table endpoints via create_tables or REST routing Requires Python 3.10 or later and a working Piccolo ORM setup with database configuration. Verify before relying: - Exact API surface and endpoint generation behavior for different table schemas. - Performance characteristics under high concurrency or large result sets. - Compatibility matrix with specific Piccolo and FastAPI versions beyond the stated Python support. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 583.5K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags piccolo orm rest api, asgi middleware authentication, fastapi database endpoints, rate limiting csrf middleware, rest api from database tables, orm-integration, rest-api-generator, asgi-middleware [View on SkillFed](https://skillfed.io/packages/piccolo-api) · [View on PyPI](https://pypi.org/project/piccolo-api/)