Introduction
Panther#
A Fast & Friendly Web Framework for Building Async APIs with Python 3.10+
Why Choose Panther?#
- One of the fastest Python frameworks available
- Built-in file-based database (PantherDB)
- Built-in document-oriented database ODM (Supports MongoDB & PantherDB)
- Built-in API caching system (Supports in-memory & Redis)
- Built-in support of OpenAPI (swagger)
- Built-in Admin Panel
- Native WebSocket support
- Integrated authentication classes
- Built-in permission handling
- Supports custom background tasks, middlewares, and throttling
- Offers both function-based and class-based APIs
- Real-time API monitoring in the terminal
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 |
|
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 |
|
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.