gunicorn
django-silk
Our great sponsors
gunicorn | django-silk | |
---|---|---|
17 | 16 | |
9,494 | 4,244 | |
- | 1.1% | |
8.1 | 7.4 | |
3 days ago | 11 days ago | |
Python | Python | |
GNU General Public License v3.0 or later | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
gunicorn
-
Nginx Unit – Universal web app server
I'm hoping so – gunicorn has a long-open pull request that would fix `--reuse-port`, which currently does nothing
- SynchronousOnlyOperation from celery task using gevent execution pool on django orm
-
Deploying Django when using python-socketio
However, I'm curious about the best way to deploy, specifically with regard to WSGI. I've tried using the raw eventlet WSGI server (`eventlet.wsgi.server(eventlet.listen(("", 8000)), application)`). I then start it with `python manage.py runserver`. This has worked okay, but I'm unsure about how scalable it is. It seems like the standard stack is Django + Gunicorn + NGINX. Based on `python-socketio` documentation, this should be possible. I tried django + eventlet + gunicorn, but it seems like gunicorn a) [doesn't play nice with eventlet](https://github.com/benoitc/gunicorn/pull/2581) and b) only supports one worker. Gevent + Gunicorn doesn't have this bug, but still only supports one worker. Also, I'm not sure how actively maintained gevent is. So I'm not sure how scalable either Gunicorn + eventlet or Gunicorn + geventlet is as a WSGI server. So I'm not sure if Gunicorn is my best bet, or if it's too limited.
- The Django ecosystem is not so good
-
3 cool project ideas for Python programmers
For building your API, I recommend using the Flask library. It is very beginner-friendly, and you will be able to build a simple API in a matter of minutes! Keep in mind that, for a more serious project, you should definitely use something like gunicorn to run you API as a production server.
-
Django 4.1 Released
Interesting looks like it might actually be a python bug. Somehow just changing from sys.exit(0) -> os._exit(0) apparently fixes it.
-
Serverless Templates for AWS and Python
The cool thing is that you can easily migrate your WSGI- application such as Flask, Django, or Gunicorn to AWS.
-
Scope of database threads + connections + sessions
Yeah, that's kind of the impression I was getting. I stumbled across a github issue for gunicorn along these lines.
-
Running Django with Gunicorn - Best Practice
Taking a glimpse at gunicorn's code it looks like they pretty much all do the same: 2. seems to be creating a wsgi app using django's internals, and 3. uses 2.
django-silk
-
Show HN: Sqlbind a Python library to compose raw SQL
But that's still not backend-specific SQL?
There should be an interface method for this. Why does psycopg call it mogrify?
https://django-debug-toolbar.readthedocs.io/en/latest/panels... :
> debug_toolbar.panels.sql.SQLPanel: SQL queries including time to execute and links to EXPLAIN each query
But debug toolbars mostly don't work with APIs.
https://github.com/django-query-profiler/django-query-profil... :
> Django query profiler - one profiler to rule them all. Shows queries, detects N+1 and gives recommendations on how to resolve them
https://github.com/jazzband/django-silk :
> Silk is a live profiling and inspection tool for the Django framework. Silk intercepts and stores HTTP requests and database queries before presenting them in a user interface for further inspection
-
Understanding TTFB Latency in DJango - Seems absurdly slow after DB optimizations even locally
you're using DRF, which DDT doesn't work well with. DDT is more for template rendered pages, not API responses. Have you brought in Django silk for monitoring this?
-
The Django ecosystem is not so good
https://github.com/jazzband/django-silk/issues?q=is%3Aopen+is%3Aissue+label%3Abug
-
view fields depend on Enum value in Django admin
Are you using Django-silk? Googling for the error shows https://github.com/jazzband/django-silk/issues/374
-
How to view the number of queries executed in DRF.
Those docs are wrong. They still reference syncdb. Use the README at https://github.com/jazzband/django-silk.
-
Tracking Endpoint Access
Perhaps https://github.com/jazzband/django-silk?
- How can gather info about API Response status per user ?
-
I just updated my deep dive on how to optimize SQL queries with the Django ORM
If you're using Django as an API, without templates, django debug toolbar is useless because it requires templates. It won't work with DRF endpoints which means you miss out on profiling and SQL tracing. That's where django-silk shines.
-
Is there a notable performance difference between getting instance by get.(id=wanted_id) or using foreign key to get instance?
You can also install django-silk to profile your app, and play around with different implementations.
-
3% of 666 Python codebases we checked had a silently failing unit test
https://github.com/ansible-community/ara/pull/358 https://github.com/b12io/orchestra/pull/830 https://github.com/batiste/django-page-cms/pull/210 https://github.com/carpentries/amy/pull/2130 https://github.com/celery/django-celery/pull/612 https://github.com/django-cms/django-cms/pull/7241 https://github.com/django-oscar/django-oscar/pull/3867 https://github.com/esrg-knights/Squire/pull/253https://github.com/Frojd/django-react-templatetags/pull/64 https://github.com/groveco/django-sql-explorer/pull/474 https://github.com/jazzband/django-silk/pull/550 https://github.com/keras-team/keras/pull/16073 https://github.com/ministryofjustice/cla_backend/pull/773 https://github.com/nitely/Spirit/pull/306 https://github.com/python/pythondotorg/pull/1987 https://github.com/rapidpro/rapidpro/pull/1610 https://github.com/ray-project/ray/pull/22396 https://github.com/saltstack/salt/pull/61647 https://github.com/Swiss-Polar-Institute/project-application/pull/483 https://github.com/UEWBot/dipvis/pull/216
What are some alternatives?
waitress - Waitress - A WSGI server for Python 3
django-debug-toolbar - A configurable set of panels that display various debug information about the current request/response.
Werkzeug - The comprehensive WSGI web application library.
django-celery - Old Celery integration project for Django
bjoern - A screamingly fast Python 2/3 WSGI server written in C.
django-cms - The easy-to-use and developer-friendly enterprise CMS powered by Django
uwsgi - Official uWSGI docs, examples, tutorials, tips and tricks
django-oscar - Domain-driven e-commerce for Django
meinheld - Meinheld is a high performance asynchronous WSGI Web Server (based on picoev)
Ray - Ray is a unified framework for scaling AI and Python applications. Ray consists of a core distributed runtime and a set of AI Libraries for accelerating ML workloads.
hypercorn - Hypercorn is an ASGI and WSGI Server based on Hyper libraries and inspired by Gunicorn.
Spirit - Spirit is a modern Python based forum built on top of Django framework