{ "info": { "author": "Joe Esposito", "author_email": "joe@joeyespo.com", "bugtrack_url": null, "classifiers": [], "description": "Path-and-Address\r\n================\r\n\r\nFunctions for command-line server tools used by humans.\r\n\r\n\r\nDescription\r\n-----------\r\n\r\nPath-and-address resolves ambiguities for command-line interface applications\r\nwith the following pattern:\r\n\r\n```bash\r\n$ your_app [] [
]\r\n```\r\n\r\nThe library applies [the principal of least surprise][pols] to command-line\r\ninterfaces.\r\n\r\nSome examples:\r\n\r\n```bash\r\n$ your_app .\r\n * Serving . on http://localhost:5000/\r\n\r\n$ your_app 80\r\n * Serving . on http://localhost:80/\r\n\r\n$ your_app ./80\r\n * Serving ./80 on http://localhost:5000/\r\n\r\n$ your_app path/to/file\r\n * Serving path/to/file on http://localhost:5000/\r\n\r\n$ your_app 0.0.0.0\r\n * Serving 0.0.0.0 on http://localhost:5000/\r\n\r\n$ your_app . 0.0.0.0\r\n * Serving . on http://0.0.0.0:5000/\r\n\r\n$ your_app 0.0.0.0:8080\r\n * Serving . on http://0.0.0.0:8080/\r\n```\r\n\r\n\r\nUsage\r\n-----\r\n\r\nImplement a CLI front-end in Python that exposes the above `[path] [address]`\r\npattern. Then call `resolve(path, address)`.\r\n\r\nExample, using `sys.argv` directly:\r\n\r\n```python\r\nimport sys\r\nfrom path_and_pattern import resolve\r\n\r\npath, address = resolve(*argv[1:])\r\n```\r\n\r\nMore examples can be found in the \"examples\" directory.\r\n\r\n\r\nInstallation\r\n------------\r\n\r\nTo install, simply:\r\n\r\n```bash\r\n$ pip install path-and-address\r\n```\r\n\r\nOr put it in your project's `requirements.txt`.\r\n\r\n\r\nContributing\r\n------------\r\n\r\n1. Check the open issues or open a new issue to start a discussion around\r\n your feature idea or the bug you found\r\n2. Fork the repository, make your changes, and add yourself to [Authors.md][]\r\n3. Send a pull request\r\n\r\n\r\n[pols]: http://en.wikipedia.org/wiki/Principle_of_least_astonishment\r\n[authors.md]: ./AUTHORS.md\r\n", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/joeyespo/path-and-address", "keywords": null, "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "path-and-address", "package_url": "https://pypi.org/project/path-and-address/", "platform": "any", "project_url": "https://pypi.org/project/path-and-address/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://github.com/joeyespo/path-and-address" }, "release_url": "https://pypi.org/project/path-and-address/2.0.1/", "requires_dist": null, "requires_python": null, "summary": "Functions for server command-line arguments used by humans.", "version": "2.0.1" }, "last_serial": 2235001, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "2e28cd062043e4bab4a03bd6b0d1e53f", "sha256": "16730d4795d4b745244bede1b4e7e5fc6321a540b970eb32c5300123ddbccff2" }, "downloads": -1, "filename": "path-and-address-0.1.zip", "has_sig": false, "md5_digest": "2e28cd062043e4bab4a03bd6b0d1e53f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6803, "upload_time": "2012-12-08T18:04:45", "url": "https://files.pythonhosted.org/packages/3f/a6/aebad57f4eb5038b2eb13c554e9481b0a4184f3e47cd9129c94928a7c924/path-and-address-0.1.zip" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "6acab2cfea1bec193fff7099873ff7c8", "sha256": "592cef1ed487f246c2042525e9623e70217bfe2d0ba66f8470ad2b0215fb3708" }, "downloads": -1, "filename": "path-and-address-0.2.0.zip", "has_sig": false, "md5_digest": "6acab2cfea1bec193fff7099873ff7c8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9193, "upload_time": "2013-01-05T23:30:13", "url": "https://files.pythonhosted.org/packages/14/cd/0df175ce55f50997a9cae247ca2ad93b46d3e6c64023573383fce4266e2b/path-and-address-0.2.0.zip" } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "b75fbf0118e27e870cfebfd4dd4b77bb", "sha256": "1498f37d3045777550c76d8b415f32dab53767000f13a75a83337215c7d1487b" }, "downloads": -1, "filename": "path-and-address-1.0.0.zip", "has_sig": false, "md5_digest": "b75fbf0118e27e870cfebfd4dd4b77bb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9353, "upload_time": "2014-08-02T19:53:10", "url": "https://files.pythonhosted.org/packages/f7/e2/a058b32f47be1d9e3013631d1ce862b4ae1633eb07a0db0b1c3d6f9ccbd9/path-and-address-1.0.0.zip" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "47ba266cdf2549939434ddc1af2a051b", "sha256": "c9cbea6919464ff2bbe441b996341e97d112ef876d8eeaa7ab127fe9fb811471" }, "downloads": -1, "filename": "path-and-address-1.1.0.zip", "has_sig": false, "md5_digest": "47ba266cdf2549939434ddc1af2a051b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7652, "upload_time": "2016-04-02T06:57:03", "url": "https://files.pythonhosted.org/packages/9d/17/e1afeb3587c51c8fe71ef32cfd72715dd7d90ded7ebe622213d14b6c1acb/path-and-address-1.1.0.zip" } ], "2.0.1": [ { "comment_text": "", "digests": { "md5": "4c9799605f1b3c0b2ecc62779ef1b205", "sha256": "e96363d982b3a2de8531f4cd5f086b51d0248b58527227d43cf5014d045371b7" }, "downloads": -1, "filename": "path-and-address-2.0.1.zip", "has_sig": false, "md5_digest": "4c9799605f1b3c0b2ecc62779ef1b205", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6503, "upload_time": "2016-07-21T02:56:09", "url": "https://files.pythonhosted.org/packages/2b/b5/749fab14d9e84257f3b0583eedb54e013422b6c240491a4ae48d9ea5e44f/path-and-address-2.0.1.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "4c9799605f1b3c0b2ecc62779ef1b205", "sha256": "e96363d982b3a2de8531f4cd5f086b51d0248b58527227d43cf5014d045371b7" }, "downloads": -1, "filename": "path-and-address-2.0.1.zip", "has_sig": false, "md5_digest": "4c9799605f1b3c0b2ecc62779ef1b205", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6503, "upload_time": "2016-07-21T02:56:09", "url": "https://files.pythonhosted.org/packages/2b/b5/749fab14d9e84257f3b0583eedb54e013422b6c240491a4ae48d9ea5e44f/path-and-address-2.0.1.zip" } ] }