Skip to main content

Decorator-first FastAPI toolkit for REST endpoints with normalized responses and plugin-ready integrations.

Project description

EnterPipeLite

Python License: MIT Status: Alpha

EnterPipeLite is a typed, decorator-first toolkit for building REST APIs on FastAPI. It provides OpenAPI generation, normalized response envelopes, validation, named authentication and rate limiting, and plugin-shaped database, HTTP, Redis, Kafka, cache, and observability integrations.

Alpha prerelease: 1.0.0a2 is intended for evaluation. Public APIs may still evolve before stable 1.0.0 according to the documented deprecation policy.

راهنمای فارسی · Repository · Issues

Installation

Install the prerelease from PyPI after it is published:

python -m pip install --pre enterpipelite

Optional integrations are installed through extras:

python -m pip install --pre "enterpipelite[server]"
python -m pip install --pre "enterpipelite[security]"
python -m pip install --pre "enterpipelite[redis]"
python -m pip install --pre "enterpipelite[kafka]"
python -m pip install --pre "enterpipelite[postgres]"
python -m pip install --pre "enterpipelite[mysql]"
python -m pip install --pre "enterpipelite[mssql]"

Supported Python versions: 3.11 through 3.14.

Minimal app

from enterpipelite import EnterPipeApp, get
from enterpipelite.core.registry import EndpointRegistry
from enterpipelite.resources import ResourceRegistry
from enterpipelite.security import SecurityRegistry

registry = EndpointRegistry()

@get("/hello", registry=registry)
async def hello(name: str = "world"):
    return {"message": f"Hello {name}"}

app = EnterPipeApp(
    registry=registry,
    resource_registry=ResourceRegistry(),
    security_registry=SecurityRegistry(),
    auto_configure_resources=False,
    auto_configure_security=False,
).build()

Run it from a source checkout:

python -m uvicorn examples.basic_app:app --reload --env-file .env

Open /docs for Swagger UI and /openapi.json for the generated schema. JSON responses use a consistent envelope containing success, status_code, data, error, and execution metadata.

Features

  • Concise @get, @post, @put, @patch, @delete, and @ep endpoint declarations.
  • Accurate OpenAPI for signatures, decorator-declared bodies, security, and rate-limit metadata.
  • Handler, declarative operation, and hybrid endpoint modes.
  • PostgreSQL, MySQL, SQL Server, outbound HTTP, Redis, Kafka, cache, and Sentry providers.
  • Named API-key, JWT, OIDC resource-server, and external authentication providers.
  • Multiple named provider instances, with at most one auth provider selected per endpoint.
  • Versioned HMAC API-key digests, consumer credentials, rotation, and revocation.
  • In-memory and Redis fixed-window rate limiting.
  • Stable typed contracts for external resource and authentication plugins.

Security model

Secrets and concrete credentials belong in environment variables. Source and JSON configuration reference environment-variable names through fields such as dsn_env, url_env, api_key_env, pepper_env, and verification_key_env. API-key consumer stores retain versioned HMAC digests, not plaintext keys. OIDC support validates bearer access tokens as a resource server; it does not implement browser login or authorization-code flows.

Generate an API-key digest without putting the key on the command line:

python -m enterpipelite.security hash-api-key --pepper-env ENTERPIPE_API_KEY_PEPPER

See SECURITY.md before reporting a vulnerability.

Documentation

English:

Persian / فارسی:

External plugin starters are available in templates/resource_provider and templates/auth_provider.

Development

python -m pip install -e ".[dev,all]"
python -m ruff check .
python -m ruff format --check .
python -m mypy enterpipelite
python -m pytest --ignore=tests/integration
python -m build

Integration tests require explicitly configured disposable services. Never point them at shared or production databases.

Project policy

Canonical project links: repository, issue tracker, and changelog.

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

enterpipelite-1.0.0a2.tar.gz (163.8 kB view details)

Uploaded Source

Built Distribution

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

enterpipelite-1.0.0a2-py3-none-any.whl (95.3 kB view details)

Uploaded Python 3

File details

Details for the file enterpipelite-1.0.0a2.tar.gz.

File metadata

  • Download URL: enterpipelite-1.0.0a2.tar.gz
  • Upload date:
  • Size: 163.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for enterpipelite-1.0.0a2.tar.gz
Algorithm Hash digest
SHA256 3276195742c6c49494f061bfe2033a6c644fad38819bf93de67d058d8df62fc9
MD5 fddb8c13e30aab87eddd1a1ebe52acbb
BLAKE2b-256 65ec6409f19fcc802ad0e4422680c9b38de630af4c2269a14732a222b332b3a9

See more details on using hashes here.

Provenance

The following attestation bundles were made for enterpipelite-1.0.0a2.tar.gz:

Publisher: release.yml on abbas-najafian/enterpipelite

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

File details

Details for the file enterpipelite-1.0.0a2-py3-none-any.whl.

File metadata

  • Download URL: enterpipelite-1.0.0a2-py3-none-any.whl
  • Upload date:
  • Size: 95.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for enterpipelite-1.0.0a2-py3-none-any.whl
Algorithm Hash digest
SHA256 e90bdde09fa68aa0e074317bdcc32de1ddc2782ef84ff152475e7b27cc922919
MD5 b2342db42ad1e75bfc92072611e314f8
BLAKE2b-256 5ff8e61efef387638e7eeeabe54372afccf444ba2bd35e59afcf9b6340d3f22d

See more details on using hashes here.

Provenance

The following attestation bundles were made for enterpipelite-1.0.0a2-py3-none-any.whl:

Publisher: release.yml on abbas-najafian/enterpipelite

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