panther
Fast & Friendly Web Framework For Building Async APIs With Python 3.10+
Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (15.7%) to scientific vocabulary
Keywords
Repository
Fast & Friendly Web Framework For Building Async APIs With Python 3.10+
Basic Info
- Host: GitHub
- Owner: AliRn76
- License: bsd-3-clause
- Language: Python
- Default Branch: master
- Homepage: https://PantherPy.GitHub.io
- Size: 11.7 MB
Statistics
- Stars: 342
- Watchers: 8
- Forks: 19
- Open Issues: 6
- Releases: 1
Topics
Metadata Files
README.md
# Panther
**A Fast & Friendly Web Framework for Building Async APIs with Python 3.10+**
[📚 Documentation](https://pantherpy.github.io)
🐾 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 (Benchmark)
- 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 - Auto-generated API documentation with multiple UI options
- 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
Quick Start
Installation
bash
pip install panther
- Create a
main.pyfile with one of the examples below.
Your First API
Here's a simple REST API endpoint that returns a "Hello World" message:
```python from datetime import datetime, timedelta from panther import status, Panther from panther.app import GenericAPI from panther.openapi.urls import urlrouting as openapiurl_routing from panther.response import Response
class HelloAPI(GenericAPI): # Cache responses for 10 seconds cache = timedelta(seconds=10)
def get(self):
current_time = datetime.now().isoformat()
return Response(
data={'message': f'Hello from Panther! 🐾 | {current_time}'},
status_code=status.HTTP_200_OK
)
URL routing configuration
urlrouting = { '/': HelloAPI, 'docs/': openapiurl_routing, # Auto-generated API docs }
Create your Panther app
app = Panther(name, configs=name, urls=url_routing) ```
WebSocket Echo Server
Here's a simple WebSocket echo server that sends back any message it receives:
```python from panther import Panther from panther.app import GenericAPI from panther.response import HTMLResponse from panther.websocket import GenericWebsocket
class EchoWebsocket(GenericWebsocket): async def connect(self, **kwargs): await self.accept() await self.send("Connected to Panther WebSocket!")
async def receive(self, data: str | bytes):
# Echo back the received message
await self.send(f"Echo: {data}")
class WebSocketPage(GenericAPI): def get(self): template = """
🐾 Panther WebSocket Echo Server
urlrouting = { '': WebSocketPage, 'ws': EchoWebsocket, } app = Panther(name, configs=name, urls=urlrouting) ```
Run Your Application
Start the development server
shell $ panther run main:appTest 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.
🙏 Acknowledgments
⭐️ If you find Panther useful, please give it a star!
Owner
- Name: Ali RajabNezhad
- Login: AliRn76
- Kind: user
- Repositories: 77
- Profile: https://github.com/AliRn76
Born to code, Forced to work
GitHub Events
Total
- Issues event: 1
- Watch event: 78
- Delete event: 20
- Issue comment event: 14
- Push event: 115
- Pull request review comment event: 5
- Pull request review event: 7
- Pull request event: 59
- Fork event: 6
- Create event: 41
Last Year
- Issues event: 1
- Watch event: 78
- Delete event: 20
- Issue comment event: 14
- Push event: 115
- Pull request review comment event: 5
- Pull request review event: 7
- Pull request event: 59
- Fork event: 6
- Create event: 41
Committers
Last synced: over 2 years ago
Top Committers
| Name | Commits | |
|---|---|---|
| AliRn | a****6@y****m | 218 |
| AliRn | a****7@g****m | 52 |
| MahanBi | D****r@g****m | 16 |
| MahanBi | d****r@g****m | 9 |
| Vahid Fathi | v****0@g****m | 2 |
| Satyajeet Sahu | s****p@g****m | 1 |
| Amin Aminian | 4****n | 1 |
| Okware Dedan | 1****c | 1 |
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 13
- Total pull requests: 109
- Average time to close issues: 15 days
- Average time to close pull requests: 9 days
- Total issue authors: 9
- Total pull request authors: 10
- Average comments per issue: 1.38
- Average comments per pull request: 0.36
- Merged pull requests: 89
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 1
- Pull requests: 23
- Average time to close issues: N/A
- Average time to close pull requests: 12 days
- Issue authors: 1
- Pull request authors: 3
- Average comments per issue: 0.0
- Average comments per pull request: 0.04
- Merged pull requests: 18
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- 0keeper1 (2)
- djkemmet (2)
- everythingability (2)
- aka-deVOID (2)
- Arian-p1 (1)
- satyahbp (1)
- BenGix (1)
- nimiology (1)
- vahidfathi (1)
- iamamirhossein (1)
Pull Request Authors
- AliRn76 (101)
- MahanBi (13)
- BenGix (11)
- 0keeper1 (7)
- aminiun (7)
- Arian-p1 (7)
- mahdikalhor1 (2)
- amirreza8002 (2)
- satyahbp (1)
- SoftCysec (1)
- praktikdev (1)
- vahidfathi (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 2
-
Total downloads:
- pypi 702 last-month
-
Total dependent packages: 0
(may contain duplicates) -
Total dependent repositories: 3
(may contain duplicates) - Total versions: 145
- Total maintainers: 1
pypi.org: panther
Fast & Friendly, Web Framework For Building Async APIs
- Homepage: https://github.com/alirn76/panther
- Documentation: https://panther.readthedocs.io/
- License: BSD-3-Clause license
-
Latest release: 5.0.2
published 7 months ago
Rankings
Maintainers (1)
pypi.org: actiontest112
Fast & Friendly, Web Framework For Building Async APIs
- Homepage: https://github.com/alirn76/panther
- Documentation: https://actiontest112.readthedocs.io/
- License: MIT
-
Latest release: 4
published almost 3 years ago
Rankings
Maintainers (1)
Dependencies
- actions/checkout v3 composite
- actions/setup-python v4 composite
- supercharge/mongodb-github-action 1.10.0 composite
- actions/checkout v3 composite
- actions/setup-python v4 composite
- codecov/codecov-action v3 composite
- pypa/gh-action-pypi-publish master composite
- supercharge/mongodb-github-action 1.10.0 composite
- panther *
- coverage *
- cryptography *
- faker *
- pymongo *
- pytest *
- python-jose *
- websockets *
- httptools *
- pantherdb ==1.4.0
- pydantic *
- rich *
- uvicorn *
- watchfiles *