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.10.tar.gz (15.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.10-py3-none-any.whl (19.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pathiumapi-0.1.10.tar.gz
  • Upload date:
  • Size: 15.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.10.tar.gz
Algorithm Hash digest
SHA256 94d6acd1966aa477d9be5f98385b53d2edf99684392cb6b8650516ce3f188e53
MD5 6362c20d08c962524ac93dab8e5c3dde
BLAKE2b-256 789a7a669a4a03a993a4cb7ab17379af88f0a1d833879c4e77deb31c7255f005

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pathiumapi-0.1.10-py3-none-any.whl
  • Upload date:
  • Size: 19.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.10-py3-none-any.whl
Algorithm Hash digest
SHA256 09e39a92d79b4dbd5893ca77d2bc2b51ad68d60c300558d6ca81e02d021f2ea8
MD5 827b6ca5d586f254c0d2e7cbdfbc7e06
BLAKE2b-256 ca439efb446f0457dee2c8ceb38042bf4ea397aa6d227b39dbd43ab8c59163e4

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