Skip to main content

Django simple profiler it is a useful tool for Django framework that allows you to profile your views.

Project description

Django simple profiler

Django simple profiler it is a useful tool for Django framework that allows you to profiling your views.

Example of use:

  • decorate your views
  • use as context manager

Requires DEBUG=True in settings.py (!)

https://github.com/Sobolev5/django-simple-profiler

How to install it

To install run:

pip install django-simple-profiler

example.py

from django.http import HttpResponse
from django_simple_profiler import django_profiler # as decorator
from django_simple_profiler import DjangoProfiler # as context manager


@django_profiler
def get_countries(request):
    for country in Country.objects.all():
        print(country)
    return HttpResponse("OK")

def get_countries(request):
    with DjangoProfiler() as dp:
        for country in Country.objects.all():
            print(country)
    return HttpResponse("OK")

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for django-simple-profiler, version 0.1.4
Filename, size File type Python version Upload date Hashes
Filename, size django_simple_profiler-0.1.4-py3-none-any.whl (4.5 kB) File type Wheel Python version py3 Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page