{ "info": { "author": "Friedrich Paetzke", "author_email": "f.paetzke@gmail.com", "bugtrack_url": null, "classifiers": [ "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Software Development :: Libraries", "Topic :: Utilities" ], "description": "django-db-call\n==============\n\n.. image:: https://travis-ci.org/paetzke/django-db-call.png?branch=master\n :target: https://travis-ci.org/paetzke/django-db-call\n.. image:: https://coveralls.io/repos/paetzke/django-db-call/badge.png?branch=master\n :target: https://coveralls.io/r/paetzke/django-db-call?branch=master\n\nCopyright (c) 2014, Friedrich Paetzke (f.paetzke@gmail.com)\nAll rights reserved.\n\nDjango-db-call creates a database configuration for a django project from command line input.\n\nIt supports MySQL and PostgreSQL\u207d\u00b9\u207e right now.\n\nIt comes with two functions:\n\n* ``from_call()``\n* ``from_calls()``\n\nYou can install ``django-db-call`` via ``pip``.\n\n.. code:: bash\n\n $ pip install django-db-call\n\nAn usage example:\n\n.. code:: python\n\n from django_db_call import from_call\n \n DATABASES = from_call('mysql -h localhost -u root -p my_sweet_secret -D my_db')\n\nThat will become:\n\n.. code:: python\n\n DATABASES = {\n 'default': {\n 'ENGINE': 'django.db.backends.mysql',\n 'PORT': '',\n 'PASSWORD': 'my_sweet_secret',\n 'HOST': 'localhost',\n 'NAME': 'my_db',\n 'USER': 'root'\n }\n }\n\nYou can change the connection name by passing a name for it:\n\n.. code:: python\n\n DATABASES = from_call('mysql', connection='not_default')\n\nAnd that is equivalent to:\n\n.. code:: python\n\n DATABASES = {\n 'not_default': {\n 'ENGINE': 'django.db.backends.mysql',\n 'HOST': '',\n 'NAME': '',\n 'PASSWORD': '',\n 'PORT': '',\n 'USER': ''\n }\n }\n\nYou can also pass additional arguments to be used in ``OPTIONS``.\n\n.. code:: python\n\n DATABASES = from_call('mysql', autocommit=True)\n\nAnd that will give you:\n\n.. code:: python\n\n DATABASES = {\n 'default': {\n 'ENGINE': 'django.db.backends.mysql',\n 'NAME': '',\n 'USER': '',\n 'PASSWORD': '',\n 'HOST': '',\n 'PORT': '',\n 'OPTIONS': {\n 'autocommit': True,\n },\n }\n }\n\nFor creating multiple databases connections you can use ``from_calls()``.\n\n.. code:: python\n\n from django_db_call import from_calls\n \n DATABASES = from_calls(\n [\n ['mysql -h localhost -u root -p my_sweet_secret -D my_db'],\n ['mysql -h localhost -u root -p my_sweet_secret -D archive',\n {'connection': 'archive'}],\n ])\n\nAnd that will result in:\n\n.. code:: python\n\n DATABASES = {\n 'default': {\n 'PASSWORD': 'my_sweet_secret',\n 'ENGINE': 'django.db.backends.mysql',\n 'PORT': '',\n 'USER': 'root',\n 'HOST': 'localhost',\n 'NAME': 'my_db'\n },\n 'archive': {\n 'PASSWORD': 'my_sweet_secret',\n 'ENGINE': 'django.db.backends.mysql',\n 'PORT': '',\n 'USER': 'root',\n 'HOST': 'localhost',\n 'NAME': 'archive'\n }\n }\n\n\u207d\u00b9\u207e It seems it is not possible to pass the password to use a specific database on ``psql``. You have pass it explicitly.\n\n.. code:: python\n\n DATABASES = from_call('psql', password='my_sweet_secret')\n\n.. image:: https://d2weczhvl823v0.cloudfront.net/paetzke/django-db-call/trend.png", "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/paetzke/django-db-call", "keywords": null, "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "django-db-call", "package_url": "https://pypi.org/project/django-db-call/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-db-call/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/paetzke/django-db-call" }, "release_url": "https://pypi.org/project/django-db-call/0.2.0/", "requires_dist": null, "requires_python": null, "summary": "UNKNOWN", "version": "0.2.0" }, "last_serial": 982011, "releases": { "0.0.0": [], "0.0.1": [ { "comment_text": "", "digests": { "md5": "1aab6eb72a7d3d7c1b9a953bf20d0a03", "sha256": "330e357d6450b3dd555ecea1071e236a060c397a453b4bc961f0ae9b7d8da1eb" }, "downloads": -1, "filename": "django_db_call-0.0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "1aab6eb72a7d3d7c1b9a953bf20d0a03", "packagetype": "bdist_wheel", "python_version": "3.3", "requires_python": null, "size": 3646, "upload_time": "2014-01-17T21:20:32", "url": "https://files.pythonhosted.org/packages/40/c2/4fe004a333d4ae05de3dcea5598c6b5d0d3dc11ff55dbc838a499779616b/django_db_call-0.0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "11427ba5462c7140007581e84ca4b738", "sha256": "0348b64d7ca71f6460c401df8d2b3b53becb8355a97288d036751b9ced5ba220" }, "downloads": -1, "filename": "django-db-call-0.0.1.tar.gz", "has_sig": false, "md5_digest": "11427ba5462c7140007581e84ca4b738", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2662, "upload_time": "2014-01-17T21:20:28", "url": "https://files.pythonhosted.org/packages/26/2c/cdf8cd0751608f93361f0f0c28a58fabb5c053fe333d740ea09906207a91/django-db-call-0.0.1.tar.gz" } ], "0.1.0": [ { "comment_text": "", "digests": { "md5": "afc977b6bd1ae489073e9e1a7d29bb5b", "sha256": "35eea8acd29a2ac8cd1d761ceda7039c2e5ffd0ca24e6daf3bca8bf4c74e3b32" }, "downloads": -1, "filename": "django_db_call-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "afc977b6bd1ae489073e9e1a7d29bb5b", "packagetype": "bdist_wheel", "python_version": "3.3", "requires_python": null, "size": 5334, "upload_time": "2014-01-18T17:27:54", "url": "https://files.pythonhosted.org/packages/10/3e/ff51083b2389ca333e54361b5fd239fd7e95f44b1695872bbc8c9bf3d813/django_db_call-0.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "51a18612c1a3065d19b741843eef1163", "sha256": "b3dd2354d70d79106daa879190b963fd6a002c6e2ec9906a3f47b91d74074bf4" }, "downloads": -1, "filename": "django-db-call-0.1.0.tar.gz", "has_sig": false, "md5_digest": "51a18612c1a3065d19b741843eef1163", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3952, "upload_time": "2014-01-18T17:27:51", "url": "https://files.pythonhosted.org/packages/1f/7f/4cacd7cd50a48b592d5f34d53e145ed8566be91b895859d58fd4e2375e86/django-db-call-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "a237999fe94fba8f681e6be0be814dad", "sha256": "3ffbd24e7ed267d40fec5bae4a7d53d5fdbf98f45053d1a7ea59ebf573964802" }, "downloads": -1, "filename": "django_db_call-0.1.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "a237999fe94fba8f681e6be0be814dad", "packagetype": "bdist_wheel", "python_version": "3.3", "requires_python": null, "size": 5377, "upload_time": "2014-01-19T09:57:50", "url": "https://files.pythonhosted.org/packages/16/a8/87b17c9e0d2f7d64948b2646fa039856b53489dc74ec493bf81ae62cc95f/django_db_call-0.1.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e9379463b91736434831ac08513d6ab9", "sha256": "2ed62e49627dd7afd6f805c1ecd2b0b6acaa1958f29eaa996673bd7e50603b70" }, "downloads": -1, "filename": "django-db-call-0.1.1.tar.gz", "has_sig": false, "md5_digest": "e9379463b91736434831ac08513d6ab9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3991, "upload_time": "2014-01-19T09:57:46", "url": "https://files.pythonhosted.org/packages/0b/42/4a9d6fe45b55b090367c3b1471aef03c26a92983de7897fe530f26545625/django-db-call-0.1.1.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "e6a8a838a050547bfc14ef8f5d704810", "sha256": "032bf4b9edead34325d9bd6476cfd1ce0bef095d71e7ef190ef4e69f58eeacaf" }, "downloads": -1, "filename": "django_db_call-0.2.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "e6a8a838a050547bfc14ef8f5d704810", "packagetype": "bdist_wheel", "python_version": "3.3", "requires_python": null, "size": 5382, "upload_time": "2014-01-26T20:33:10", "url": "https://files.pythonhosted.org/packages/0b/3a/1bd748d6e67ef8c2c7d6279a56b3e80bade4a7bbc568204adcb0bd976481/django_db_call-0.2.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6f52ba42af83f58ebcd25022c7438535", "sha256": "b331567c12bdb04cfa1465295001e9779228dfc0cd61328c5806ad26ad311e72" }, "downloads": -1, "filename": "django-db-call-0.2.0.tar.gz", "has_sig": false, "md5_digest": "6f52ba42af83f58ebcd25022c7438535", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4000, "upload_time": "2014-01-26T20:33:05", "url": "https://files.pythonhosted.org/packages/ea/b6/59cc34d8136c8e2b143a9f428367081261df3145779adaf50938ea017781/django-db-call-0.2.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e6a8a838a050547bfc14ef8f5d704810", "sha256": "032bf4b9edead34325d9bd6476cfd1ce0bef095d71e7ef190ef4e69f58eeacaf" }, "downloads": -1, "filename": "django_db_call-0.2.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "e6a8a838a050547bfc14ef8f5d704810", "packagetype": "bdist_wheel", "python_version": "3.3", "requires_python": null, "size": 5382, "upload_time": "2014-01-26T20:33:10", "url": "https://files.pythonhosted.org/packages/0b/3a/1bd748d6e67ef8c2c7d6279a56b3e80bade4a7bbc568204adcb0bd976481/django_db_call-0.2.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6f52ba42af83f58ebcd25022c7438535", "sha256": "b331567c12bdb04cfa1465295001e9779228dfc0cd61328c5806ad26ad311e72" }, "downloads": -1, "filename": "django-db-call-0.2.0.tar.gz", "has_sig": false, "md5_digest": "6f52ba42af83f58ebcd25022c7438535", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4000, "upload_time": "2014-01-26T20:33:05", "url": "https://files.pythonhosted.org/packages/ea/b6/59cc34d8136c8e2b143a9f428367081261df3145779adaf50938ea017781/django-db-call-0.2.0.tar.gz" } ] }