{ "info": { "author": "Julian Wachholz", "author_email": "julian@wachholz.ch", "bugtrack_url": null, "classifiers": [ "Environment :: Web Environment", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.2", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Topic :: Internet :: WWW/HTTP :: Dynamic Content", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "DJ-Config-URL\n~~~~~~~~~~~~~\n\n.. image:: https://secure.travis-ci.org/julianwachholz/dj-config-url.png?branch=master\n :target: http://travis-ci.org/julianwachholz/dj-config-url\n\nThis simple Django utility allows you to utilize\n`12factor `_ inspired\nenvironment variables to configure your Django application.\n\nThis project has been forked from kennethreitz' `dj-database-url` and is fully\ncompatible with it, so you can use this utility as a drop-in replacement.\n\nSupported configuration\n-----------------------\n\nSupport currently exists for the following database engines: PostgreSQL,\nPostGIS, MySQL, MySQL (GIS) and SQLite.\n\nYou can also configure your ``CACHES`` configuration for the backends supported\nby the Django core: Database, dummy, file based, local memory as well as both\nMemcached backends.\n\nInstallation\n------------\n\nInstallation is simple::\n\n $ pip install dj-config-url\n\nUsage\n-----\n\nConfigure your database in ``settings.py`` from ``DATABASE_URL``::\n\n DATABASES = {'default': dj_config_url.config()}\n\nParse an arbitrary Database URL::\n\n DATABASES = {'default': dj_config_url.parse('postgres://...')}\n\nConfigure your cache backend::\n\n CACHES = {'default': dj_config_url.parse('memcache://...')}\n\nUse a custom cache backend class::\n\n CACHES = {'default': dj_config_url.parse('memcache://127.0.0.1:123?password=s3cr3t', 'redis_cache.cache.RedisCache')}\n\n\nDatabase examples\n^^^^^^^^^^^^^^^^^\n\n=========== ========================================== ============================================\nEngine Django Backend URL\n=========== ========================================== ============================================\nPostgreSQL ``django.db.backends.postgresql_psycopg2`` ``postgres://USER:PASSWORD@HOST:PORT/NAME``\nPostGIS ``django.contrib.gis.db.backends.postgis`` ``postgis://USER:PASSWORD@HOST:PORT/NAME``\nMySQL ``django.db.backends.mysql`` ``mysql://USER:PASSWORD@HOST:PORT/NAME``\nMySQL (GIS) ``django.contrib.gis.db.backends.mysql`` ``mysqlgis://USER:PASSWORD@HOST:PORT/NAME``\nSQLite ``django.db.backends.sqlite3`` ``sqlite:///PATH`` [1]_\n=========== ========================================== ============================================\n\n.. [1] SQLite connects to file based databases. The same URL format is used, omitting\n the hostname, and using the \"file\" portion as the filename of the database.\n This has the effect of four slashes being present for an absolute file path:\n ``sqlite:////full/path/to/your/database/file.sqlite``.\n\n\nCache examples\n^^^^^^^^^^^^^^\n\n============ ======================================================= ========================================\nBackend Django Backend URL\n============ ======================================================= ========================================\nDatabase ``django.core.cache.backends.db.DatabaseCache`` ``dbcache://table_name``\nDummy ``django.core.cache.backends.dummy.DummyCache`` ``dummycache://``\nFile based ``django.core.cache.backends.filebased.FileBasedCache`` ``filecache:///path/to/cache``\nLocal Memory ``django.core.cache.backends.locmem.LocMemCache`` ``locmemcache://[optional name]``\nMemcached ``django.core.cache.backends.memcached.MemcachedCache`` ``memcache://IP:PORT[,IP:PORT, ...]``\nPyLibMC ``django.core.cache.backends.memcached.PyLibMCCache`` ``pymemcache://IP:PORT[,IP:PORT, ...]``\n============ ======================================================= ========================================\n\nYou may specify options for the cache backends as query parameters in the url, e.g.::\n\n CACHES = {\n 'default': dj_config_url.parse('filecache:///var/tmp/django_cache?timeout=60&max_entries=1000&cull_frequency=2'),\n }\n\nThis will be equivalent of writing this in your ``settings.py``::\n\n CACHES = {\n 'default': {\n 'BACKEND': 'django.core.cache.backends.filebased.FileBasedCache',\n 'LOCATION': '/var/tmp/django_cache',\n 'TIMEOUT': 60,\n 'OPTIONS': {\n 'MAX_ENTRIES': 1000,\n 'CULL_FREQUENCY': 2,\n }\n }\n }", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/julianwachholz/dj-config-url", "keywords": null, "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "dj-config-url", "package_url": "https://pypi.org/project/dj-config-url/", "platform": "any", "project_url": "https://pypi.org/project/dj-config-url/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/julianwachholz/dj-config-url" }, "release_url": "https://pypi.org/project/dj-config-url/0.1.1/", "requires_dist": null, "requires_python": null, "summary": "Use configuration URLs in your Django Application.", "version": "0.1.1" }, "last_serial": 1096403, "releases": { "0.1.0": [], "0.1.1": [ { "comment_text": "", "digests": { "md5": "d1c01a8590f57725d9567353a424efec", "sha256": "8c411dca3ead2b64786c9ae735ef3085518ff92a79e98e441953b26c47063e3f" }, "downloads": -1, "filename": "dj_config_url-0.1.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "d1c01a8590f57725d9567353a424efec", "packagetype": "bdist_wheel", "python_version": "3.4", "requires_python": null, "size": 7062, "upload_time": "2014-05-18T18:51:04", "url": "https://files.pythonhosted.org/packages/86/3f/2c30720784ce280cd5f332a5bba0d568d4620285d5daf654df04b80c0fce/dj_config_url-0.1.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a84ab53e4185e47a095f026d4cdcce3f", "sha256": "32b87c85f6359a6a772bd8d5e131640529c4addfc2069918f4eaa8de8ecbb548" }, "downloads": -1, "filename": "dj-config-url-0.1.1.tar.gz", "has_sig": false, "md5_digest": "a84ab53e4185e47a095f026d4cdcce3f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4430, "upload_time": "2014-05-18T18:37:35", "url": "https://files.pythonhosted.org/packages/d7/be/a19b45afb8a624b2b3258672fb3e97c1620e5e18d5c0a64ca8886f1825e6/dj-config-url-0.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "d1c01a8590f57725d9567353a424efec", "sha256": "8c411dca3ead2b64786c9ae735ef3085518ff92a79e98e441953b26c47063e3f" }, "downloads": -1, "filename": "dj_config_url-0.1.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "d1c01a8590f57725d9567353a424efec", "packagetype": "bdist_wheel", "python_version": "3.4", "requires_python": null, "size": 7062, "upload_time": "2014-05-18T18:51:04", "url": "https://files.pythonhosted.org/packages/86/3f/2c30720784ce280cd5f332a5bba0d568d4620285d5daf654df04b80c0fce/dj_config_url-0.1.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a84ab53e4185e47a095f026d4cdcce3f", "sha256": "32b87c85f6359a6a772bd8d5e131640529c4addfc2069918f4eaa8de8ecbb548" }, "downloads": -1, "filename": "dj-config-url-0.1.1.tar.gz", "has_sig": false, "md5_digest": "a84ab53e4185e47a095f026d4cdcce3f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4430, "upload_time": "2014-05-18T18:37:35", "url": "https://files.pythonhosted.org/packages/d7/be/a19b45afb8a624b2b3258672fb3e97c1620e5e18d5c0a64ca8886f1825e6/dj-config-url-0.1.1.tar.gz" } ] }