django-statsd


Namedjango-statsd JSON
Version 2.5.2 PyPI version JSON
download
home_pagehttps://github.com/WoLpH/django-statsd
Summarydjango-statsd is a Django app that submits query and view durations to Etsy's statsd.
upload_time2020-05-03 19:18:27
maintainer
docs_urlhttps://pythonhosted.org/django-statsd/
authorRick van Hattem
requires_python
licenseBSD
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            Introduction
============

`django_statsd` is a middleware that uses `python-statsd` to log query
and view durations to statsd.

* Documentation
    - http://django-stats.readthedocs.org/en/latest/
* Source
    - https://github.com/WoLpH/django-statsd
* Bug reports
    - https://github.com/WoLpH/django-statsd/issues
* Package homepage
    - https://pypi.python.org/pypi/django-statsd
* Python Statsd
    - https://github.com/WoLpH/python-statsd
* Graphite
    - http://graphite.wikidot.com
* Statsd
    - code: https://github.com/etsy/statsd
    - blog post: http://codeascraft.etsy.com/2011/02/15/measure-anything-measure-everything/


Install
=======

To install simply execute `python setup.py install`.
If you want to run the tests first, run `python setup.py test`


Usage
=====

To install, add the following to your ``settings.py``:

1. ``django_statsd`` to the ``INSTALLED_APPS`` setting.
2. ``django_statsd.middleware.StatsdMiddleware`` to the **top** of your
    ``MIDDLEWARE_CLASSES``
3. ``django_statsd.middleware.StatsdMiddlewareTimer`` to the **bottom** of your
    ``MIDDLEWARE_CLASSES``

Configuration
-------------
You can configure ``django-statsd`` using the Django settings config:

    >>> # Settings
    ... STATSD_HOST = '127.0.0.1'
    ... STATSD_PORT = 12345

The full list of configurations is available in ReadTheDocs_.

.. _ReadTheDocs: https://django-stats.readthedocs.io/en/latest/django_statsd.html#module-django_statsd.settings


Advanced Usage
--------------

    >>> def some_view(request):
    ...     with request.timings('something_to_time'):
    ...         # do something here
    ...         pass
    >>>
    >>> def some_view(request):
    ...     request.timings.start('something_to_time')
    ...     # do something here
    ...     request.timings.stop('something_to_time')

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/WoLpH/django-statsd",
    "name": "django-statsd",
    "maintainer": "",
    "docs_url": "https://pythonhosted.org/django-statsd/",
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "",
    "author": "Rick van Hattem",
    "author_email": "Rick.van.Hattem@Fawo.nl",
    "download_url": "https://files.pythonhosted.org/packages/0f/54/17d4a458a84ce02450cd4fa9672a6225d257fed1f506505612707ed6efd7/django-statsd-2.5.2.tar.gz",
    "platform": "",
    "description": "Introduction\n============\n\n`django_statsd` is a middleware that uses `python-statsd` to log query\nand view durations to statsd.\n\n* Documentation\n    - http://django-stats.readthedocs.org/en/latest/\n* Source\n    - https://github.com/WoLpH/django-statsd\n* Bug reports\n    - https://github.com/WoLpH/django-statsd/issues\n* Package homepage\n    - https://pypi.python.org/pypi/django-statsd\n* Python Statsd\n    - https://github.com/WoLpH/python-statsd\n* Graphite\n    - http://graphite.wikidot.com\n* Statsd\n    - code: https://github.com/etsy/statsd\n    - blog post: http://codeascraft.etsy.com/2011/02/15/measure-anything-measure-everything/\n\n\nInstall\n=======\n\nTo install simply execute `python setup.py install`.\nIf you want to run the tests first, run `python setup.py test`\n\n\nUsage\n=====\n\nTo install, add the following to your ``settings.py``:\n\n1. ``django_statsd`` to the ``INSTALLED_APPS`` setting.\n2. ``django_statsd.middleware.StatsdMiddleware`` to the **top** of your\n    ``MIDDLEWARE_CLASSES``\n3. ``django_statsd.middleware.StatsdMiddlewareTimer`` to the **bottom** of your\n    ``MIDDLEWARE_CLASSES``\n\nConfiguration\n-------------\nYou can configure ``django-statsd`` using the Django settings config:\n\n    >>> # Settings\n    ... STATSD_HOST = '127.0.0.1'\n    ... STATSD_PORT = 12345\n\nThe full list of configurations is available in ReadTheDocs_.\n\n.. _ReadTheDocs: https://django-stats.readthedocs.io/en/latest/django_statsd.html#module-django_statsd.settings\n\n\nAdvanced Usage\n--------------\n\n    >>> def some_view(request):\n    ...     with request.timings('something_to_time'):\n    ...         # do something here\n    ...         pass\n    >>>\n    >>> def some_view(request):\n    ...     request.timings.start('something_to_time')\n    ...     # do something here\n    ...     request.timings.stop('something_to_time')\n",
    "bugtrack_url": null,
    "license": "BSD",
    "summary": "django-statsd is a Django app that submits query and view durations to Etsy's statsd.",
    "version": "2.5.2",
    "project_urls": {
        "Homepage": "https://github.com/WoLpH/django-statsd"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7a06d0340f12a7a949d927ee9f34b6e706993f3702f8db9f2214c90d3cb156d1",
                "md5": "54a593144840c7654ab33ae1617a95ea",
                "sha256": "e11a6a47cce17ec5bab2e44fb05333527342ef115c4cc7e573eccba9a0012f28"
            },
            "downloads": -1,
            "filename": "django_statsd-2.5.2-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "54a593144840c7654ab33ae1617a95ea",
            "packagetype": "bdist_wheel",
            "python_version": "3.8",
            "requires_python": null,
            "size": 10024,
            "upload_time": "2020-05-03T19:18:29",
            "upload_time_iso_8601": "2020-05-03T19:18:29.252733Z",
            "url": "https://files.pythonhosted.org/packages/7a/06/d0340f12a7a949d927ee9f34b6e706993f3702f8db9f2214c90d3cb156d1/django_statsd-2.5.2-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0f5417d4a458a84ce02450cd4fa9672a6225d257fed1f506505612707ed6efd7",
                "md5": "f5bf8dceb8ab14c4aab3320aa4ccb0c7",
                "sha256": "0be61db6bafb5eb16b2e81a095fc228fb2419da2fb8aa78916e25e850bc130a7"
            },
            "downloads": -1,
            "filename": "django-statsd-2.5.2.tar.gz",
            "has_sig": false,
            "md5_digest": "f5bf8dceb8ab14c4aab3320aa4ccb0c7",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 8754,
            "upload_time": "2020-05-03T19:18:27",
            "upload_time_iso_8601": "2020-05-03T19:18:27.003979Z",
            "url": "https://files.pythonhosted.org/packages/0f/54/17d4a458a84ce02450cd4fa9672a6225d257fed1f506505612707ed6efd7/django-statsd-2.5.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2020-05-03 19:18:27",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "WoLpH",
    "github_project": "django-statsd",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "django-statsd"
}
        
Elapsed time: 0.15995s