{ "info": { "author": "Steven Miers", "author_email": "steven.miers@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "# auto-cli-py\nPython Library that builds a complete CLI given one or more functions.\n\nMost options are set using introspection/signature and annotation functionality, so very little configuration has to be done.\n\n## Setup\n\n### TL;DR Install for usage\n```bash\n# Install from github\npip install auto-cli-py\n\n# See example code and output\npython examples.py\n\n```\n\n### In python code\n## Development\n* Standard python packaging - Follows methodologies from: https://python-packaging.readthedocs.io/en/latest/minimal\n.html\n* Uses pytest\n\n### Pytest\nhttps://docs.pytest.org/en/latest/\n\n### Python (Anaconda) environment\n*(assumes anaconda is properly installed)*\n```bash\n# First time. Create conda environment from environment.yml and activate it:\nconda env create -f environment.yml -n auto-cli-py\nconda activate auto-cli-py\n```\n\n```bash\n# If environment changes:\nconda activate auto-cli-py\nconda env update -f=environment.yml\n# -- OR remove and restart --\nconda remove --name auto-cli-py --all\nconda env create -f environment.yml\n```\n\n### Activate environment\n```bash\nconda activate auto-cli-py\n\n# This symlinks the installed auto_cli package to the source:\npip install -e .\n```\n\n### Preparation\n```bash\nconda activate auto-cli-py\n```\n\n### Linting and Testing\n*pytest behavior and output is controlled through `auto_cli/tests/pytest.ini`*\n\n```bash\n# Lint all code:\npylint auto_cli\n\n# Run all tests\npytest\n\n# See more options for pytest:\npytest --help\n\n# This is handy:\npytest --fixtures-per-test\n\n```\n\n### Installation (other)\n\n```bash\n# AND/OR Install from a specific github branch\npip uninstall auto-cli-py\npip install git+https://github.com/tangledpath/auto-cli-py.git@features/blah\n```\n\n\n---\n---## Example\n```python\n#!/usr/bin/env python\n\"\"\"\n Simple Examples of CLI creation.\n\"\"\"\nimport sys\nfrom auto_cli.cli import CLI\nimport enum\n\ndef foo():\n print(\"FOO!\")\n\ndef train(\n data_dir:str='./data/',\n initial_learning_rate:float=0.0001,\n seed:int=2112,\n batch_size:int=512,\n epochs:int = 20):\n print(\"Training with initial_learning_rate:{initial_learning_rate}, seed:{seed}, batch_size:{batch_size}, epochs:{epochs} into data_dir:{data_dir}\")\n\n#AnimalEnum = enum.Enum('Animal', 'ANT BEE CAT DOG')\nclass AnimalEnum(enum.Enum):\n ANT = 1\n BEE = 2\n CAT = 3\n DOG = 4\n\ndef count_animals(count:int=20, animal:AnimalEnum=AnimalEnum.BEE):\n return count\n\nif __name__ == '__main__':\n fn_opts = {\n 'foo': {'description':'Foobar'},\n 'train': {'description':'Train'},\n 'count_animals': {'description':'Count Animals'},\n }\n\n cli = CLI(sys.modules[__name__], function_opts=fn_opts, title=\"Foobar Example CLI\")\n cli.display()\n\n\n\n`\n`\n`\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/tangledpath/auto-cli-py", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "auto-cli-py", "package_url": "https://pypi.org/project/auto-cli-py/", "platform": "", "project_url": "https://pypi.org/project/auto-cli-py/", "project_urls": { "Homepage": "http://github.com/tangledpath/auto-cli-py" }, "release_url": "https://pypi.org/project/auto-cli-py/0.4.6/", "requires_dist": null, "requires_python": ">=3.6", "summary": "auto-cli-py: python package to automatically create CLI commands from function via introspection", "version": "0.4.6" }, "last_serial": 5936268, "releases": { "0.4.2": [ { "comment_text": "", "digests": { "md5": "8a84fc4f2ae9b10628ea56ef0f557589", "sha256": "7ba7d72eb2ec3d66604cbe0b3aecca5b5d7abf96223e9b3e11e9817eb001ac36" }, "downloads": -1, "filename": "auto_cli_py-0.4.2-py3-none-any.whl", "has_sig": false, "md5_digest": "8a84fc4f2ae9b10628ea56ef0f557589", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3856, "upload_time": "2019-10-01T21:27:35", "url": "https://files.pythonhosted.org/packages/6b/d1/b99875a466eb0ea8c66f047e221b70d60261dce711f060794c6ec22c13a6/auto_cli_py-0.4.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "cd05fc8025598e253e172f56ba8d78ea", "sha256": "6d23e8664f76a855bf4de81e31283d21367c01eaa5870400c0f7a24d4a9a7443" }, "downloads": -1, "filename": "auto-cli-py-0.4.2.tar.gz", "has_sig": false, "md5_digest": "cd05fc8025598e253e172f56ba8d78ea", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3280, "upload_time": "2019-10-01T21:27:37", "url": "https://files.pythonhosted.org/packages/05/17/c4e64dc88a70cc1dba7e82fc9c4d171060910ec254aa8e03998a4b265f8e/auto-cli-py-0.4.2.tar.gz" } ], "0.4.3": [ { "comment_text": "", "digests": { "md5": "1e425411a7b96370363c089a87b39ea9", "sha256": "526c26c5b66262be8c8eb643a9f6356213a82c6de48184a61ba1380568b75403" }, "downloads": -1, "filename": "auto_cli_py-0.4.3-py3-none-any.whl", "has_sig": false, "md5_digest": "1e425411a7b96370363c089a87b39ea9", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 4542, "upload_time": "2019-10-01T21:48:27", "url": "https://files.pythonhosted.org/packages/93/b2/710dabc6d303bc5fb7b5959dbbb54161d7c869bc2485d289fb967a1a7ffc/auto_cli_py-0.4.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5ba1eb3e4e8851644548da619fc4272d", "sha256": "62ca7b876bc1bd153708161608a3f16e7a826f5f533b4ec772cebcc7e9613e80" }, "downloads": -1, "filename": "auto-cli-py-0.4.3.tar.gz", "has_sig": false, "md5_digest": "5ba1eb3e4e8851644548da619fc4272d", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 3699, "upload_time": "2019-10-01T21:48:29", "url": "https://files.pythonhosted.org/packages/a3/26/fe367ac2cbeb58f154ade71813a734d66e6de4a9b024536cd1724aa1ca8b/auto-cli-py-0.4.3.tar.gz" } ], "0.4.4": [ { "comment_text": "", "digests": { "md5": "66e04c1569f5a134c16fd03f0b86c5cf", "sha256": "d432f03cf69d37dbd11b3344741b1578706cf9beca0766581c670b9481942f71" }, "downloads": -1, "filename": "auto_cli_py-0.4.4-py3-none-any.whl", "has_sig": false, "md5_digest": "66e04c1569f5a134c16fd03f0b86c5cf", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 5683, "upload_time": "2019-10-06T19:40:29", "url": "https://files.pythonhosted.org/packages/c7/21/8a72fffb00be81101b33b4703da210bc917c9cac402e76229c29e8cbf218/auto_cli_py-0.4.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "bbe36f24fea00d13849c589ed113023f", "sha256": "eb6de37109816a8897c0b96c06237bf2754f7464bf9e62a97550289ae6ec7a62" }, "downloads": -1, "filename": "auto-cli-py-0.4.4.tar.gz", "has_sig": false, "md5_digest": "bbe36f24fea00d13849c589ed113023f", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 4832, "upload_time": "2019-10-06T19:40:31", "url": "https://files.pythonhosted.org/packages/f1/72/363a4900bff3cfa9c2c97ca3d0d2570d9e199b6605d1c73c06587217806e/auto-cli-py-0.4.4.tar.gz" } ], "0.4.5": [ { "comment_text": "", "digests": { "md5": "69bc843d253125f8fba211ffb17e0164", "sha256": "a0e59681ddb94455bb9f89a7e4001e4dd570bc2822aecb927bc95ea0a3320dd7" }, "downloads": -1, "filename": "auto_cli_py-0.4.5-py3-none-any.whl", "has_sig": false, "md5_digest": "69bc843d253125f8fba211ffb17e0164", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 6241, "upload_time": "2019-10-06T22:45:28", "url": "https://files.pythonhosted.org/packages/e7/60/e768a7291ebe17d61097736b52a7d637310168fd5bde5301a7d1443bb285/auto_cli_py-0.4.5-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "023ba2f1ec60ac3d1f00ee2f7f0d09c9", "sha256": "9aad5e245c7836384730655ac4a212c90f16cf38bcf58ee04a429e11a55f90dc" }, "downloads": -1, "filename": "auto-cli-py-0.4.5.tar.gz", "has_sig": false, "md5_digest": "023ba2f1ec60ac3d1f00ee2f7f0d09c9", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 5465, "upload_time": "2019-10-06T22:45:30", "url": "https://files.pythonhosted.org/packages/00/f2/0bfdfd8da468b3415f643cdeb8daf7cf10dbf748b7e38b0d598f98a535d7/auto-cli-py-0.4.5.tar.gz" } ], "0.4.6": [ { "comment_text": "", "digests": { "md5": "1c119e9c84c302e59dc9e7be72933860", "sha256": "8791e019bd8cdf09c5906a10a278626cb65dda1f79b5bdbd867e598dc5c0013c" }, "downloads": -1, "filename": "auto_cli_py-0.4.6-py3-none-any.whl", "has_sig": false, "md5_digest": "1c119e9c84c302e59dc9e7be72933860", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 6250, "upload_time": "2019-10-06T22:54:06", "url": "https://files.pythonhosted.org/packages/cb/36/0fe0eb27a89c2b6d6339db9cc56e245da59d47818e513e0ee7f61fbcabb9/auto_cli_py-0.4.6-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "116c20b439d01deae671a2c41586bdf0", "sha256": "8f130b9cc2e673e44063de5cdec6606a01afbfe5f06f87084a42a7a4f9b1f723" }, "downloads": -1, "filename": "auto-cli-py-0.4.6.tar.gz", "has_sig": false, "md5_digest": "116c20b439d01deae671a2c41586bdf0", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 5488, "upload_time": "2019-10-06T22:56:03", "url": "https://files.pythonhosted.org/packages/ce/35/f9a0968669dca46252232599fee0253564c9bd53c8778b550852cd717ba5/auto-cli-py-0.4.6.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "1c119e9c84c302e59dc9e7be72933860", "sha256": "8791e019bd8cdf09c5906a10a278626cb65dda1f79b5bdbd867e598dc5c0013c" }, "downloads": -1, "filename": "auto_cli_py-0.4.6-py3-none-any.whl", "has_sig": false, "md5_digest": "1c119e9c84c302e59dc9e7be72933860", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 6250, "upload_time": "2019-10-06T22:54:06", "url": "https://files.pythonhosted.org/packages/cb/36/0fe0eb27a89c2b6d6339db9cc56e245da59d47818e513e0ee7f61fbcabb9/auto_cli_py-0.4.6-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "116c20b439d01deae671a2c41586bdf0", "sha256": "8f130b9cc2e673e44063de5cdec6606a01afbfe5f06f87084a42a7a4f9b1f723" }, "downloads": -1, "filename": "auto-cli-py-0.4.6.tar.gz", "has_sig": false, "md5_digest": "116c20b439d01deae671a2c41586bdf0", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 5488, "upload_time": "2019-10-06T22:56:03", "url": "https://files.pythonhosted.org/packages/ce/35/f9a0968669dca46252232599fee0253564c9bd53c8778b550852cd717ba5/auto-cli-py-0.4.6.tar.gz" } ] }