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.6.tar.gz (7.7 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.6-py3-none-any.whl (11.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pathiumapi-0.1.6.tar.gz
  • Upload date:
  • Size: 7.7 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.6.tar.gz
Algorithm Hash digest
SHA256 3e2601d0b7c5fe99bdc73bd9b6b261f5dfcff6c1f8e8b7273cd0f71a9cd191c0
MD5 236293d65ba86326422dfde79656ee41
BLAKE2b-256 7516f8acb3a238ae905241e71e6e1b9f5df2dc81b4e5b1a6c35e4a801821f790

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pathiumapi-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 11.6 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.6-py3-none-any.whl
Algorithm Hash digest
SHA256 2209ec711e8f6bb899efb977e29a57bcd4e03af22f8fd5dbbc505233d2ab8be3
MD5 1a15dc663efcdcbc5404675451be0c0e
BLAKE2b-256 0019883db765247a5a2c80ab7520475165203f5357af787605af6ac4ba1a400d

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