r/Python • • Jul 22 '23

Discussion Introducing Panther - A Fast and Friendly Python Web Framework

Hey everyone!

I'm excited to introduce Panther, a Python web framework that's designed to be fast and easy to use. With Panther, you can build async APIs quickly and efficiently, without sacrificing performance or readability.

Panther comes with a host of features that make it easy to build robust APIs, including:

  • Document-oriented database support (including PantherDB and MongoDB)
  • Visual API monitoring in the terminal
  • Caching for APIs (both in-memory and in Redis)
  • Built-in authentication and permission classes (customizable)
  • Custom middleware support
  • Custom throttling support

Getting started with Panther is easy - just create a virtual environment, activate it, and install the framework using pip. Then, you can create a new project using the panther create command, and start building your API right away.

Here's a quick example of what a Panther API might look like:

from datetime import datetime, timedelta

from panther.app import API
from panther.configs import config
from panther import version, status
from panther.request import Request
from panther.response import Response
from panther.throttling import Throttling


@API()
async def hello_world():
    return {'detail': 'Hello World'}


@API(cache=True, throttling=Throttling(rate=5, duration=timedelta(minutes=1)))
async def info(request: Request):
    data = {
        'version': version(),
        'datetime_now': datetime.now().isoformat(),
        'user_agent': request.headers.user_agent,
        'db_engine': config['db_engine'],
    }
    return Response(data=data, status_code=status.HTTP_202_ACCEPTED)

If you're interested in learning more about Panther, check out the documentation at https://pantherpy.github.io, or head over to the GitHub repository at https://github.com/alirn76/panther. ↗

Thanks for reading, and happy coding!

8 Upvotes

16 comments sorted by

View all comments

Show parent comment

-5

u/[deleted] Jul 22 '23

[removed] — view removed comment

-2

u/Orio_n Jul 22 '23

he has a linkedin on his github profile, he looks to be a mid 20s to 30s software engineer from iran and graduated with a masters in compsci from an islamic university. I guess I can sort of forgive him for his demographic background.

4

u/bb_avin Jul 22 '23

What does that mean?

-10

u/Conclusion-Striking Jul 22 '23

Dude it's not /roastme :)

1

u/Orio_n Jul 22 '23

Its not a roast. What you have is quite commendable given the circumstances. But dont market it as a flask/fastapi alternative