Skip to main content

Routly

Routly Logo

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

PyPI version Documentation Status 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.2

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.2
File Size Uploaded Provenance Actions
routly-0.1.2.tar.gz 28.1 kB Without provenance Details for routly-0.1.2.tar.gz

Built distribution (wheel)

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

Total release size: 54.8 kB

Release files / routly-0.1.2.tar.gz

Download URL routly-0.1.2.tar.gz
Size 28.1 kB
Tags Source
SHA-256 checksum
How to use checksums
fcab9a170a06c9925e42b0fea88c31630d518503deda3a5f6a645ba657dc6cf4
BLAKE2b-256 checksum
How to use checksums
43dad06dc3bc9a4a33ba635293eff0b6e17f522fba485882410eab3399a58cf0
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.2-py3-none-any.whl

Download URL routly-0.1.2-py3-none-any.whl
Size 26.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
496900eba0f5c8b5f85893b53b7eee44d9a552d50bc79aa08d63e40be34597c1
BLAKE2b-256 checksum
How to use checksums
f8b394a56f53b0b1514fdc426f8843c85cc3ecb5077da9c77ba7b4fa2c988378
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.2

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