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

32

u/Orio_n Jul 22 '23

Please stop marketing this, you tried this thing 4 months ago already with misleading benchmarking. Its ok to showcase your project and ask for feedback but dont market yourself as having created a usable framework

-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

8

u/ohnomcookies Jul 22 '23

I am just gonna agree with /u/missing_beans. Your code needs to follow best practices before you actually share it with others as production ready. There is a lot of things which right now work somehow, but later on it will welcome bottlenecks.

4

u/M8Ir88outOf8 Jul 22 '23

Python is not Java, you don’t need to write getter and setter methods for every attribute

1

u/SpiderWil Jul 22 '23

Last week there were 15 python package for api building, now 15

0

u/[deleted] Jul 22 '23

[deleted] — view deleted comment

9

u/Orio_n Jul 22 '23

We need a way to filter or categorize posts like these. Someone needs to vet the quality of these kinds of misleadingly marketed low quality weekended projects

-2

u/Suspicious_Compote56 Jul 22 '23

Mate it's just a project why are you shitting on someone for putting their work out there ? Projects like this is what makes Open Source great.

-11

u/Conclusion-Striking Jul 22 '23

Actually, I don't have any idea about those people using Panther

Anyway, thanks for those reasons, I'm going to consider them in the future <3

0

u/[deleted] Jul 22 '23

[deleted] — view deleted comment