{ "info": { "author": "Duda Dornelles", "author_email": "duda@thoughtworks.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 2 - Pre-Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Programming Language :: Python :: 3.7" ], "description": "======\nbigcli\n======\n\n\n.. image:: https://img.shields.io/pypi/v/bigcli.svg\n :target: https://pypi.python.org/pypi/bigcli\n\n.. image:: https://img.shields.io/travis/dudadornelles/bigcli.svg\n :target: https://travis-ci.org/dudadornelles/bigcli\n\n.. image:: https://readthedocs.org/projects/bigcli/badge/?version=latest\n :target: https://bigcli.readthedocs.io/en/latest/?badge=latest\n :alt: Documentation Status\n\n.. image:: https://pyup.io/repos/github/dudadornelles/bigcli/shield.svg\n :target: https://pyup.io/repos/github/dudadornelles/bigcli/\n :alt: Updates\n\n\nA python framework to write large CLIs. The concept is to automagically derive CLI commands and args based on the object graph of a callable class that implements a CLI command (command name is derived from the class name). It uses argparse_ to create the CLI parser and pinject_ as the Dependency_Injection_ engine. You implement a class - e.g.: ``DoSomething``- and that generates the name of a subcommand - e.g: ``do-something``. Then, based on the dependencies of class ``DoSomething``, we will derive the arguments, e.g.: if ``DoSomething`` depends on ``Dependency``, which in turn declares ``__args__ = [bigcli.arg('--option', required=False, help='help')]`` (add_argument_ method from argparse_), then command ``do-something`` will have a '--option' argument.\n\nIn theory, the auto-generation of arguments should enables and encourage the reuse of internal components for rapid development of consistent and testable rich CLIs, especially those that operate platforms.\n\n* Free software: MIT license\n* Documentation: https://bigcli.readthedocs.io.\n\nMinimal example:\n-------\n\n.. code-block:: python\n\n #!/usr/bin/env python\n import bigcli\n\n\n class Dependency(object):\n __args__ = [\n bigcli.arg('--option') # short for ``lambda p: p.add_argument('--option')``\n ]\n\n def __init__(self, args):\n self.option = args.option\n\n\n class Command(object):\n __parent__ = 'sub-command'\n __depends_on__ = [Dependency]\n\n def __init__(self, dependency):\n self.dependency = dependency\n\n def __call__(self):\n print \"dependency option: {}\".format(self.dependency.option)\n\n\n if __name__ == \"__main__\":\n bigcli.BigCli(commands=[Command]).execute()\n\n\n # $ ./example.py sub-command command --option value\n # > dependency option: value\n\n\nFeatures (see tests for example)\n--------\n\n* Auto generates parsers and commands using the ``__depends_on__`` and ``__args__`` attributes.\n* Supports adding single subcommand using the ``__parent__ = 'subcommand'`` attribute.\n\nKnown Issues:\n-------------\n\n* Only supports python 2.7 because pinject_ only supports python 2.7.\n* Class names should have more than a single letter (pinject know issue, not documented anywhere AFAIK).\n\nCredits\n---------\n\nThis package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template.\n\n.. _Dependency_Injection: https://en.wikipedia.org/wiki/Dependency_injection\n.. _Cookiecutter: https://github.com/audreyr/cookiecutter\n.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage\n.. _add_argument: https://docs.python.org/3/library/argparse.html#argparse.ArgumentParser.add_argument\n.. _argparse: https://docs.python.org/2/howto/argparse.html\n.. _pinject: https://github.com/google/pinject\n\n\n=======\nHistory\n=======\n\n0.1.0 (2017-07-25)\n------------------\n\n* First release on PyPI.\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/dudadornelles/bigcli", "keywords": "bigcli", "license": "MIT license", "maintainer": "", "maintainer_email": "", "name": "bigcli", "package_url": "https://pypi.org/project/bigcli/", "platform": "", "project_url": "https://pypi.org/project/bigcli/", "project_urls": { "Homepage": "https://github.com/dudadornelles/bigcli" }, "release_url": "https://pypi.org/project/bigcli/0.2.0/", "requires_dist": [ "pinject" ], "requires_python": "", "summary": "A python framwork to write large CLIs using dependency injection", "version": "0.2.0" }, "last_serial": 5229186, "releases": { "0.1.2": [ { "comment_text": "", "digests": { "md5": "91a6bce322a2d617ebe8467cbcd18348", "sha256": "2941ae70e98a0049fadc4eb83266e8463e390fcb70d1829bf1b5a7e0b69e594f" }, "downloads": -1, "filename": "bigcli-0.1.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "91a6bce322a2d617ebe8467cbcd18348", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 4333, "upload_time": "2017-07-27T06:47:03", "url": "https://files.pythonhosted.org/packages/62/3a/234f2f7c5e1914d06c3e0a50e05a3bb8573795ce34b2e27887239e99220b/bigcli-0.1.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f1d700483f5e4f5462cae197df5d0a46", "sha256": "4e79e290094769a0a3e41252bc65ed059567c2489643949fa084a15aa7e15a44" }, "downloads": -1, "filename": "bigcli-0.1.2.tar.gz", "has_sig": false, "md5_digest": "f1d700483f5e4f5462cae197df5d0a46", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13497, "upload_time": "2017-07-27T06:47:06", "url": "https://files.pythonhosted.org/packages/69/ee/0a567abc32fb93cb907c50e934718018aad614ce8738837f16fa7bfc4a11/bigcli-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "e7ddc4f8c7d0bae94d774ba1528a9c37", "sha256": "a0984c70aa57dd90de5a7e78baa41dc845ad1e17e04eb25c686b8e636bc38af0" }, "downloads": -1, "filename": "bigcli-0.1.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "e7ddc4f8c7d0bae94d774ba1528a9c37", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 6338, "upload_time": "2017-10-21T16:32:56", "url": "https://files.pythonhosted.org/packages/6d/7b/3c67a63f1ac335e08b55963294323c0006bcf82fa4fb1327446c430f5e33/bigcli-0.1.3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0e6c0778da214b8793c7c2648681abbc", "sha256": "95196bfb0b1a18718369616fc5253699a7f02c58c0c8a4f74642584d8eb20e50" }, "downloads": -1, "filename": "bigcli-0.1.3.tar.gz", "has_sig": false, "md5_digest": "0e6c0778da214b8793c7c2648681abbc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15407, "upload_time": "2017-10-21T16:32:57", "url": "https://files.pythonhosted.org/packages/3c/c1/d572835434461d0c4bdf60ea7b7b4bbe746b68aadddfca78859d24d48da4/bigcli-0.1.3.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "5cf12348f9bfc5b5b447f40927ae7624", "sha256": "59ebe3a4fe67d57c9eff28a8c5aca8a51e44d752d275bc1e1532fe750f6d07b4" }, "downloads": -1, "filename": "bigcli-0.2.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "5cf12348f9bfc5b5b447f40927ae7624", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 6378, "upload_time": "2019-05-05T18:16:59", "url": "https://files.pythonhosted.org/packages/93/a0/f56c156bea478b01aa2e0d0aa0e6bacf7bfd43b74574c036c43b89d18e4e/bigcli-0.2.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "bd9f2cff7b55167c8b97fda79e4dbd4e", "sha256": "cde8b789ef760b03879d85dd0ff1f646463c598187fbda09bb1f64c0502cdbd1" }, "downloads": -1, "filename": "bigcli-0.2.0.tar.gz", "has_sig": false, "md5_digest": "bd9f2cff7b55167c8b97fda79e4dbd4e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14390, "upload_time": "2019-05-05T18:17:00", "url": "https://files.pythonhosted.org/packages/af/d1/7d3c2f9d30b2cb0dbd498bd2cd699aee6940f9953e64ad27b443131b290b/bigcli-0.2.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "5cf12348f9bfc5b5b447f40927ae7624", "sha256": "59ebe3a4fe67d57c9eff28a8c5aca8a51e44d752d275bc1e1532fe750f6d07b4" }, "downloads": -1, "filename": "bigcli-0.2.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "5cf12348f9bfc5b5b447f40927ae7624", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 6378, "upload_time": "2019-05-05T18:16:59", "url": "https://files.pythonhosted.org/packages/93/a0/f56c156bea478b01aa2e0d0aa0e6bacf7bfd43b74574c036c43b89d18e4e/bigcli-0.2.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "bd9f2cff7b55167c8b97fda79e4dbd4e", "sha256": "cde8b789ef760b03879d85dd0ff1f646463c598187fbda09bb1f64c0502cdbd1" }, "downloads": -1, "filename": "bigcli-0.2.0.tar.gz", "has_sig": false, "md5_digest": "bd9f2cff7b55167c8b97fda79e4dbd4e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14390, "upload_time": "2019-05-05T18:17:00", "url": "https://files.pythonhosted.org/packages/af/d1/7d3c2f9d30b2cb0dbd498bd2cd699aee6940f9953e64ad27b443131b290b/bigcli-0.2.0.tar.gz" } ] }