Skip to content

Releases

What’s New in v0.4.0

Choose a tag to compare

@AlijonovUz AlijonovUz released this 02 Dec 09:43

New Features

  • Pluggable & Redis Store Backends (routly.stores): Added BaseRateLimitStore, BaseSessionStore, StoreResolver, RedisRateLimitStore (ZSET sliding window), and RedisSessionStore (server-side TTL sessions with HMAC-signed session ID cookies) configured via RATE_LIMIT_STORE, SESSION_STORE, and REDIS_URL (optional pip install "routly[redis]").
  • Interactive CLI Shell — Added routly shell [target] to open an interactive Python REPL with app, settings, Request, and TestClient preloaded and startup/shutdown hooks invoked cleanly.

Improvements

  • Added strict validation and normalization for ERROR_FORMAT ("auto", "json", "html") in routly.conf.settings so invalid settings fail fast with ValueError, and added explicit "html" mode support in render_exception.
  • Added optional store= support to @rate_limit(...) alongside global RATE_LIMIT_STORE sharing.

What’s New in v0.3.1

Choose a tag to compare

@AlijonovUz AlijonovUz released this 02 Dec 07:40

Bug Fixes & Improvements

  • REST API Error Negotiation: Added API_PREFIXES (default ["/api/"]) and ERROR_FORMAT ("auto" / "json") so API endpoints return flat JSON errors even without Accept: application/json when DEBUG = False, and sanitized direct raw exception messages in production.
  • CSRF Exemptions: Added CSRF_EXEMPT_PATHS and dual-mode @csrf_exempt / dependencies=[csrf_exempt] in routly.decorators for webhooks and token-authenticated APIs.
  • Safe JSON Input & Extended Serialization: Added request.get_json(default=..., silent=...) raising BadRequest (400) instead of 500 on empty/invalid JSON, fixed 3-tuple (body, status_code, headers) unpacking in build_response, and added JSON serialization for UUID, datetime, date, time, Decimal, Enum, Path, and set.
  • HTTP Compliance & Middleware Polish: Added implicit HEAD handling for GET routes, Allow headers on 405 responses, bare @require_api_key support, CORS_EXPOSE_HEADERS, and explicit GZipMiddleware skips for HEAD, 204, and 304 responses.
  • Security & Stability: Enabled Jinja2 autoescape in TemplateEngine and render_debug_page, escaped tokens inside csrf_input(), reset the current_request ContextVar in RoutlyApp.handle_request, hardened SessionMiddleware cookie decoding, and handled callables without __name__ in routly routes.
  • Documentation: Fixed the JSON error payload example in REST API Development to match Routly’s flat JSON schema and updated starter template comments.

What’s New in v0.3.0

Choose a tag to compare

@AlijonovUz AlijonovUz released this 01 Dec 14:16

New Features

  • Logging Middleware — Formatted single-line request logs with optional ANSI colors, millisecond timing, client IP detection, and automatic wsgiref duplicate-log suppression during routly runserver.
  • Rate Limiting — Thread-safe SlidingWindowLimiter via RateLimitMiddleware and endpoint-level @rate_limit decorator with RATE_LIMIT_SCOPE, RATE_LIMIT_EXEMPT_PATHS, X-RateLimit-* headers, and TooManyRequests (429).
  • TestClient — Dedicated in-process WSGI test client supporting persistent cookies, params/json/data/body, follow_redirects, and context-managed startup/shutdown hooks.
  • Route Guards & Auth Decorators — Router-level and endpoint-level dependencies=[...] short-circuiting paired with dual-mode routly.decorators guards (is_authenticated, login_required, require_role, require_permissions, require_api_key, require_https).
  • Streaming & File Responses — Memory-efficient StreamingResponse and FileResponse with automatic MIME detection, safe Content-Disposition headers, and is_streaming protection in GZipMiddleware.
  • Uploaded Media Files — Multipart request.files / UploadedFile helpers (.save(), .read(), .size), dynamic MEDIA_URL / MEDIA_ROOT file serving, {{ media(...) }} Jinja2 helper, and files= support in TestClient.
  • Added UnprocessableEntity (422) HTTP exception and header forwarding support on HttpException responses.

Improvements

  • Unified FBV access control decorators and router dependency guards under routly.decorators.
  • Added get_client_ip helper in routly.utils.http for proxy-aware IP extraction.

What’s New in v0.2.0

Choose a tag to compare

@AlijonovUz AlijonovUz released this 01 Dec 10:18

New Features

  • Command-Line Interface — Project scaffolding, auto-reloading development server, route table inspector, and secret key generator.
  • Typed Path Converters — Built-in string, integer, float, slug, UUID, and multi-segment path converters compiled via Python regular expressions.
  • Modular Routers — Group routes under shared URL prefixes and mount routers cleanly into the main application or inside other routers.
  • Multi-Method Routes — Register multiple HTTP verbs on a single handler using the unified route decorator.
  • Custom Error Handlers — Bind custom views to HTTP status codes or Python exception classes.
  • Application Lifecycle Hooks — Thread-safe startup and shutdown callbacks integrated across WSGI servers and the CLI.

Improvements

  • Removed the external parse dependency in favor of native compiled regex routing with strict slash isolation.
  • Improved Settings Reference auto-discovery across CLI commands and environment variables.