Introduction
Panther#
A Fast & Friendly Web Framework for Building Async APIs with Python 3.10+
🐾 Why Choose Panther?#
Panther is designed to be fast, simple, and powerful. Here's what makes it special:
- One of the fastest Python frameworks available
- File-based database (PantherDB) - No external database setup required
- Document-oriented ODM - Supports MongoDB & PantherDB with familiar syntax
- API caching system - In-memory and Redis support
- OpenAPI/Swagger - Auto-generated API documentation
- WebSocket support - Real-time communication out of the box
- Authentication & Permissions - Built-in security features
- Background tasks - Handle long-running operations
- Middleware & Throttling - Extensible and configurable
Benchmark#
Supported by#

Installation#
$ pip install panther
Getting Started#
Quick Start Guide#
-
Create a new project directory
$ mkdir my_panther_app $ cd my_panther_app
-
Set up your environment
$ python3 -m venv .venv $ source .venv/bin/activate # On Windows: .\.venv\Scripts\activate $ pip install panther
-
Create your first application
Create a
main.py
file with one of the examples below.
Basic API Example#
Here's a simple REST API endpoint that returns a "Hello World" message:
main.py | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
|
WebSocket Example#
Here's a simple WebSocket echo server that sends back any message it receives:
main.py | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
|
Running Your Application#
-
Start the development server
$ panther run main:app --reload
Note: Panther uses Uvicorn as the default ASGI server, but you can also use Granian, Daphne, or any ASGI-compatible server.
-
Test your application
- For the API example: Visit http://127.0.0.1:8000/ to see the "Hello World" response
- For the WebSocket example: Visit http://127.0.0.1:8000/ and send a message.