{ "info": { "author": "Suzuki Shunsuke", "author_email": "suzuki.shunsuke.1989@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "exvar\n=====\n\n|Build Status| |PyPI version|\n\nLocal repository specific application configuration management\nframework.\n\nMotivation (Background)\n-----------------------\n\nSome configurations depend on the environment where their application\nruns so it is diffcult to manage them by version control system(vcs).\n\nFor example, the port number application uses depends on the\nenvironment. To hardcode the port number in the configuration file has\ntrouble when the port number is used by another process.\n\nOne of the approaches to deal with this problem are to use environment\nvariables. There are some useful tools to manage the environment\nvariables (such as `direnv `__).\n\nBut unfortunately some configuration files can't refer the environment\nvariables. In addition, many such tools doesn't provide the template\nfile manages the environment specific configurations and their default\nvalues and description about them.\n\nEspecially for developers who have joined your project newly, it is\nimportant to know the list of the environment specific configurations\nand their default values and descriptions about them.\n\nBy exvar you can manage them as code.\n\nNote that we refer to the environment variable management tools in the\nabove, but exvar doesn't conflict with them at all. Rather exvar can\ncomplement them.\n\nWhy do we call exvar a \"framework\"?\n-----------------------------------\n\nexvar provides the consistent and generic way to manage the environment\nspecific configurations in the project using vcs. You don't need to be\nworried about how to manage them, and don't need to develop your own\nrules and tools any more.\n\nTerms\n-----\n\nThere are some exvar specific terms.\n\n- base file (.exvar.base.yml)\n- user file (.exvar.yml)\n- variable (placeholder)\n- source file (template)\n- destination file\n\nbase file (.exvar.base.yml)\n~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nThis file should be managed by vcs. This file is required.\n\n.. code:: yaml\n\n ---\n config:\n # (default source file name) = default_prefix + (destination filename) + default_suffix\n default_prefix: .\n default_suffix:\n files:\n # relative path from the directory where the base file exists\n :\n [src: source file's relative path from the parent directory of the base file]\n [comment: comment about the destination file]\n vars:\n # variable name format is free\n :\n [comment: comment about the variable]\n # If the \"value\" field doesn't exist, the value must be set in the user file.\n # If it is null, it is treated as the empty string\n [value: the variable value]\n\nuser file (.exvar.yml)\n~~~~~~~~~~~~~~~~~~~~~~\n\nThis file should not be managed by vcs. This file is not required if all\nvariables have default values in the base file.\n\n.. code:: yaml\n\n ---\n files:\n :\n :\n [comment: description about the variable's value]\n # If the \"value\" field doesn't exist,\n # the value must be set in the base file.\n # If the value of it is null, it is treated as the empty string\n [value: null]\n\nvariable\n~~~~~~~~\n\nvariable name\n^^^^^^^^^^^^^\n\nThe format of variable name is free. It is important that exvar doesn't\na template engine. exvar simply replace variable names to variable\nvalues.\n\nvariable value\n^^^^^^^^^^^^^^\n\nThe type of the variable value is string. If the type of the value of\nthe \"value\" field in the base file and user file is not scalar (such as\nlist or dict etc), the error will have occured. If the type of it is\nint, the value is coverted to str. If it is null, it is treated as the\nempty string.\n\nsource file\n~~~~~~~~~~~\n\nThis file should be managed by vcs. The format of source files is free.\nIt is important that exvar doesn't a template engine. exvar simply\nreplace your defined placeholders(arbitary strings) to actual values.\n\ndestination file\n~~~~~~~~~~~~~~~~\n\nThis file shouldn't be managed by vcs. This is generated automatically\nby ``exvar run`` command, so you shouldn't edit this directly.\n\nUse case 1. Vagrantfile and ssh config file\n-------------------------------------------\n\nWe describe how to use exvar using a concrete use case.\n\nAssume that you use vagrant and vagrant's private network and manage ssh\nconfig as follow.\n\n.. code:: ruby\n\n # Vagrantfile\n Vagrant.configure(\"2\") do |config|\n config.vm.network \"private_network\", ip: \"192.168.50.4\"\n end\n\n::\n\n # ssh_config\n Host vm\n Hostname 192.168.50.4\n User vagrant\n\nThen let's manage the private ip address by exvar.\n\n::\n\n $ mv ssh_config .tmpl.ssh_config\n $ mv Vagrantfile .tmpl.Vagrantfile\n $ exvar init\n $ vi .tmpl.ssh_config\n $ vi .tmpl.Vagrantfile\n $ vi .exvar.base.yml\n\n.. code:: ruby\n\n # .tmpl.Vagrantfile\n Vagrant.configure(\"2\") do |config|\n config.vm.network \"private_network\", ip: \"$[vm ip]\"\n end\n\n::\n\n # .tmpl.ssh_config\n Host vm\n Hostname $[vm ip]\n User vagrant\n\n::\n\n # .exvar.base.yml\n config:\n default_prefix: .tmpl.\n default_suffix:\n files:\n ssh_config:\n vars:\n $[vm ip]:\n value: 192.168.50.4\n Vagrantfile:\n vars:\n $[vm ip]:\n value: 192.168.50.4\n\nYou can validate the base file and user file and source file by\n``exvar check`` command.\n\n::\n\n $ exvar check\n\nFinally, you can create the destination file (in this case \"Vagrantfile\"\nand \"ssh\\_config\") by ``exvar run`` command.\n\n::\n\n $ exvar run\n\nIn the above the default private ip address is \"192.168.50.4\". If you\nwant to change the private ip address in your local repository, set the\nvalue in the .exvar.yml and run ``exvar run`` again.\n\n.. code:: yaml\n\n # .exvar.yml\n files:\n ssh_config:\n vars:\n $[vm ip]:\n value: 192.168.30.1\n Vagrantfile:\n vars:\n $[vm ip]:\n value: 192.168.30.1\n\n::\n\n $ exvar check\n $ exvar run\n\nYou should add destination files and user file to .gitignore.\n\n::\n\n # .gitignore\n Vagrantfile\n ssh_config\n .exvar.yml\n\nRequirements\n------------\n\n- Python 3\n\nInstall\n-------\n\n::\n\n $ pip install exvar\n\nUsage\n-----\n\n::\n\n $ exvar -v, --version Print the exvar version number and exit.\n $ exvar --help Show the help message and exit.\n $ exvar init Create .exvar.base.yml and .exvar.yml if they don't exist.\n $ exvar check [--check-dest] Validate the base file and user file and source files and destination files.\n $ exvar run Create or update dest files.\n $ exvar ls-dest List destination file paths.\n $ exvar root-path Print the absolute path of the parent directory of the base file.\n\nComparison with similar softwares\n---------------------------------\n\nUnfortunately we can't find similar softwares. Please issue if you find\nthem.\n\nContributing\n------------\n\n1. Fork (https://github.com/suzuki-shunsuke/exvar.py/fork)\n2. Create a feature branch\n3. Commit your changes\n4. Rebase your local changes against the master branch\n5. Run test suite with the ``pytest`` command and confirm that it passes\n6. Create a new Pull Request\n\nLicense\n-------\n\n`MIT `__\n\nAuthor\n------\n\n`Suzuki Shunsuke `__\n\n.. |Build Status| image:: https://travis-ci.org/suzuki-shunsuke/exvar.py.svg?branch=master\n :target: https://travis-ci.org/suzuki-shunsuke/exvar.py\n.. |PyPI version| image:: https://badge.fury.io/py/exvar.svg\n :target: https://badge.fury.io/py/exvar", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/suzuki-shunsuke/exvar.py", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "exvar", "package_url": "https://pypi.org/project/exvar/", "platform": "", "project_url": "https://pypi.org/project/exvar/", "project_urls": { "Homepage": "https://github.com/suzuki-shunsuke/exvar.py" }, "release_url": "https://pypi.org/project/exvar/1.2.3/", "requires_dist": null, "requires_python": "", "summary": "Local repository specific application configuration management framework.", "version": "1.2.3" }, "last_serial": 2755135, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "867a969cf7ae46b06a4b92043583e8f4", "sha256": "5339b083d1b136b26d63940f7f5469e06431224da5914d9853c80498082adc8f" }, "downloads": -1, "filename": "exvar-1.0.0.tar.gz", "has_sig": false, "md5_digest": "867a969cf7ae46b06a4b92043583e8f4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7120, "upload_time": "2017-04-01T00:10:13", "url": "https://files.pythonhosted.org/packages/26/88/fcd254628d44ee915408a8179c102d7e53c33e956a300f1a3610de9b297f/exvar-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "b1fa07159cb14ff9a07c6615e3302f4f", "sha256": "56747f7f25a392f979bab0495e6053066f18a4ba16d33a77eccf63a80618aa19" }, "downloads": -1, "filename": "exvar-1.0.1.tar.gz", "has_sig": false, "md5_digest": "b1fa07159cb14ff9a07c6615e3302f4f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7138, "upload_time": "2017-04-01T01:05:30", "url": "https://files.pythonhosted.org/packages/89/60/5fb72a1d2dff83eab52831ecc31428601f0b2c33cc04dcc0d9dd3eb4a5b9/exvar-1.0.1.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "5e2f3c51d49e2c2a47e757bc7439d2bf", "sha256": "69a7d809c68c3033ab53225a01d41a6fd8d4c5f9f02959f2b35522f6ebc7d6e0" }, "downloads": -1, "filename": "exvar-1.0.2.tar.gz", "has_sig": false, "md5_digest": "5e2f3c51d49e2c2a47e757bc7439d2bf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7192, "upload_time": "2017-04-01T07:08:38", "url": "https://files.pythonhosted.org/packages/f2/c2/6dd93a76424bf3aaa38137c82775cfcea991fb7000ecc15ec64ddf909e49/exvar-1.0.2.tar.gz" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "234130956a94a0449e5f5f0f04e15cbe", "sha256": "9dadf10cde780f580a8566bbbe6622b54e3b963f5119c057b21695e3234b468e" }, "downloads": -1, "filename": "exvar-1.1.0.tar.gz", "has_sig": false, "md5_digest": "234130956a94a0449e5f5f0f04e15cbe", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7501, "upload_time": "2017-04-01T10:53:23", "url": "https://files.pythonhosted.org/packages/05/c1/3f54e6eb6124776dc5848b72f1a51b2eae14bc92939163651ef342a7d3ef/exvar-1.1.0.tar.gz" } ], "1.2.0": [ { "comment_text": "", "digests": { "md5": "4d3978e5ebc00053a66d3c463b4d6a5e", "sha256": "6553500c547ebc4fe061949489a405b53d352325a95570d948bc848b91c8ce85" }, "downloads": -1, "filename": "exvar-1.2.0.tar.gz", "has_sig": false, "md5_digest": "4d3978e5ebc00053a66d3c463b4d6a5e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7599, "upload_time": "2017-04-01T23:00:58", "url": "https://files.pythonhosted.org/packages/8f/6c/7c3f804ea826e86c20203d8bfab9e96f62fa3ef1e2a2b203db852de2e274/exvar-1.2.0.tar.gz" } ], "1.2.1": [ { "comment_text": "", "digests": { "md5": "8f49b9278cb96499750e62d1b456bb31", "sha256": "96a5297b40b8b13581fcceac36b11fbd3f6c7690191efcc9b8207ea7987d525d" }, "downloads": -1, "filename": "exvar-1.2.1.tar.gz", "has_sig": false, "md5_digest": "8f49b9278cb96499750e62d1b456bb31", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7604, "upload_time": "2017-04-01T23:07:14", "url": "https://files.pythonhosted.org/packages/f8/cf/dc6a825eb273493a17bb8be14127cf256e662e96a4e071fcafccd07523bc/exvar-1.2.1.tar.gz" } ], "1.2.2": [ { "comment_text": "", "digests": { "md5": "eae77c1e184b39c71a146f69435375e1", "sha256": "d5b27c6a78d9567a6f6b846e5c85b19332b4ece5e8744b4320cedade07728d77" }, "downloads": -1, "filename": "exvar-1.2.2.tar.gz", "has_sig": false, "md5_digest": "eae77c1e184b39c71a146f69435375e1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7798, "upload_time": "2017-04-02T05:22:41", "url": "https://files.pythonhosted.org/packages/fd/9e/54709fb961358f84d2bcb10823b295faa40c5481be6d9c35d98dda92edc7/exvar-1.2.2.tar.gz" } ], "1.2.3": [ { "comment_text": "", "digests": { "md5": "a4162d56c94fec60677f335b07fc8dc4", "sha256": "7562bd528d921c041611972a49728b2fbb074b7cb0609596f0e69b897892afa3" }, "downloads": -1, "filename": "exvar-1.2.3.tar.gz", "has_sig": false, "md5_digest": "a4162d56c94fec60677f335b07fc8dc4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7805, "upload_time": "2017-04-05T14:21:57", "url": "https://files.pythonhosted.org/packages/44/12/6c6bbf8ffc49d89c37fd812f3966550ffa349baa4f2008c104e35abf5f72/exvar-1.2.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "a4162d56c94fec60677f335b07fc8dc4", "sha256": "7562bd528d921c041611972a49728b2fbb074b7cb0609596f0e69b897892afa3" }, "downloads": -1, "filename": "exvar-1.2.3.tar.gz", "has_sig": false, "md5_digest": "a4162d56c94fec60677f335b07fc8dc4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7805, "upload_time": "2017-04-05T14:21:57", "url": "https://files.pythonhosted.org/packages/44/12/6c6bbf8ffc49d89c37fd812f3966550ffa349baa4f2008c104e35abf5f72/exvar-1.2.3.tar.gz" } ] }