django-memcache-status


Namedjango-memcache-status JSON
Version 2.3 PyPI version JSON
download
home_pagehttps://github.com/bartTC/django-memcache-status
Summary"A django application that displays the load and other statistics about your memcached instances in the admin."
upload_time2023-04-29 11:37:09
maintainer
docs_urlNone
authorMartin Mahner
requires_python>=3.8
licenseMIT
keywords django cache memcache memcached statistics
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            .. image:: https://img.shields.io/pypi/v/django-memcache-status.svg
    :target: https://pypi.org/project/django-memcache-status/

-----

======================
django-memcache-status
======================

This app displays the current load and some statistics for your memcached_
instances in the index view of your Django admin section.

Currently these memcached bindings are tested:

========================================================= ================================
Backend                                                   Support
========================================================= ================================
``django.core.cache.backends.memcached.PyLibMCCache``      ✅ Works fine
``django.core.cache.backends.memcached.PyMemcacheCache``   ❎ Does not provide stats
========================================================= ================================

Other bindings may provide statistics too.

.. _memcached: http://www.danga.com/memcached/

Compatibility Matrix:
=====================

========= === === ==== ====
Py/Dj     3.8 3.9 3.10 3.11
========= === === ==== ====
3.2 (LTS)  ✓   ✓   ✓    ✓
4.0        ✓   ✓   ✓    ✓
4.1        ✓   ✓   ✓    ✓
4.2 (LTS)  ✓   ✓   ✓    ✓
========= === === ==== ====


Installation
============

First add ``memcache_status`` to your ``INSTALLED_APPS`` list.

::

    INSTALLED_APPS = [
        # ...
        'memcache_status',
    ]

Then you have two options:

1) The quickest way is to replace your Django Admin index page with the one
   provided by django-memcache-status. This will show the memcache stats in the
   top left column. This was the regular behavior of django-memcache-status
   prior to version 2.0.

   Place this in any ``admin.py`` file of your project::

    from django.contrib import admin
    admin.site.index_template = 'memcache_status/admin_index.html'


2) If you need to manually place the stats, simply add the CSS file and include
   the memcache-status template anywhere you like::

    <link rel="stylesheet" href="{% static "memcache_status.css" %}"/>
    {% include "memcache_status/memcache_status.html" %}


Local Development
=================

Install the package using Pipenv and run the tests::

    $ pipenv install --dev
    $ pipenv run test

You can test against a matrix of Python and Django versions using tox::

    $ tox

Once run you will see a coverage report in `/tmp/coverage_report/django-memcache-status`.

You can run a local runserver with the test application to see the
admin::

    $ pipenv run django-admin.py migrate
    $ pipenv run django-admin.py createsuperuser
    $ pipenv run django-admin.py runserver

To test a specific cache backend define it in the env variable::

    $ TEST_CACHE_BACKEND=django-pylibmc pipenv run django-admin.py runserver


.. note:: If you're testing pylibmc on OS X and you get an error like
    ``'libmemcached/memcached.h' file not found``, install pylibmc manually,
    then run the installation again::

    $ brew install libmemcached
    $ pipenv run pip install pylibmc --install-option="--with-libmemcached=/usr/local/Cellar/libmemcached/1.0.18_2/"
    $ pipenv install --dev

----

Changelog
=========

**v2.3 (2023-04-30):**

- Compatibility and tests for Django 3.2 to 4.2, and Python 3.11.
- Dropped support for Django 2.2.

**v2.2 (2020-02-05):**

- Compatibility and tests for Django 2.2 and 3.0, and Python 3.8.
- Use pytest for testing.

**v2.1 (2019-03-21):**

- Removed some deprecated django-debug-toolbar and pre-Django 1.11
  related workarounds.
- More comprehensive unittests across all backends and it's relation
  with django-debug-toolbar.

**v2.0 (2019-03-16):**

- Compatibility and tests for Django 1.11 → 2.1 and Python 2.7 → 3.7.
- Full code cleanup and update to latest standards.
- Tested against a variety of memcache bindings.
- Pipenv support for local development and testing.
- *[Backwards Incompatible]* memcache-status no longer automatically overwrites
  the admin index template to add the stats. Instead you have the option to
  either  manually display the stats anywhere you like using a template include,
  or use the contributed memcache-status admin index page that overwrites the
  vanilla Django template and adds statistics to the top left admin index page.
  This was the regular behavior of django-memcache-status prior to version 2.0.

**v1.3 (2016-10-13):**

- Django 1.10 compatibility and test integration. Python 3 compatibility.

**v1.2 (2009-11-06):**

- Unittests, General code cleanup to support Django 1.8+ features such as
- AppConfig, Django-Debugtoolbar support, Python3 Support, Compatibility tests
- with latest supported Django versions (currently Django 1.8 and 1.9) but the
- package is likely working with Django 1.4+.

**v1.1 (2009-06-29):**

- Added support for Django's multiple cache backend setting. Kudos to Luke
  Granger-Brown for the implementation.
- This version is compatible with Django v1.3 and up.

**v1.0 (2009-04-30):**

- Initial Release.
- This version is compatible up to Django v1.2.

----

Screenshots
===========

.. image:: https://user-images.githubusercontent.com/1896/54476030-f0dd3080-47f8-11e9-8399-b11f3bf15ebc.png
   :target: https://user-images.githubusercontent.com/1896/54476030-f0dd3080-47f8-11e9-8399-b11f3bf15ebc.png
   :align: left
   :height: 200px

.. image:: https://user-images.githubusercontent.com/1896/54476031-f470b780-47f8-11e9-842f-95d880563a53.png
   :target: https://user-images.githubusercontent.com/1896/54476031-f470b780-47f8-11e9-842f-95d880563a53.png
   :height: 300px

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/bartTC/django-memcache-status",
    "name": "django-memcache-status",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "django,cache,memcache,memcached,statistics",
    "author": "Martin Mahner",
    "author_email": "martin@mahner.org",
    "download_url": "https://files.pythonhosted.org/packages/13/57/662839fad07b99efed3725d82dbbfe2a0a266cf0e037dac212e10de4125e/django-memcache-status-2.3.tar.gz",
    "platform": null,
    "description": ".. image:: https://img.shields.io/pypi/v/django-memcache-status.svg\n    :target: https://pypi.org/project/django-memcache-status/\n\n-----\n\n======================\ndjango-memcache-status\n======================\n\nThis app displays the current load and some statistics for your memcached_\ninstances in the index view of your Django admin section.\n\nCurrently these memcached bindings are tested:\n\n========================================================= ================================\nBackend                                                   Support\n========================================================= ================================\n``django.core.cache.backends.memcached.PyLibMCCache``      \u2705 Works fine\n``django.core.cache.backends.memcached.PyMemcacheCache``   \u274e Does not provide stats\n========================================================= ================================\n\nOther bindings may provide statistics too.\n\n.. _memcached: http://www.danga.com/memcached/\n\nCompatibility Matrix:\n=====================\n\n========= === === ==== ====\nPy/Dj     3.8 3.9 3.10 3.11\n========= === === ==== ====\n3.2 (LTS)  \u2713   \u2713   \u2713    \u2713\n4.0        \u2713   \u2713   \u2713    \u2713\n4.1        \u2713   \u2713   \u2713    \u2713\n4.2 (LTS)  \u2713   \u2713   \u2713    \u2713\n========= === === ==== ====\n\n\nInstallation\n============\n\nFirst add ``memcache_status`` to your ``INSTALLED_APPS`` list.\n\n::\n\n    INSTALLED_APPS = [\n        # ...\n        'memcache_status',\n    ]\n\nThen you have two options:\n\n1) The quickest way is to replace your Django Admin index page with the one\n   provided by django-memcache-status. This will show the memcache stats in the\n   top left column. This was the regular behavior of django-memcache-status\n   prior to version 2.0.\n\n   Place this in any ``admin.py`` file of your project::\n\n    from django.contrib import admin\n    admin.site.index_template = 'memcache_status/admin_index.html'\n\n\n2) If you need to manually place the stats, simply add the CSS file and include\n   the memcache-status template anywhere you like::\n\n    <link rel=\"stylesheet\" href=\"{% static \"memcache_status.css\" %}\"/>\n    {% include \"memcache_status/memcache_status.html\" %}\n\n\nLocal Development\n=================\n\nInstall the package using Pipenv and run the tests::\n\n    $ pipenv install --dev\n    $ pipenv run test\n\nYou can test against a matrix of Python and Django versions using tox::\n\n    $ tox\n\nOnce run you will see a coverage report in `/tmp/coverage_report/django-memcache-status`.\n\nYou can run a local runserver with the test application to see the\nadmin::\n\n    $ pipenv run django-admin.py migrate\n    $ pipenv run django-admin.py createsuperuser\n    $ pipenv run django-admin.py runserver\n\nTo test a specific cache backend define it in the env variable::\n\n    $ TEST_CACHE_BACKEND=django-pylibmc pipenv run django-admin.py runserver\n\n\n.. note:: If you're testing pylibmc on OS X and you get an error like\n    ``'libmemcached/memcached.h' file not found``, install pylibmc manually,\n    then run the installation again::\n\n    $ brew install libmemcached\n    $ pipenv run pip install pylibmc --install-option=\"--with-libmemcached=/usr/local/Cellar/libmemcached/1.0.18_2/\"\n    $ pipenv install --dev\n\n----\n\nChangelog\n=========\n\n**v2.3 (2023-04-30):**\n\n- Compatibility and tests for Django 3.2 to 4.2, and Python 3.11.\n- Dropped support for Django 2.2.\n\n**v2.2 (2020-02-05):**\n\n- Compatibility and tests for Django 2.2 and 3.0, and Python 3.8.\n- Use pytest for testing.\n\n**v2.1 (2019-03-21):**\n\n- Removed some deprecated django-debug-toolbar and pre-Django 1.11\n  related workarounds.\n- More comprehensive unittests across all backends and it's relation\n  with django-debug-toolbar.\n\n**v2.0 (2019-03-16):**\n\n- Compatibility and tests for Django 1.11 \u2192 2.1 and Python 2.7 \u2192 3.7.\n- Full code cleanup and update to latest standards.\n- Tested against a variety of memcache bindings.\n- Pipenv support for local development and testing.\n- *[Backwards Incompatible]* memcache-status no longer automatically overwrites\n  the admin index template to add the stats. Instead you have the option to\n  either  manually display the stats anywhere you like using a template include,\n  or use the contributed memcache-status admin index page that overwrites the\n  vanilla Django template and adds statistics to the top left admin index page.\n  This was the regular behavior of django-memcache-status prior to version 2.0.\n\n**v1.3 (2016-10-13):**\n\n- Django 1.10 compatibility and test integration. Python 3 compatibility.\n\n**v1.2 (2009-11-06):**\n\n- Unittests, General code cleanup to support Django 1.8+ features such as\n- AppConfig, Django-Debugtoolbar support, Python3 Support, Compatibility tests\n- with latest supported Django versions (currently Django 1.8 and 1.9) but the\n- package is likely working with Django 1.4+.\n\n**v1.1 (2009-06-29):**\n\n- Added support for Django's multiple cache backend setting. Kudos to Luke\n  Granger-Brown for the implementation.\n- This version is compatible with Django v1.3 and up.\n\n**v1.0 (2009-04-30):**\n\n- Initial Release.\n- This version is compatible up to Django v1.2.\n\n----\n\nScreenshots\n===========\n\n.. image:: https://user-images.githubusercontent.com/1896/54476030-f0dd3080-47f8-11e9-8399-b11f3bf15ebc.png\n   :target: https://user-images.githubusercontent.com/1896/54476030-f0dd3080-47f8-11e9-8399-b11f3bf15ebc.png\n   :align: left\n   :height: 200px\n\n.. image:: https://user-images.githubusercontent.com/1896/54476031-f470b780-47f8-11e9-842f-95d880563a53.png\n   :target: https://user-images.githubusercontent.com/1896/54476031-f470b780-47f8-11e9-842f-95d880563a53.png\n   :height: 300px\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "\"A django application that displays the load and other statistics about your memcached instances in the admin.\"",
    "version": "2.3",
    "project_urls": {
        "Homepage": "https://github.com/bartTC/django-memcache-status"
    },
    "split_keywords": [
        "django",
        "cache",
        "memcache",
        "memcached",
        "statistics"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d10894864bbd861dbd73247c9613b58eb734b3bca076bf1ab7eec7f41bb34814",
                "md5": "b6dc1062f852deb8178cf7687399fa43",
                "sha256": "6d0f19632c27dc8f93aaf7d5f4dbe2a9d1b3e0f457d8d2a01d97f5da2412b1d2"
            },
            "downloads": -1,
            "filename": "django_memcache_status-2.3-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b6dc1062f852deb8178cf7687399fa43",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": ">=3.8",
            "size": 13240,
            "upload_time": "2023-04-29T11:37:07",
            "upload_time_iso_8601": "2023-04-29T11:37:07.909217Z",
            "url": "https://files.pythonhosted.org/packages/d1/08/94864bbd861dbd73247c9613b58eb734b3bca076bf1ab7eec7f41bb34814/django_memcache_status-2.3-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1357662839fad07b99efed3725d82dbbfe2a0a266cf0e037dac212e10de4125e",
                "md5": "151810c828460a1697b63db337506c67",
                "sha256": "ab99420bb08d13f33d9ec6b6ecb91e86cb68ff631130117fc8c91fc007de939a"
            },
            "downloads": -1,
            "filename": "django-memcache-status-2.3.tar.gz",
            "has_sig": false,
            "md5_digest": "151810c828460a1697b63db337506c67",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 20187,
            "upload_time": "2023-04-29T11:37:09",
            "upload_time_iso_8601": "2023-04-29T11:37:09.254667Z",
            "url": "https://files.pythonhosted.org/packages/13/57/662839fad07b99efed3725d82dbbfe2a0a266cf0e037dac212e10de4125e/django-memcache-status-2.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-04-29 11:37:09",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "bartTC",
    "github_project": "django-memcache-status",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "django-memcache-status"
}
        
Elapsed time: 1.24196s