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.11.tar.gz (17.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.11-py3-none-any.whl (21.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pathiumapi-0.1.11.tar.gz
  • Upload date:
  • Size: 17.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.11.tar.gz
Algorithm Hash digest
SHA256 a612bb5a9fed0362421070ec6af29dc26b7c0397b27a1efd564228031c03e9f4
MD5 4fb15554d1bf733afb50ffb5a60c9e8b
BLAKE2b-256 c3e260fab1cd19f20cd540e11cc12aad1372a439e6602a665c7dce9c4eb321fe

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pathiumapi-0.1.11-py3-none-any.whl
  • Upload date:
  • Size: 21.3 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.11-py3-none-any.whl
Algorithm Hash digest
SHA256 3b4c36bcea2d666f7d8ecdb30e1922039dfa6fbf0e9becdb1cafce7ffa1a79f8
MD5 d7221386d134f8e9c79e16bb2ef04d13
BLAKE2b-256 60d886f6be4f1b088740631e8d84265ec1c05877506c00d1f382a0772d733d79

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