{ "info": { "author": "Lincoln de Sousa", "author_email": "lincoln@clarete.li", "bugtrack_url": null, "classifiers": [], "description": "A helping hand to manage your settings among different environments\n\n## Intro\n\nManaging application configuration that runs on multiple environments\ncan be tough. So **milieu** comes to help you pretend you have only\none settings file that magically works whenever you deploy.\n\n## Production\n\nThe system environment is the first place **milieu** will try to find\nthings. So, when the application runs inside of an environment with the right\nvariables set, it will just work.\n\nSo, if you know you have the environment variable `DATABASE_URI` like this:\n\n```bash\n$ export DATABASE_URI=mysql://root@localhost:3306/mydb\n```\n\nThe application settings glue code will look like this:\n\n```python\n>>> from milieu import Environment\n>>> env = Environment()\n>>> dburi = env.get_uri('DATABASE_URI')\n>>> dburi.host\nu'localhost'\n>>> dburi.port\n3306\n```\n\n## Local\n\nIf you just want to load things from a file locally, the\n`Environment.from_file()` constructor will help you out.\n\n```python\n>>> from milieu import Environment\n>>> env = Environment.from_file('/etc/app.cfg')\n>>> env.get_bool('BOOL_FLAG')\nTrue\n>>> env.get_float('FLOAT_VAL')\n3.14\n```\n\nThe file `app.cfg` will look like this:\n\n```yaml\nBOOL_FLAG: True\n\nFLOAT_VAL: 3.14\n```\n\n## From a folder\n\nYou can also load variables from a folder, where each file will be an\nenvironment variable and the file's content will be the value. Just\nlike [envdir](http://cr.yp.to/daemontools/envdir.html).\n\nNow, say that you have the folder `/etc/envdir/app` and this folder\ncontains the file `MYSQL_CONN_URI` with a database URL inside of\nit. Just like this one here:\n`mysql://root:secret@localhost:3306/mydb`.\n\nTo read that directory and load the variable properly, you just have\nto do the following:\n\n```python\n>>> from milieu import Environment\n>>> env = Environment.from_folder('/etc/envdir/app')\n>>> uri = env.get_uri('MYSQL_CONN_URI')\n>>> uri.host\n'localhost'\n>>> uri.port\n3306\n>>> uri.user\n'root'\n>>> uri.password\n'secret'\n```\n\n# Hacking on it\n\n## Install dev dependencies\n\n```console\npip install -r requirements-dev.txt\n```\n\n## Run tests\n\n```console\nmake test\n```\n\n## Change it\n\nMake sure you write tests for your new features and keep the test\ncoverage in 100%\n\n## Release it\n\nAfter you already made your commits, run:\n\n```console\nmake release\n```\n\nfollow the instructions and do the\n[harlem shake](http://www.youtube.com/watch?v=8vJiSSAMNWw)", "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/clarete/milieu", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "milieu", "package_url": "https://pypi.org/project/milieu/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/milieu/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/clarete/milieu" }, "release_url": "https://pypi.org/project/milieu/0.1.9/", "requires_dist": null, "requires_python": null, "summary": "A helping hand to manage your settings among different environments", "version": "0.1.9" }, "last_serial": 2245338, "releases": { "0.0.4": [ { "comment_text": "", "digests": { "md5": "3866da107b0d231d8ec8e8fda26bd33c", "sha256": "ab9ba54dc811652b1dca9fa95a50de7eddfb3f394849f5e60e7aef493e36e25d" }, "downloads": -1, "filename": "milieu-0.0.4.tar.gz", "has_sig": false, "md5_digest": "3866da107b0d231d8ec8e8fda26bd33c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4497, "upload_time": "2013-06-10T19:40:52", "url": "https://files.pythonhosted.org/packages/bb/63/75593aced2b43aa345fb2856b39c120f0f32ba931c14c4a73409d9ab7bbb/milieu-0.0.4.tar.gz" } ], "0.0.5": [ { "comment_text": "", "digests": { "md5": "da6aebbd9b7702004d039c5f3938a8f3", "sha256": "0339a2b082f12531499b10a715ba8ffb61f4b9ee3c9511c5130293008731a1c7" }, "downloads": -1, "filename": "milieu-0.0.5.tar.gz", "has_sig": false, "md5_digest": "da6aebbd9b7702004d039c5f3938a8f3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7743, "upload_time": "2013-06-11T05:32:19", "url": "https://files.pythonhosted.org/packages/86/b0/81a890d6cfad1b07ad721eeeda5f644423638361d2857b04c1199ae18f6b/milieu-0.0.5.tar.gz" } ], "0.0.6": [ { "comment_text": "", "digests": { "md5": "c729ec8c76781de72be90f50012548fa", "sha256": "0159d036e41b97eb4f14842b0a8a8fe783c055a07a9c79d9ee162f7836778c80" }, "downloads": -1, "filename": "milieu-0.0.6.tar.gz", "has_sig": false, "md5_digest": "c729ec8c76781de72be90f50012548fa", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8338, "upload_time": "2013-07-24T18:56:22", "url": "https://files.pythonhosted.org/packages/05/1c/cc84345ab751a1dbef9520264403775f59411f1ee7dff60ae21758168619/milieu-0.0.6.tar.gz" } ], "0.1.0": [ { "comment_text": "", "digests": { "md5": "bc1066024a996791a8ff1eabb20ebc5f", "sha256": "58b183062b48a1f6197fb05dd04755c5623bdecd1b7079cf9cab173cdc1db256" }, "downloads": -1, "filename": "milieu-0.1.0.tar.gz", "has_sig": false, "md5_digest": "bc1066024a996791a8ff1eabb20ebc5f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8308, "upload_time": "2013-07-24T19:24:54", "url": "https://files.pythonhosted.org/packages/47/ea/4bb4edac1d54678e116e546d0b8298872e0d186b8a476244f6bbabc714cf/milieu-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "347c68645ba98148d5f0c23a98daac1f", "sha256": "7a46da96eccef272dc12530d11cbf3dccda3726db381cc447cffbd4c05795755" }, "downloads": -1, "filename": "milieu-0.1.1.tar.gz", "has_sig": false, "md5_digest": "347c68645ba98148d5f0c23a98daac1f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8317, "upload_time": "2013-08-09T16:34:11", "url": "https://files.pythonhosted.org/packages/8c/cd/516c41239d126e2118311a280770dd89f028abae50463f8b66431a958c76/milieu-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "8eefc92d97f648f840ebef6136011da3", "sha256": "a664fc6e78b50db005709347bbbb7d8e5df5c1b1368f5f0f0193b18273369f25" }, "downloads": -1, "filename": "milieu-0.1.2.tar.gz", "has_sig": false, "md5_digest": "8eefc92d97f648f840ebef6136011da3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8306, "upload_time": "2013-09-05T20:32:40", "url": "https://files.pythonhosted.org/packages/30/7a/905e9f72ace2f65b96d16e85698f5365f89fcef19a1dd4b2bb8f68b67989/milieu-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "b0e2dba108d6b3f0c2cea5a87fa8ed56", "sha256": "8b96ed45729bc3559a97f56b1d8096f5a96a4c02b773daab015cbbc396dec7cc" }, "downloads": -1, "filename": "milieu-0.1.3.tar.gz", "has_sig": false, "md5_digest": "b0e2dba108d6b3f0c2cea5a87fa8ed56", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8310, "upload_time": "2013-09-05T20:38:11", "url": "https://files.pythonhosted.org/packages/c3/1c/8694ee3b1a0cfbb773dd24a7823b8e2252c436b080f753ade1f9f649f700/milieu-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "300683fb936570271800e7db80d48069", "sha256": "7c97b55d69d4730b4713f05530e966d225126c1238d84eab3ad7ac86c553a1aa" }, "downloads": -1, "filename": "milieu-0.1.4.tar.gz", "has_sig": false, "md5_digest": "300683fb936570271800e7db80d48069", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8556, "upload_time": "2014-01-22T23:30:48", "url": "https://files.pythonhosted.org/packages/d4/0b/994478210e057aaf63846f7ab1c228829d8531b8487d7bb3c322d05e29df/milieu-0.1.4.tar.gz" } ], "0.1.5": [ { "comment_text": "", "digests": { "md5": "1721eb8b8dabe9c470fa1006d96242e4", "sha256": "83b1115a0e09b5d429eb3213fd799d7bd3bb88de561dbb7f1ac837b65da28d57" }, "downloads": -1, "filename": "milieu-0.1.5.tar.gz", "has_sig": false, "md5_digest": "1721eb8b8dabe9c470fa1006d96242e4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8565, "upload_time": "2014-01-22T23:51:33", "url": "https://files.pythonhosted.org/packages/cf/1d/62add0b887b5824b69740920bca7b6b926b7170a400f09f4dc49491a195d/milieu-0.1.5.tar.gz" } ], "0.1.6": [ { "comment_text": "", "digests": { "md5": "9d17f3473b67403e20dfb7522a944895", "sha256": "eacb5a128620223acdddb5d9c76ebb8bbc8b0fdb4ceef069a02b3250af8067bb" }, "downloads": -1, "filename": "milieu-0.1.6.tar.gz", "has_sig": false, "md5_digest": "9d17f3473b67403e20dfb7522a944895", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8590, "upload_time": "2014-02-11T20:37:49", "url": "https://files.pythonhosted.org/packages/24/09/cd18d0b8dfb6d160b88fa1fd70ecef24bd9264a4666dd7c2336d4dbf6ec5/milieu-0.1.6.tar.gz" } ], "0.1.7": [ { "comment_text": "", "digests": { "md5": "0a2297be23cc150051e058fca1e36ac3", "sha256": "cb3332e97d0169931b9393de7f9ee7f9012518dc2c827dbebca51a9c230848c5" }, "downloads": -1, "filename": "milieu-0.1.7.tar.gz", "has_sig": false, "md5_digest": "0a2297be23cc150051e058fca1e36ac3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8662, "upload_time": "2014-02-13T19:47:27", "url": "https://files.pythonhosted.org/packages/cb/f1/ad58ba3e0fe8391c7ae5b30c5f78085cfc9cbe8f43f4b619f0fb7f0ef591/milieu-0.1.7.tar.gz" } ], "0.1.8": [ { "comment_text": "", "digests": { "md5": "2799e0f318c38eb26787eb4e9638782e", "sha256": "1d8a1668d10286318a344a07bde61118318b0904c18d6fa2f0ecc92d76c243b7" }, "downloads": -1, "filename": "milieu-0.1.8.tar.gz", "has_sig": false, "md5_digest": "2799e0f318c38eb26787eb4e9638782e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8631, "upload_time": "2016-03-08T23:03:45", "url": "https://files.pythonhosted.org/packages/b5/f7/a5321a1337cf3b4f1f8be968ce43681cb5abcd4f2fc7b73680ed58062b83/milieu-0.1.8.tar.gz" } ], "0.1.9": [ { "comment_text": "", "digests": { "md5": "69107394bc3534f7968744e968e6d193", "sha256": "219c57b3c0825c49a6f2468624f268c88bfabcbfc96c38d68a3cf9c8e02ee2c7" }, "downloads": -1, "filename": "milieu-0.1.9.tar.gz", "has_sig": false, "md5_digest": "69107394bc3534f7968744e968e6d193", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8901, "upload_time": "2016-07-26T19:32:42", "url": "https://files.pythonhosted.org/packages/30/1d/5fa46f8634af5a4bc93eaf9a000de32258088e69b8901f6cdb5193c453a6/milieu-0.1.9.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "69107394bc3534f7968744e968e6d193", "sha256": "219c57b3c0825c49a6f2468624f268c88bfabcbfc96c38d68a3cf9c8e02ee2c7" }, "downloads": -1, "filename": "milieu-0.1.9.tar.gz", "has_sig": false, "md5_digest": "69107394bc3534f7968744e968e6d193", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8901, "upload_time": "2016-07-26T19:32:42", "url": "https://files.pythonhosted.org/packages/30/1d/5fa46f8634af5a4bc93eaf9a000de32258088e69b8901f6cdb5193c453a6/milieu-0.1.9.tar.gz" } ] }