{ "info": { "author": "Ben Timby", "author_email": "btimby@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "Operating System :: OS Independent", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": ".. image:: https://travis-ci.org/btimby/django-k8s.png\n :target: https://travis-ci.org/btimby/django-k8s\n\n.. image:: https://coveralls.io/repos/github/btimby/django-k8s/badge.svg?branch=master\n :target: https://coveralls.io/github/btimby/django-k8s?branch=master\n\n.. image:: https://badge.fury.io/py/django-k8s.svg\n :target: https://badge.fury.io/py/django-k8s\n\ndjango-k8s\n----------\n\nIntegration between Django and Kubernetes.\n\nCaching\n=======\n\nService discovery for Memcached. Admittedly this will work with any service\ndiscovery that uses multiple A records for memcached servers. This allows the\nmemcached client to properly distribute keys amongst memcached servers. AWS\nElasticCache as well as Kubernetes and others are compatible with this scheme.\n\nIf an error is received when trying to access a memcached server, DNS\nresolution is performed again (refreshing server list). This allows memcached\nservers to be added or removed without restarting the application.\n\nMore information on this approach is provided below.\n\nhttps://cloud.google.com/solutions/deploying-memcached-on-kubernetes-engine\n\nGiven Memcached deployed to Kubernetes with the following command:\n\n.. code:: bash\n\n helm install stable/memcached --name mycache --set replicaCount=3\n\nYou could configure your application like this:\n\n.. code:: python\n\n CACHES = {\n 'default': {\n 'BACKEND': 'django_k8s.cache.backends.Memcached',\n 'HOST': environ.get('DJANGO_CACHE_HOST', None),\n },\n }\n\n\nMigrations\n==========\n\nOne convenient way to handle Django migrations in Kubernetes is using a Job.\nHowever Django applications expect the database to be available and migrated on\nstartup. Therefore some coordination is necessary. The application containers\nshould wait for the migration job to complete before starting up.\n\nThis package provides a management command that polls the database to check for\ntwo conditions:\n\n1. That the database server is reachable.\n2. That all migrations have been applied.\n\nIt can optionally wait for both of these conditions to be true. An exit code of\n``0`` indicates success. This management command could be part of your\nentrypoint, ensuring no Django application is started until these conditions\nare met.\n\nThis technique is compatible with systems other than Kubernetes, the author has\nused it with Docker Compose as well.\n\n.. code:: bash\n\n $ python manage.py checkmigrations\n Migrations complete.", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/btimby/django-k8s/", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "django-k8s", "package_url": "https://pypi.org/project/django-k8s/", "platform": "", "project_url": "https://pypi.org/project/django-k8s/", "project_urls": { "Homepage": "http://github.com/btimby/django-k8s/" }, "release_url": "https://pypi.org/project/django-k8s/0.2.7/", "requires_dist": null, "requires_python": "", "summary": "Integration between Django and Kubernetes.", "version": "0.2.7" }, "last_serial": 3932846, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "353d67bd447af85ebd3de414235f4d02", "sha256": "0e0f5fee9411932d640a531efaa03c87730739c52b039f2e24c2f1f541a2ede4" }, "downloads": -1, "filename": "django-k8s-0.1.tar.gz", "has_sig": false, "md5_digest": "353d67bd447af85ebd3de414235f4d02", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2854, "upload_time": "2018-05-24T15:21:04", "url": "https://files.pythonhosted.org/packages/ba/4a/a09e280a2dbbae4a53bd787f8aa461e002819c636ba39c250beba2b8aaa4/django-k8s-0.1.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "aaaff26cb9be9142dabcbdc59704320a", "sha256": "113a05eefce3cb2a4ef3d08537ddd4ec3a7606b2d91e7a30e4af67572b2da243" }, "downloads": -1, "filename": "django-k8s-0.2.2.tar.gz", "has_sig": false, "md5_digest": "aaaff26cb9be9142dabcbdc59704320a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3167, "upload_time": "2018-05-24T16:40:38", "url": "https://files.pythonhosted.org/packages/b9/ec/5bef2e6350def50acac9613155bc716388adc9b11cf00bf45f5008a728fa/django-k8s-0.2.2.tar.gz" } ], "0.2.4": [ { "comment_text": "", "digests": { "md5": "db44fcee97af60aa93b9bde03d91e1a4", "sha256": "472651aa4070affa3af24d1ae5359b8605226c16b1079b9708e09f912111dacd" }, "downloads": -1, "filename": "django-k8s-0.2.4.tar.gz", "has_sig": false, "md5_digest": "db44fcee97af60aa93b9bde03d91e1a4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3166, "upload_time": "2018-05-24T19:39:21", "url": "https://files.pythonhosted.org/packages/20/10/ba450a4c7ba417153b9f85ca695fb219c3b5b86a1f4f3a9124ee78bf32e5/django-k8s-0.2.4.tar.gz" } ], "0.2.5": [ { "comment_text": "", "digests": { "md5": "3ab10af184edff00cbe81e8f9de94ab0", "sha256": "ffc92195ace744ed5db96b9b1b5ee7e8982c3d41b8cabf32b666a2d1dcdaab1e" }, "downloads": -1, "filename": "django-k8s-0.2.5.tar.gz", "has_sig": false, "md5_digest": "3ab10af184edff00cbe81e8f9de94ab0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3169, "upload_time": "2018-05-25T01:50:21", "url": "https://files.pythonhosted.org/packages/20/6d/3fd610546e702c22428a94ec12215856f0bbd74273b29f479b6c29c89203/django-k8s-0.2.5.tar.gz" } ], "0.2.7": [ { "comment_text": "", "digests": { "md5": "515100642b2267ea4c424de01e7f9424", "sha256": "d7c2e9a41b7b2c6422d6715b118d59716c7cb4afad87af2d80c7a284c48ebd69" }, "downloads": -1, "filename": "django-k8s-0.2.7.tar.gz", "has_sig": false, "md5_digest": "515100642b2267ea4c424de01e7f9424", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6990, "upload_time": "2018-06-05T16:19:14", "url": "https://files.pythonhosted.org/packages/d1/97/56d020f556d2bcd05b3a6656243d9a917cd3c886d656b77c9f50001cd0e7/django-k8s-0.2.7.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "515100642b2267ea4c424de01e7f9424", "sha256": "d7c2e9a41b7b2c6422d6715b118d59716c7cb4afad87af2d80c7a284c48ebd69" }, "downloads": -1, "filename": "django-k8s-0.2.7.tar.gz", "has_sig": false, "md5_digest": "515100642b2267ea4c424de01e7f9424", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6990, "upload_time": "2018-06-05T16:19:14", "url": "https://files.pythonhosted.org/packages/d1/97/56d020f556d2bcd05b3a6656243d9a917cd3c886d656b77c9f50001cd0e7/django-k8s-0.2.7.tar.gz" } ] }