Skip to main content

A minimal ASGI-style API framework

Project description

PathiumAPI — Minimal ASGI API Framework

PathiumAPI is a small, synchronous-friendly ASGI-style web framework inspired by FastAPI and other micro-frameworks. It focuses on a compact, explicit API for routing, request/response helpers, middleware, and simple route parameter converters. It's ideal for small services, learning, or as a foundation to build more opinionated tooling.

Key points

  • Minimal, dependency-free core for routing and ASGI handling
  • Simple Request and Response helpers, plus Response.json() convenience
  • Path parameter converters (e.g. {id:int}) and middleware hooks
  • Small CLI to scaffold and run apps (pathiumapi new, pathiumapi run)

Installation

Install from PyPI:

pip install PathiumAPI

Quickstart

Create app.py:

from pathiumapi import Pathium, Response

app = Pathium()

@app.get("/")
async def index(req):
	return Response("Hello, PathiumAPI!")

@app.get("/users/{id}")
async def get_user(req, id: str):
	return Response.json({"id": id})

Run with uvicorn:

pip install uvicorn
uvicorn app:app --reload

Examples and docs

  • See examples/app.py for a minimal app.
  • Usage examples are available in usage.md (recommended for PyPI long description).

Development

  • Run tests: python -m pytest -q
  • Static checks (optional): flake8 and mypy

Contributing

See CONTRIBUTING.md for branch naming, PR workflow, and guidelines. Open a PR against main when ready and include tests for new functionality.

Changelog

See CHANGELOG.md for release notes.

License

MIT

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

pathiumapi-0.1.7.tar.gz (11.1 kB view details)

Uploaded Source

Built Distribution

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

pathiumapi-0.1.7-py3-none-any.whl (15.4 kB view details)

Uploaded Python 3

File details

Details for the file pathiumapi-0.1.7.tar.gz.

File metadata

  • Download URL: pathiumapi-0.1.7.tar.gz
  • Upload date:
  • Size: 11.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.25

File hashes

Hashes for pathiumapi-0.1.7.tar.gz
Algorithm Hash digest
SHA256 057fc05db6df9b9b5fdcdc7f9b6eab2b3e22d857f8bd61a22d1f170e37ef20ed
MD5 32acf935f6470f0d942f0050a90adc38
BLAKE2b-256 32cea3d22993eb89362a9c0b71c312c623b3a13a0b0e82e5599ab7b264a97e68

See more details on using hashes here.

File details

Details for the file pathiumapi-0.1.7-py3-none-any.whl.

File metadata

  • Download URL: pathiumapi-0.1.7-py3-none-any.whl
  • Upload date:
  • Size: 15.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.25

File hashes

Hashes for pathiumapi-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 a564848111f4b7e97caba8d5f1ecce80fc06afdb5e47ec3698cfd2a719c7d971
MD5 bcf5458926c23ee6cfcc5dbac73e8f3b
BLAKE2b-256 caf13ea6e6955aa7e244b375a89f6188f09ae03ba59658f397665107f7101687

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