django-statsd


Namedjango-statsd JSON
Version 2.7.0 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_time2024-07-21 01:40:45
maintainerNone
docs_urlhttps://pythonhosted.org/django-statsd/
authorRick van Hattem
requires_pythonNone
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``
3. ``django_statsd.middleware.StatsdMiddlewareTimer`` to the **bottom** of your
    ``MIDDLEWARE``

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": null,
    "docs_url": "https://pythonhosted.org/django-statsd/",
    "requires_python": null,
    "maintainer_email": null,
    "keywords": null,
    "author": "Rick van Hattem",
    "author_email": "Rick.van.Hattem@Fawo.nl",
    "download_url": "https://files.pythonhosted.org/packages/e9/59/ac390fc0d25de648151bf99db60eadea15d2537654cbfed35c58f950585b/django_statsd-2.7.0.tar.gz",
    "platform": null,
    "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``\n3. ``django_statsd.middleware.StatsdMiddlewareTimer`` to the **bottom** of your\n    ``MIDDLEWARE``\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.7.0",
    "project_urls": {
        "Homepage": "https://github.com/WoLpH/django-statsd"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0be2c0cf683078fe5dc56349a74d2e2271abd74930d3e0c26d1ea9ffcfaf80fa",
                "md5": "91dcc2f7de74591711bca876ea27db2a",
                "sha256": "6f59bcfbbdf0fe204e01a0cdc2e4ab279e1261fa19a4d1f32acb0a74dcc28e12"
            },
            "downloads": -1,
            "filename": "django_statsd-2.7.0-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "91dcc2f7de74591711bca876ea27db2a",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": null,
            "size": 9305,
            "upload_time": "2024-07-21T01:40:44",
            "upload_time_iso_8601": "2024-07-21T01:40:44.062032Z",
            "url": "https://files.pythonhosted.org/packages/0b/e2/c0cf683078fe5dc56349a74d2e2271abd74930d3e0c26d1ea9ffcfaf80fa/django_statsd-2.7.0-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e959ac390fc0d25de648151bf99db60eadea15d2537654cbfed35c58f950585b",
                "md5": "ff5476f4d4def7c8e7c72d51dd56b183",
                "sha256": "573a97aadd1881d223632d8671d1f819f13af2c14611528ff642f97a8b19cca5"
            },
            "downloads": -1,
            "filename": "django_statsd-2.7.0.tar.gz",
            "has_sig": false,
            "md5_digest": "ff5476f4d4def7c8e7c72d51dd56b183",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 9250,
            "upload_time": "2024-07-21T01:40:45",
            "upload_time_iso_8601": "2024-07-21T01:40:45.684942Z",
            "url": "https://files.pythonhosted.org/packages/e9/59/ac390fc0d25de648151bf99db60eadea15d2537654cbfed35c58f950585b/django_statsd-2.7.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-07-21 01:40:45",
    "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.24477s