Skip to main content

Flask Mini API

A powerful, lightweight wrapper around Flask designed for rapid development. It completely eliminates boilerplate code and comes with built-in colored logging, simplified routing, security decorators, and instant Cloudflare tunneling.

Features

  • 🚀 Instant Webhook/API: Minimal setup required.
  • 🌍 Built-in Cloudflare Tunnel: Expose your local server to the internet instantly using cloudflare=True.
  • 🎨 Beautiful Colored Logging: Replaces default ugly Werkzeug logs with clean, timed, and colored terminal outputs.
  • 🛡️ Decorators out-of-the-box: Easy @rate_limit, @cache, @require_key, and @require_json_fields.
  • 🗄️ Memory Store: A built-in key-value memory store for fast prototyping without setting up a database.

Installation

pip install flask-mini-api

Quick Start Example

from flask_mini_api.flask_api import app, routes, run_app, require_key, rate_limit

1. Simple API Route (Automatically returns JSON)

routes.api_route("ping", lambda: {"status": "ok", "message": "Pong!"})

2. Advanced Route with rate limiting and API Key protection

@require_key("my-secret-key-123") @rate_limit(max_requests=5, per_seconds=60) def get_secure_data(): return {"data": "This is highly classified"}

routes.api_route("secure", get_secure_data)

3. Start the server (Starts locally and opens a public Cloudflare URL!)

if name == "main": run_app(p=5000, cloudflare=True) Advanced Features Route Groups Need to prefix your routes like /api/v1/? Use route_group:

from flask_mini_api.flask_api import route_group

api_v1 = route_group("/api/v1") api_v1.api_route("users", lambda: {"users": ["Alice", "Bob"]}) In-Memory Database For fast prototyping, you don't need Redis. Use the built-in store:

from flask_mini_api.flask_api import store

store.set("server_status", "maintenance") print(store.get("server_status")) Maintenance Mode Easily lock down your API with one function (returns 503 for all endpoints except /health):

from flask_mini_api.flask_api import maintenance_mode

maintenance_mode(True) License This project is open-source and available under the MIT License.

Metadata

Release files for flask-mini-api 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 flask-mini-api 0.1.2
File Size Uploaded
flask_mini_api-0.1.2.tar.gz 9.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for flask-mini-api 0.1.2
File Interpreter ABI Platform
flask_mini_api-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 19.1 kB

Release files / flask_mini_api-0.1.2.tar.gz

Download URL flask_mini_api-0.1.2.tar.gz
Size 9.2 kB
Tags Source
SHA-256 checksum
How to use checksums
48a627931cfda4eee5f3b163d53c14f82b26b6a1754b5f8fff1b387ddcea25eb
BLAKE2b-256 checksum
How to use checksums
788df8748071d2f65847033a6a5c3ce8d1856f2ae5ac0aa8f99b90fe75141b61
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 21, 2026.

Transparency log

Release files / flask_mini_api-0.1.2-py3-none-any.whl

Download URL flask_mini_api-0.1.2-py3-none-any.whl
Size 9.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f3a61fd1c2e1133ce6c30eca4393c14234de80f89f4e43d7b053f3455e17d08b
BLAKE2b-256 checksum
How to use checksums
c24b6051d749bdb0c9a1d29dd811808545b8036f162e18de4d9c203f74e91318
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 21, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

0.1.1

2 release files

0.1.0

2 release files

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