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.9.tar.gz (12.0 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.9-py3-none-any.whl (16.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pathiumapi-0.1.9.tar.gz
  • Upload date:
  • Size: 12.0 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.9.tar.gz
Algorithm Hash digest
SHA256 c37b36473bc334bfeecd333b70e16c767391aeadcdb752efc73438304f39d39a
MD5 6fe68c12044e10bd6077c601c6a4ad0d
BLAKE2b-256 cb3b90307d0fd98b66d477fa23b497b2867427bdfa14d9d6fe5924d19e1d6cb3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pathiumapi-0.1.9-py3-none-any.whl
  • Upload date:
  • Size: 16.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.9-py3-none-any.whl
Algorithm Hash digest
SHA256 4657821428c9eb922cd49c2c52d78ed428791251146a9d1d4fbd566f874479dc
MD5 9e2006b5006e99d5813caa6904161452
BLAKE2b-256 3cecc40111111674ae0cd9c5637c7ab8fb6749c28491d9cb1ff44f917ec125f0

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