django-simple-profiler-0.5.1


توضیحات

Django simple profiler it is a useful tool for Django framework that allows you to profile your views.
ویژگی مقدار
سیستم عامل OS Independent
نام فایل django-simple-profiler-0.5.1
نام django-simple-profiler
نسخه کتابخانه 0.5.1
نگهدارنده []
ایمیل نگهدارنده []
نویسنده Sobolev Andrey
ایمیل نویسنده email.asobolev@gmail.com
آدرس صفحه اصلی https://github.com/Sobolev5/django-simple-profiler
آدرس اینترنتی https://pypi.org/project/django-simple-profiler/
مجوز -
# 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 (!) ```no-highlight https://github.com/Sobolev5/django-simple-profiler ``` # How to install it To install run: ```no-highlight pip install django-simple-profiler ``` # example.py ```python from django_simple_profiler import django_profiler # as decorator from django_simple_profiler import django_profiler_full # as decorator with full queries 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") @django_profiler_full def get_countries(request): for country in Country.objects.all(): print(country) return HttpResponse("OK") def get_countries(request): # simple with DjangoProfiler() as dp: for country in Country.objects.all(): print(country) # full queries with DjangoProfiler(full=True) as dp: for country in Country.objects.all(): print(country) # with label with DjangoProfiler(label="ActiveCountries") as dp: for country in Country.objects.filter(active=True): print(country) # with label and full queries with DjangoProfiler(label="ActiveCountries", full=True) as dp: for country in Country.objects.filter(active=True): print(country) return HttpResponse("OK") ``` ![](https://github.com/Sobolev5/django-simple-profiler/blob/master/screenshots/screen.png) ## P.S. Try my free service for developers [Workhours.space](https://workhours.space/). It's time tracker with simple interface, powerful functionality such as automatic payroll calculation, telegram bot timer, easy web2 and web3 auth and more. Enjoy.


نیازمندی

مقدار نام
- terminaltables
- psutil


زبان مورد نیاز

مقدار نام
>=3.9 Python


نحوه نصب


نصب پکیج whl django-simple-profiler-0.5.1:

    pip install django-simple-profiler-0.5.1.whl


نصب پکیج tar.gz django-simple-profiler-0.5.1:

    pip install django-simple-profiler-0.5.1.tar.gz