{"id":32396232,"url":"https://github.com/alirn76/panther","last_synced_at":"2025-10-25T06:59:23.086Z","repository":{"id":229077388,"uuid":"462778762","full_name":"AliRn76/panther","owner":"AliRn76","description":"Fast \u0026 Friendly Web Framework For Building Async APIs With Python 3.10+","archived":false,"fork":false,"pushed_at":"2025-10-17T13:18:26.000Z","size":12303,"stargazers_count":349,"open_issues_count":6,"forks_count":19,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-10-18T16:45:39.347Z","etag":null,"topics":["framework","panther","python"],"latest_commit_sha":null,"homepage":"https://PantherPy.GitHub.io","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AliRn76.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"buy_me_a_coffee":"PantherPy"}},"created_at":"2022-02-23T14:51:09.000Z","updated_at":"2025-10-18T15:40:31.000Z","dependencies_parsed_at":"2024-04-26T09:39:43.792Z","dependency_job_id":"83704f6b-d46b-4bc9-840f-b747d97fddff","html_url":"https://github.com/AliRn76/panther","commit_stats":{"total_commits":300,"total_committers":8,"mean_commits":37.5,"dds":0.2733333333333333,"last_synced_commit":"1c96c4f67aa226d3479b726fe366db7dc620923c"},"previous_names":["alirn76/panther"],"tags_count":122,"template":false,"template_full_name":null,"purl":"pkg:github/AliRn76/panther","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AliRn76%2Fpanther","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AliRn76%2Fpanther/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AliRn76%2Fpanther/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AliRn76%2Fpanther/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AliRn76","download_url":"https://codeload.github.com/AliRn76/panther/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AliRn76%2Fpanther/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280917359,"owners_count":26413206,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-25T02:00:06.499Z","response_time":81,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["framework","panther","python"],"created_at":"2025-10-25T06:58:54.893Z","updated_at":"2025-10-25T06:59:23.081Z","avatar_url":"https://github.com/AliRn76.png","language":"Python","funding_links":["https://buymeacoffee.com/PantherPy"],"categories":[],"sub_categories":[],"readme":"[![PyPI](https://img.shields.io/pypi/v/panther?label=PyPI)](https://pypi.org/project/panther/) [![PyVersion](https://img.shields.io/pypi/pyversions/panther.svg)](https://pypi.org/project/panther/) [![codecov](https://codecov.io/github/AliRn76/panther/graph/badge.svg?token=YWFQA43GSP)](https://codecov.io/github/AliRn76/panther) [![Downloads](https://static.pepy.tech/badge/panther/month)](https://pepy.tech/project/panther) [![license](https://img.shields.io/github/license/alirn76/panther.svg)](https://github.com/alirn76/panther/blob/main/LICENSE)\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/AliRn76/panther/raw/master/docs/docs/images/logo-vertical.png\" alt=\"Panther Logo\" width=\"450\"\u003e\n  \n  # Panther \n  \n  **A Fast \u0026 Friendly Web Framework for Building Async APIs with Python 3.10+**\n  \n  [📚 Documentation](https://pantherpy.github.io)\n\u003c/div\u003e\n\n---\n\n## 🐾 Why Choose Panther?\n\nPanther is designed to be **fast**, **simple**, and **powerful**. Here's what makes it special:\n\n- **One of the fastest Python frameworks** available ([Benchmark](https://www.techempower.com/benchmarks/#section=data-r23\u0026l=zijzen-pa7\u0026c=4))\n- **File-based database** ([PantherDB](https://pypi.org/project/pantherdb/)) - No external database setup required\n- **Document-oriented ODM** - Supports MongoDB \u0026 PantherDB with familiar syntax\n- **API caching system** - In-memory and Redis support\n- **OpenAPI** - Auto-generated API documentation with multiple UI options\n- **WebSocket support** - Real-time communication out of the box\n- **Authentication \u0026 Permissions** - Built-in security features\n- **Background tasks** - Handle long-running operations\n- **Middleware \u0026 Throttling** - Extensible and configurable\n\n---\n\n## Quick Start\n\n### Installation\n\n```bash\npip install panther\n```\n\n- Create a `main.py` file with one of the examples below.\n\n### Your First API\n\nHere's a simple REST API endpoint that returns a \"Hello World\" message:\n\n```python\nfrom datetime import datetime, timedelta\nfrom panther import status, Panther\nfrom panther.app import GenericAPI\nfrom panther.openapi.urls import url_routing as openapi_url_routing\nfrom panther.response import Response\n\nclass HelloAPI(GenericAPI):\n    # Cache responses for 10 seconds\n    cache = timedelta(seconds=10)\n    \n    def get(self):\n        current_time = datetime.now().isoformat()\n        return Response(\n            data={'message': f'Hello from Panther! 🐾 | {current_time}'},\n            status_code=status.HTTP_200_OK\n        )\n\n# URL routing configuration\nurl_routing = {\n    '/': HelloAPI,\n    'docs/': openapi_url_routing,  # Auto-generated API docs\n}\n\n# Create your Panther app\napp = Panther(__name__, configs=__name__, urls=url_routing)\n```\n\n### WebSocket Echo Server\n\nHere's a simple WebSocket echo server that sends back any message it receives:\n\n```python\nfrom panther import Panther\nfrom panther.app import GenericAPI\nfrom panther.response import HTMLResponse\nfrom panther.websocket import GenericWebsocket\n\nclass EchoWebsocket(GenericWebsocket):\n    async def connect(self, **kwargs):\n        await self.accept()\n        await self.send(\"Connected to Panther WebSocket!\")\n    \n    async def receive(self, data: str | bytes):\n        # Echo back the received message\n        await self.send(f\"Echo: {data}\")\n\nclass WebSocketPage(GenericAPI):\n    def get(self):\n        template = \"\"\"\n        \u003ch2\u003e🐾 Panther WebSocket Echo Server\u003c/h2\u003e\n        \u003cinput id=\"msg\"\u003e\u003cbutton onclick=\"s.send(msg.value)\"\u003eSend\u003c/button\u003e\n        \u003cul id=\"log\"\u003e\u003c/ul\u003e\n        \u003cscript\u003e\n            const s = new WebSocket('ws://127.0.0.1:8000/ws');\n            s.onmessage = e =\u003e log.innerHTML += `\u003cli\u003e\u003c- ${msg.value}\u003c/li\u003e\u003cli\u003e-\u003e ${e.data}\u003c/li\u003e`;\n        \u003c/script\u003e\n        \"\"\"\n        return HTMLResponse(template)\n\nurl_routing = {\n    '': WebSocketPage,\n    'ws': EchoWebsocket,\n}\napp = Panther(__name__, configs=__name__, urls=url_routing)\n```\n\n### Run Your Application\n\n1. **Start the development server**\n   ```shell\n   $ panther run main:app\n   ```\n   \n2. **Test your application**\n    - For the _API_ example: Visit [http://127.0.0.1:8000/](http://127.0.0.1:8000/) to see the \"Hello World\" response\n    - For the _WebSocket_ example: Visit [http://127.0.0.1:8000/](http://127.0.0.1:8000/) and send a message.\n\n---\n\n## 🙏 Acknowledgments\n\n\u003cdiv align=\"center\"\u003e\n  \u003cp\u003eSupported by\u003c/p\u003e\n  \u003ca href=\"https://drive.google.com/file/d/17xe1hicIiRF7SQ-clg9SETdc19SktCbV/view?usp=sharing\"\u003e\n    \u003cimg alt=\"JetBrains\" src=\"https://github.com/AliRn76/panther/raw/master/docs/docs/images/jb_beam_50x50.png\"\u003e\n  \u003c/a\u003e\n\u003c/div\u003e\n\n---\n\n\u003cdiv align=\"center\"\u003e\n  \u003cp\u003e⭐️ If you find Panther useful, please give it a star!\u003c/p\u003e\n\u003c/div\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falirn76%2Fpanther","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falirn76%2Fpanther","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falirn76%2Fpanther/lists"}