{ "info": { "author": "Anthony Leontiev", "author_email": "alonetiev@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "Permission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\nDescription: # djx\n Common utilities and dependencies for the modern Django project.\n \n ## database\n \n Helpers for parsing database connection strings into Django-compatible database configuration. Uses `dj-database-url`.\n \n ### parse(url)\n \n Parse the given database URL.\n \n ## environment\n \n Helpers for pulling in environment variables.\n \n ### get_string(key, default=None)\n \n Return an environment variable as a string, defaulting to the given\n value if the environment variable is undefined.\n \n ### get_boolean(key, default)\n \n Return an environment variable as a boolean, defaulting to the given\n value if the environment variable is undefined.\n \n ### get_int(key)\n \n Return an environment variable as an integer, defaulting to the given\n value if the environment variable is undefined.\n \n ## static\n \n Helpers for working with static files. Uses `dj-static`.\n \n ### Cling\n \n Wrap a WSGI application to support static file serving:\n \n ```\n from djx.static import Cling\n application = Cling(get_wsgi_application())\n ```\n \n ## urls\n \n Helpers for dynamically loading urls.\n \n ### load_urls(file, namespace=True)\n \n Find submodules of the given file with valid url patterns and concatenate them into a list of patterns.\n Only submodules with a `urls` module that contains a `urlpatterns` symbol will be considered.\n If the `urls` module exists but cannot be imported, an exception is raised.\n \n If `namespace` is set to `True` (the default), the urls will be exposed under the prefix of the submodule name.\n If `namespace` is set to a function, this function will be called with the submodule name,\n and the output will be used as the prefix.\n If `namespace` is set to a string, this string will be used as the prefix.\n If `namespace` is set to `False`, the urls will not be namespaced.\n \n For example, if your project includes an \"api\" submodule with a `urls.py` file that defines url patterns\n for your API and a separate \"admin\" submodule with a `urls.py` file that defines url patterns for admins,\n you can automatically import these patterns with the following one-liner in the project `urls.py` file:\n \n ```\n from djx.urls import load_urls\n urlpatterns = load_urls(__file__)\n ```\n \n Assuming admin/urls.py includes the urls \"users\" and \"groups\" and api/urls.py includes the urls \"users\" and \"events\",\n the above call would produce the following urlpatterns:\n \n ```\n /admin/groups/\n /admin/users/\n /api/events/\n /api/users/\n ```\n \n If you were to pass `namespace=lambda x: '/foo/' + x`, you would get the following patterns:\n \n ```\n /foo/admin/events/\n /foo/admin/groups/\n /foo/api/events/\n /foo/api/users/\n ```\n \n However, if you were to pass `namespace='foo'`, you would get the following patterns:\n \n ```\n /foo/events/\n /foo/groups/\n /foo/users/\n ```\n \n Note that \"/foo/users/\" becomes ambiguous in this scenario; for this reason,\n passing in string or False values to `namespace` should be done with caution.\n \n ### get_host(url)\n \n Returns the network host for a given URL.\n \nPlatform: UNKNOWN\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/aleontiev/djx", "keywords": "", "license": "Copyright (c) 2017 Anthony Leontiev", "maintainer": "", "maintainer_email": "", "name": "djx", "package_url": "https://pypi.org/project/djx/", "platform": "", "project_url": "https://pypi.org/project/djx/", "project_urls": { "Homepage": "http://github.com/aleontiev/djx" }, "release_url": "https://pypi.org/project/djx/0.0.4/", "requires_dist": [ "dj-static", "dj-database-url", "gunicorn", "Django" ], "requires_python": "", "summary": "Common utiltiies and dependencies for the modern Django project", "version": "0.0.4" }, "last_serial": 4818901, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "0bc0adef1151262b03b3c719249336fb", "sha256": "e4052745839dc4b6b077ac475e32ca122da5abe55a069487c0189bace3324db6" }, "downloads": -1, "filename": "djx-0.0.1.tar.gz", "has_sig": false, "md5_digest": "0bc0adef1151262b03b3c719249336fb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4461, "upload_time": "2017-07-27T23:42:28", "url": "https://files.pythonhosted.org/packages/51/38/1e84dc60aaae6ab26fdf140cc3b429b1adff2e5136946f76b746283d8a71/djx-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "c4eee6c3a6464f2899fa4efeb717a753", "sha256": "b7ef175283010c86542bf2c8c5f6ecdf81f1f888f4690159daf5ced54dba376b" }, "downloads": -1, "filename": "djx-0.0.2.tar.gz", "has_sig": false, "md5_digest": "c4eee6c3a6464f2899fa4efeb717a753", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4568, "upload_time": "2017-07-27T23:46:38", "url": "https://files.pythonhosted.org/packages/0e/e1/dce3572c17794a74a666772eee28f61e81f8039094acb5303a899014109b/djx-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "86fe2a2492b7d393d00ebc67ae71e432", "sha256": "e45cdc5230757094e6c1168e1949ec7794eb5aa1ba21ddb8032230f6310c538b" }, "downloads": -1, "filename": "djx-0.0.3.tar.gz", "has_sig": false, "md5_digest": "86fe2a2492b7d393d00ebc67ae71e432", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4570, "upload_time": "2017-07-27T23:55:03", "url": "https://files.pythonhosted.org/packages/cf/24/4974ba3609db336f533b7206a31d5f9f62a64c1b4ed240ac6e0827e6f5d6/djx-0.0.3.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "fab55d988425b04bdd5fe1c84e2c6536", "sha256": "befab2eccca0697a4193b5ac61584e29e77a001f173551ec16dda59cace6b714" }, "downloads": -1, "filename": "djx-0.0.4-py2-none-any.whl", "has_sig": false, "md5_digest": "fab55d988425b04bdd5fe1c84e2c6536", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 24122228, "upload_time": "2019-02-14T05:39:27", "url": "https://files.pythonhosted.org/packages/fa/36/f8b9bb95022ed9577de13865de475eb62619c7a76dc960274e79fa77f118/djx-0.0.4-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d4eef496547c3a18a8eb95a6b26af1b5", "sha256": "17e22aba2c97a9fdc54cec8b15d52d62c66c6c1c83a082139461eecff491cd26" }, "downloads": -1, "filename": "djx-0.0.4.tar.gz", "has_sig": false, "md5_digest": "d4eef496547c3a18a8eb95a6b26af1b5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4550, "upload_time": "2019-02-14T05:39:38", "url": "https://files.pythonhosted.org/packages/85/06/62ec27da6bd75bd5234e02016d03e53b0229bdc1645face0a7c07c19183f/djx-0.0.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "fab55d988425b04bdd5fe1c84e2c6536", "sha256": "befab2eccca0697a4193b5ac61584e29e77a001f173551ec16dda59cace6b714" }, "downloads": -1, "filename": "djx-0.0.4-py2-none-any.whl", "has_sig": false, "md5_digest": "fab55d988425b04bdd5fe1c84e2c6536", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 24122228, "upload_time": "2019-02-14T05:39:27", "url": "https://files.pythonhosted.org/packages/fa/36/f8b9bb95022ed9577de13865de475eb62619c7a76dc960274e79fa77f118/djx-0.0.4-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d4eef496547c3a18a8eb95a6b26af1b5", "sha256": "17e22aba2c97a9fdc54cec8b15d52d62c66c6c1c83a082139461eecff491cd26" }, "downloads": -1, "filename": "djx-0.0.4.tar.gz", "has_sig": false, "md5_digest": "d4eef496547c3a18a8eb95a6b26af1b5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4550, "upload_time": "2019-02-14T05:39:38", "url": "https://files.pythonhosted.org/packages/85/06/62ec27da6bd75bd5234e02016d03e53b0229bdc1645face0a7c07c19183f/djx-0.0.4.tar.gz" } ] }