{ "info": { "author": "Rick van Hattem (Wolph)", "author_email": "wolph@wol.ph", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Web Environment", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Natural Language :: English", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8" ], "description": "==============================================================================\nDjango Redis Admin\n==============================================================================\n\n.. Travis status:\n \n .. image:: https://travis-ci.org/WoLpH/django-redis-admin.svg?branch=master\n :target: https://travis-ci.org/WoLpH/django-redis-admin\n\nIntroduction\n==============================================================================\n\nWith `django-redis-admin` you can view (and in the future, edit) your Redis \ndatabases. It supports simple servers, master slave setups and sentinel setups.\n\nThe admin works by creating a `RedisQueryset` which fakes Django models and \nquerysets so the `ModelAdmin` thinks it's using a regular database backed model.\n\nSince Redis only supports basic types the library allows for optional `base64`\nencoding/decoding and `json` encoding/decoding.\n\nWhile I would not recommend using it as a regular queryset to access Redis. In\naddition to querying data it does some extra queries which you usually don't\nneed (such as fetching idle data) and it does some automatic conversion steps.\n\nRequirements\n==============================================================================\n\n* Python `3.6` and above\n* Django (tested with 2.1, probably works with any version that supports\n Python 3)\n* Python-redis (`pip install redis`)\n\nInstallation\n==============================================================================\n\n`django-redis-admin` can be installed via pip.\n\n.. code-block:: bash\n\n pip install django-redis-admin\n\nThen just add `redis_admin` to your `INSTALLED_APPS`.\n\nOptionally, configure your servers if you have multiple and/or non-standard \n(i.e. non-localhost) redis servers.\n\nBelow are several example configurations. The default settings can always be\nfound in `redis_admin/settings.py`\n\nYou can run the demo project using the following commands:\n\n.. code-block:: bash\n\n cd test_redis_admin\n python manage.py runserver\n\nThe default username/password is `admin`/`admin`: http://localhost:8080/admin/\n\nBasic configuration\n------------------------------------------------------------------------------\n\n.. code-block:: python\n\n # https://redis-py.readthedocs.io/en/latest/index.html#redis.Redis\n REDIS_SERVERS = dict(\n localhost=dict(),\n )\n\nExplicit configuration\n------------------------------------------------------------------------------\n\n.. code-block:: python\n\n # https://redis-py.readthedocs.io/en/latest/index.html#redis.Redis\n REDIS_SERVERS = dict(\n redis_server_a=dict(host='127.0.0.1', port=6379, db=0),\n )\n\nMaster slave configuration\n------------------------------------------------------------------------------\n\n.. code-block:: python\n\n # https://redis-py.readthedocs.io/en/latest/index.html#redis.Redis\n REDIS_SERVERS = dict(\n redis_server_a=dict(\n \t master=dict(host='master_hostname', port=6379, db=0),\n \t slave=dict(host='slave_hostname', port=6379, db=0),\n )\n )\n\nSentinel Configuration\n------------------------------------------------------------------------------\n\n.. code-block:: python\n\n # The `REDIS_SENTINELS` setting should be a list containing host/port\n # combinations. As documented here:\n # https://github.com/andymccurdy/redis-py/blob/master/README.rst#sentinel-support\n REDIS_SENTINELS = [('server_a', 26379), ('server_b', 26379)]\n\n # The `REDIS_SENTINEL_OPTIONS` are the extra arguments to\n # `redis.sentinel.Sentinel`:\n # https://github.com/andymccurdy/redis-py/blob/cdfe2befbe00db4a3c48c9ddd6d64dea15f6f0db/redis/sentinel.py#L128-L155\n REDIS_SENTINEL_OPTIONS = dict(socket_timeout=0.1)\n\n # The `service_name` is used to find the server within the Sentinel\n # configuration. The dictionary key will be used as the name in the admin\n # https://redis-py.readthedocs.io/en/latest/index.html#redis.Redis\n REDIS_SERVERS = dict(\n name_in_admin=dict(service_name='name_in_sentinel'),\n other_server=dict(service_name='other_server'),\n )\n\nBase64 and/or JSON decoding\n------------------------------------------------------------------------------\n\nAs a convenient option all values can optionally be `base64` and/or `json`\nencoded. To configure this a regular expression can be specified which will be\nmatched against the keys.\n\n.. code-block:: python\n\n # For all keys\n REDIS_JSON_KEY_RE = '.*'\n REDIS_BASE64_KEY_RE = '.*'\n\n # Keys starting with a pattern:\n REDIS_BASE64_KEY_RE = '^some_prefix.*'\n\n # Keys ending with a pattern:\n REDIS_JSON_KEY_RE = '.*some_suffix$'\n\nAnd if a specific `json` decoder is needed, the `json` module can be specified.\nThe module needs to be importable and have a `dumps` and `loads` method. By\ndefault it simply imports the `json` module:\n\n.. code-block:: python\n\n REDIS_JSON_MODULE = 'json'\n\nRepresentation cropping\n------------------------------------------------------------------------------\n\nWithin the Django Admin list view the values are cropped by default to prevent really long lines. This size can be adjusted through:\n\n.. code-block:: python\n\n REDIS_REPR_CROP_SIZE = 150\n\nTODO\n==============================================================================\n\n- Allow saving values\n- Allow deleting values\n- Support Redis Bitmaps\n- Support Redis HyperLogLogs\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/WoLpH/django-redis-admin", "keywords": "Django Redis Admin", "license": "BSD", "maintainer": "", "maintainer_email": "", "name": "django-redis-admin", "package_url": "https://pypi.org/project/django-redis-admin/", "platform": "", "project_url": "https://pypi.org/project/django-redis-admin/", "project_urls": { "Homepage": "https://github.com/WoLpH/django-redis-admin" }, "release_url": "https://pypi.org/project/django-redis-admin/0.2.0/", "requires_dist": null, "requires_python": "", "summary": "A Django Admin interface for Redis servers with optional Redis Sentinel support", "version": "0.2.0" }, "last_serial": 5238552, "releases": { "0.2.0": [ { "comment_text": "", "digests": { "md5": "8ddefa04502db8d090ecebf353dba641", "sha256": "8acfec063bca7a5b13bf857a28d1cad348b03092a52e2829a83058948f96cd71" }, "downloads": -1, "filename": "django_redis_admin-0.2.0-py3-none-any.whl", "has_sig": false, "md5_digest": "8ddefa04502db8d090ecebf353dba641", "packagetype": "bdist_wheel", "python_version": "3.7", "requires_python": null, "size": 12615, "upload_time": "2019-05-07T14:31:19", "url": "https://files.pythonhosted.org/packages/e9/c6/8b4e6c5f26d7def95618b5c59496e6ca958647f0d03277912d7413b048d6/django_redis_admin-0.2.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "bd89723771d8e8d7452498b1f8779160", "sha256": "2b7834367b48ef26032c938722e7d82037b9cab9ba5ead375a921edd9a2f2b9f" }, "downloads": -1, "filename": "django-redis-admin-0.2.0.tar.gz", "has_sig": false, "md5_digest": "bd89723771d8e8d7452498b1f8779160", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10233, "upload_time": "2019-05-07T14:31:15", "url": "https://files.pythonhosted.org/packages/78/fb/1c32d636f8cf81038f1c3cd9a94f03a81a8134e7718c4998d06304a272b3/django-redis-admin-0.2.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "8ddefa04502db8d090ecebf353dba641", "sha256": "8acfec063bca7a5b13bf857a28d1cad348b03092a52e2829a83058948f96cd71" }, "downloads": -1, "filename": "django_redis_admin-0.2.0-py3-none-any.whl", "has_sig": false, "md5_digest": "8ddefa04502db8d090ecebf353dba641", "packagetype": "bdist_wheel", "python_version": "3.7", "requires_python": null, "size": 12615, "upload_time": "2019-05-07T14:31:19", "url": "https://files.pythonhosted.org/packages/e9/c6/8b4e6c5f26d7def95618b5c59496e6ca958647f0d03277912d7413b048d6/django_redis_admin-0.2.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "bd89723771d8e8d7452498b1f8779160", "sha256": "2b7834367b48ef26032c938722e7d82037b9cab9ba5ead375a921edd9a2f2b9f" }, "downloads": -1, "filename": "django-redis-admin-0.2.0.tar.gz", "has_sig": false, "md5_digest": "bd89723771d8e8d7452498b1f8779160", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10233, "upload_time": "2019-05-07T14:31:15", "url": "https://files.pythonhosted.org/packages/78/fb/1c32d636f8cf81038f1c3cd9a94f03a81a8134e7718c4998d06304a272b3/django-redis-admin-0.2.0.tar.gz" } ] }