Skip to main content

Routly

Routly Logo

A lightweight, modular, modern Python microframework for Web & REST APIs.

PyPI version Python Versions Build Status License GitHub Stars


Overview

Routly is crafted for developers who desire the simplicity and elegance of modern microframeworks combined with enterprise-grade security and production WSGI reliability. It provides first-class REST API primitives, automatic content negotiation, double-submit CSRF defense, signed cookie sessions, and an interactive Tailwind CSS dark-mode debugger.


Key Features

  • Expressive Routing: Dynamic path matching with typed parameter extraction (/posts/{slug}).
  • First-Class REST APIs: Native serialization for Python dictionaries and lists to application/json, plus HTTP status tuples ({"ok": True}, 201).
  • Standard HTTP Verbs: Intuitive decorators (@app.get, @app.post, @app.put, @app.patch, @app.delete).
  • Modular Middleware Onion:
    • SecurityMiddleware: Domain whitelisting (ALLOWED_HOSTS), clickjacking defense (X-Frame-Options), MIME-sniffing prevention, and HSTS.
    • CsrfMiddleware: Double-submit cookie defense for state-changing HTTP methods.
    • SessionMiddleware: Tamper-proof, HMAC-SHA256 cryptographically signed cookies.
    • CorsMiddleware: Cross-Origin Resource Sharing with customizable origins and preflight handling.
    • GZipMiddleware: On-the-fly response payload compression.
    • ProcessTimeMiddleware: High-precision latency diagnostics in X-Process-Time.
  • Intelligent Content Negotiation: API endpoints receive clean JSON errors, while browser clients get an interactive developer error screen.
  • Tailwind Dark-Mode Debugger: Visual traceback inspection with one-click clipboard copying and client headers display.
  • Integrated Templating: Jinja2 rendering equipped with {{ static(...) }} and {{ csrf_input() }} helpers.
  • Built-in Static Delivery: Seamless asset serving powered by WhiteNoise.
  • WSGI Standard: Deploy directly on Gunicorn, uWSGI, Granian, or Waitress.

Installation

pip install routly

Or install with development dependencies:

pip install "routly[dev]"

Example Project

A complete, production-grade example application featuring authentication, session management, CSRF protection, and REST API CRUD is available in the example/ directory.

To run the showcase application locally:

python example/main.py

Testing

Run the comprehensive unit test suite with pytest:

pytest tests/

License

Created by Abdulbosit Alijonov.
Distributed under the MIT License.

Metadata

Release files for routly 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for routly 0.1.1
File Size Uploaded Provenance Actions
routly-0.1.1.tar.gz 28.0 kB Without provenance Details for routly-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for routly 0.1.1
File Interpreter ABI Platform Actions
routly-0.1.1-py3-none-any.whl Python 3 none any Details for routly-0.1.1-py3-none-any.whl

Total release size: 54.7 kB

Release files / routly-0.1.1.tar.gz

Download URL routly-0.1.1.tar.gz
Size 28.0 kB
Tags Source
SHA-256 checksum
How to use checksums
5739b2d972c8d17ee2a07e5e17ac376966b29719c2a6c26de2e5774deb6779f1
BLAKE2b-256 checksum
How to use checksums
b91271d1ea48dfd09990b1477a737502e83736c23dbbe6c162f252b9e4561a5b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / routly-0.1.1-py3-none-any.whl

Download URL routly-0.1.1-py3-none-any.whl
Size 26.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e5d96f97c200217f40515b0efb9b78870c87107615788dbe2fa3abf6e178bee4
BLAKE2b-256 checksum
How to use checksums
fafda875aa463b81ea95c07f65f819f8e78a163e06310a5c542643a1b9ea6059
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Security for routly 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page