{ "info": { "author": "Sean Gillies", "author_email": "sean@mapbox.com", "bugtrack_url": null, "classifiers": [], "description": "cligj\n======\n\n.. image:: https://travis-ci.org/mapbox/cligj.svg\n :target: https://travis-ci.org/mapbox/cligj\n\n.. image:: https://coveralls.io/repos/mapbox/cligj/badge.png?branch=master\n :target: https://coveralls.io/r/mapbox/cligj?branch=master\n\nCommon arguments and options for GeoJSON processing commands, using Click.\n\n`cligj` is for Python developers who create command line interfaces for geospatial data.\n`cligj` allows you to quickly build consistent, well-tested and interoperable CLIs for handling GeoJSON. \n\n\nArguments\n---------\n\n``files_in_arg``\nMultiple files\n\n``files_inout_arg``\nMultiple files, last of which is an output file.\n\n``features_in_arg``\nGeoJSON Features input which accepts multiple representations of GeoJSON features\nand returns the input data as an iterable of GeoJSON Feature-like dictionaries\n\nOptions\n--------\n\n``verbose_opt``\n\n``quiet_opt``\n\n``format_opt``\n\nJSON formatting options\n~~~~~~~~~~~~~~~~~~~~~~~\n\n``indent_opt``\n\n``compact_opt``\n\nCoordinate precision option\n~~~~~~~~~~~~~~~~~~~~~~~~~~~\n``precision_opt``\n\nGeographic (default), projected, or Mercator switch\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n``projection_geographic_opt``\n\n``projection_projected_opt``\n\n``projection_mercator_opt``\n\nFeature collection or feature sequence switch\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n``sequence_opt``\n\n``use_rs_opt``\n\nGeoJSON output mode option\n~~~~~~~~~~~~~~~~~~~~~~~~~~\n``geojson_type_collection_opt``\n\n``geojson_type_feature_opt``\n\n``def geojson_type_bbox_opt``\n\nExample\n-------\n\nHere's an example of a command that writes out GeoJSON features as a collection\nor, optionally, a sequence of individual features. Since most software that\nreads and writes GeoJSON expects a text containing a single feature collection,\nthat's the default, and a LF-delimited sequence of texts containing one GeoJSON\nfeature each is a feature that is turned on using the ``--sequence`` option.\nTo write sequences of feature texts that conform to the `JSON Text Sequences\nproposed standard\n`__ (and might\ncontain pretty-printed JSON) with the ASCII Record Separator (0x1e) as\na delimiter, use the ``--rs`` option\n\n.. code-block:: python\n\n import click\n import cligj\n import json\n\n def process_features(features):\n for feature in features:\n # TODO process feature here\n yield feature\n\n @click.command()\n @cligj.features_in_arg\n @cligj.sequence_opt\n @cligj.use_rs_opt\n def pass_features(features, sequence, use_rs):\n if sequence:\n for feature in process_features(features):\n if use_rs:\n click.echo(u'\\x1e', nl=False)\n click.echo(json.dumps(feature))\n else:\n click.echo(json.dumps(\n {'type': 'FeatureCollection',\n 'features': list(process_features(features))}))\n\nOn the command line, the generated help text explains the usage\n\n.. code-block:: console\n\n Usage: pass_features [OPTIONS] FEATURES...\n\n Options:\n --sequence / --no-sequence Write a LF-delimited sequence of texts\n containing individual objects or write a single\n JSON text containing a feature collection object\n (the default).\n --rs / --no-rs Use RS (0x1E) as a prefix for individual texts\n in a sequence as per http://tools.ietf.org/html\n /draft-ietf-json-text-sequence-13 (default is\n False).\n --help Show this message and exit.\n\n\nAnd can be used like this\n\n.. code-block:: console\n\n $ cat data.geojson\n {'type': 'FeatureCollection', 'features': [{'type': 'Feature', 'id': '1'}, {'type': 'Feature', 'id': '2'}]}\n\n $ pass_features data.geojson\n {'type': 'FeatureCollection', 'features': [{'type': 'Feature', 'id': '1'}, {'type': 'Feature', 'id': '2'}]}\n\n $ cat data.geojson | pass_features\n {'type': 'FeatureCollection', 'features': [{'type': 'Feature', 'id': '1'}, {'type': 'Feature', 'id': '2'}]}\n\n $ cat data.geojson | pass_features --sequence\n {'type': 'Feature', 'id': '1'}\n {'type': 'Feature', 'id': '2'}\n\n $ cat data.geojson | pass_features --sequence --rs\n ^^{'type': 'Feature', 'id': '1'}\n ^^{'type': 'Feature', 'id': '2'}\n\nIn this example, ``^^`` represents 0x1e.\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/mapbox/cligj", "keywords": "", "license": "BSD", "maintainer": "", "maintainer_email": "", "name": "cligj", "package_url": "https://pypi.org/project/cligj/", "platform": "", "project_url": "https://pypi.org/project/cligj/", "project_urls": { "Homepage": "https://github.com/mapbox/cligj" }, "release_url": "https://pypi.org/project/cligj/0.5.0/", "requires_dist": [ "click (<8,>=4.0)", "pytest-cov; extra == 'test'" ], "requires_python": "", "summary": "Click params for commmand line interfaces to GeoJSON", "version": "0.5.0" }, "last_serial": 4313360, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "5b3eb7905aab81418cc3fd4accf57d5f", "sha256": "b2a8fe0a5c273a5ea58540be6fc8823c44aa7b01b6c76a87f62ff15c41daebd5" }, "downloads": -1, "filename": "cligj-0.1.0.tar.gz", "has_sig": false, "md5_digest": "5b3eb7905aab81418cc3fd4accf57d5f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2899, "upload_time": "2015-01-06T22:24:02", "url": "https://files.pythonhosted.org/packages/39/7e/c1c75ce4731c8260284697c2f4cd02a982868db45ec0f31c3a3381f9c1e8/cligj-0.1.0.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "3d0c39180ac760bf032d8947745ad4d9", "sha256": "0e8f9bef0b4a87649f9f5aa50a575115865183d40438525c3f0864b5db6f0a8f" }, "downloads": -1, "filename": "cligj-0.2.0-py2-none-any.whl", "has_sig": false, "md5_digest": "3d0c39180ac760bf032d8947745ad4d9", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 7758, "upload_time": "2015-05-28T17:19:51", "url": "https://files.pythonhosted.org/packages/40/e7/50ca0b3c0fc7748d3e109be6799bc51134ffe269324779eff96d41a218e9/cligj-0.2.0-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "be1e8e56bc04f21676f07da47fac51aa", "sha256": "ad8b2e82c9f580b0ffbf0e932ff8a1226645423eefc86d7fb6d6677301f2a051" }, "downloads": -1, "filename": "cligj-0.2.0-py3-none-any.whl", "has_sig": false, "md5_digest": "be1e8e56bc04f21676f07da47fac51aa", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7755, "upload_time": "2015-05-28T17:19:54", "url": "https://files.pythonhosted.org/packages/ae/1b/98c8bfb7733cbcde840864f3fd2007849fcdcfb146e98b1b24f5d3e10bff/cligj-0.2.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "2016c3d83d198a6840924b04a3962f3e", "sha256": "8037291ed094fa5d9e164b71cd1bc1ffcb3846d326ca95a6699a1b4145237214" }, "downloads": -1, "filename": "cligj-0.2.0.tar.gz", "has_sig": false, "md5_digest": "2016c3d83d198a6840924b04a3962f3e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5569, "upload_time": "2015-05-28T17:19:57", "url": "https://files.pythonhosted.org/packages/a8/72/5afac40d6898bc61cbd998e36e9ad6b46f327dd8003f828e580be7610a15/cligj-0.2.0.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "57a7268eed6d56966af12988edcfc484", "sha256": "bc009db09177b132a4b789ca1dc12c65ee21b2c998af3f65fc1fae27a9343bd9" }, "downloads": -1, "filename": "cligj-0.3.0-py2-none-any.whl", "has_sig": false, "md5_digest": "57a7268eed6d56966af12988edcfc484", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 8256, "upload_time": "2015-08-12T15:28:35", "url": "https://files.pythonhosted.org/packages/dd/98/c272fd34654ceab24c27b804cfc1fc99b1a43dd0d4e56156130d2e7b8cd2/cligj-0.3.0-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "edd320203e62a0c71a8277c945086fa6", "sha256": "dec88b7f2e7d4c133a3633e791575f07a4c5425e25817fa5e02a4b3f62133c7e" }, "downloads": -1, "filename": "cligj-0.3.0-py3-none-any.whl", "has_sig": false, "md5_digest": "edd320203e62a0c71a8277c945086fa6", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 8248, "upload_time": "2015-08-12T15:28:38", "url": "https://files.pythonhosted.org/packages/ed/4c/c18480b8605df690d0b07d884a5e7be547bdad476e6117c69d64bacdfc56/cligj-0.3.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "cd135f171b4ef2c07ebd34731ccf09a5", "sha256": "a534cb32a44b7d1182c13fa81507b479cabbdbcb40f6470a080b670a88aff425" }, "downloads": -1, "filename": "cligj-0.3.0.tar.gz", "has_sig": false, "md5_digest": "cd135f171b4ef2c07ebd34731ccf09a5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5829, "upload_time": "2015-08-12T15:28:42", "url": "https://files.pythonhosted.org/packages/e8/dc/3fcb0af2fbeacd384ab18b2c3a591e9a861c8018fd8ee793bfb0accfb8a3/cligj-0.3.0.tar.gz" } ], "0.4.0": [ { "comment_text": "", "digests": { "md5": "57691c7276d2e812df8ae1a8b8a12834", "sha256": "7588487f1afcefbe65ae477cdbd4fca1828a3000fc3332e165dacb1dcb005f8a" }, "downloads": -1, "filename": "cligj-0.4.0-py2-none-any.whl", "has_sig": false, "md5_digest": "57691c7276d2e812df8ae1a8b8a12834", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 10155, "upload_time": "2015-12-17T22:34:05", "url": "https://files.pythonhosted.org/packages/e8/c1/d2a5a83f1bf59b820b5ffb0c63fc31d13279d7b985f260c1f8c5ca1693d0/cligj-0.4.0-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ff41037009cce3236b27f5b088862340", "sha256": "2efdeb0ae64f2c2198ce7540ae0a5d67187d5fe9d79529ad8f4dbb8909210009" }, "downloads": -1, "filename": "cligj-0.4.0-py3-none-any.whl", "has_sig": false, "md5_digest": "ff41037009cce3236b27f5b088862340", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 10156, "upload_time": "2015-12-17T22:34:05", "url": "https://files.pythonhosted.org/packages/fc/05/e8384e1f7c8689cd1b91818a24cc860077c73368fb285ba53fbd8556ec98/cligj-0.4.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b1be9e2e9a083e8ab114901645a83826", "sha256": "12ad07994f5c1173b06087ffbaacec52f9ebe4687926e5aacfc22b6b0c8b3f54" }, "downloads": -1, "filename": "cligj-0.4.0.tar.gz", "has_sig": false, "md5_digest": "b1be9e2e9a083e8ab114901645a83826", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7281, "upload_time": "2015-12-17T22:34:18", "url": "https://files.pythonhosted.org/packages/fc/53/b89c392f33aa48b3063ad49e4dab70e424659d1fc4103b28b183f477f476/cligj-0.4.0.tar.gz" } ], "0.5.0": [ { "comment_text": "", "digests": { "md5": "14c92c2dcc8bc005244a410c827f8acf", "sha256": "60c93dda4499562eb87509a8ff3535a7441053b766c9c26bcf874a732f939c7c" }, "downloads": -1, "filename": "cligj-0.5.0-py2-none-any.whl", "has_sig": false, "md5_digest": "14c92c2dcc8bc005244a410c827f8acf", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 5738, "upload_time": "2018-09-26T16:59:10", "url": "https://files.pythonhosted.org/packages/b7/61/83f3b3d57313f17250263f03cf1631d68c9f4267ce69059063bf8f73d7f4/cligj-0.5.0-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "9e75a953408ed17cc61b5c3ae302e604", "sha256": "20f24ce9abfde3f758aec3399e6811b936b6772f360846c662c19bf5537b4f14" }, "downloads": -1, "filename": "cligj-0.5.0-py3-none-any.whl", "has_sig": false, "md5_digest": "9e75a953408ed17cc61b5c3ae302e604", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5738, "upload_time": "2018-09-26T16:59:44", "url": "https://files.pythonhosted.org/packages/e4/be/30a58b4b0733850280d01f8bd132591b4668ed5c7046761098d665ac2174/cligj-0.5.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a71786c20cfe18f304a6693ec50c95ba", "sha256": "6c7d52d529a78712491974f975c33473f430c0f7beb18c0d7a402a743dcb460a" }, "downloads": -1, "filename": "cligj-0.5.0.tar.gz", "has_sig": false, "md5_digest": "a71786c20cfe18f304a6693ec50c95ba", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5457, "upload_time": "2018-09-26T16:59:11", "url": "https://files.pythonhosted.org/packages/7a/75/20752146e9c73e74a286f66d4ee84ed102b4855c04d9bb8892b52a1f166c/cligj-0.5.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "14c92c2dcc8bc005244a410c827f8acf", "sha256": "60c93dda4499562eb87509a8ff3535a7441053b766c9c26bcf874a732f939c7c" }, "downloads": -1, "filename": "cligj-0.5.0-py2-none-any.whl", "has_sig": false, "md5_digest": "14c92c2dcc8bc005244a410c827f8acf", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 5738, "upload_time": "2018-09-26T16:59:10", "url": "https://files.pythonhosted.org/packages/b7/61/83f3b3d57313f17250263f03cf1631d68c9f4267ce69059063bf8f73d7f4/cligj-0.5.0-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "9e75a953408ed17cc61b5c3ae302e604", "sha256": "20f24ce9abfde3f758aec3399e6811b936b6772f360846c662c19bf5537b4f14" }, "downloads": -1, "filename": "cligj-0.5.0-py3-none-any.whl", "has_sig": false, "md5_digest": "9e75a953408ed17cc61b5c3ae302e604", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5738, "upload_time": "2018-09-26T16:59:44", "url": "https://files.pythonhosted.org/packages/e4/be/30a58b4b0733850280d01f8bd132591b4668ed5c7046761098d665ac2174/cligj-0.5.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a71786c20cfe18f304a6693ec50c95ba", "sha256": "6c7d52d529a78712491974f975c33473f430c0f7beb18c0d7a402a743dcb460a" }, "downloads": -1, "filename": "cligj-0.5.0.tar.gz", "has_sig": false, "md5_digest": "a71786c20cfe18f304a6693ec50c95ba", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5457, "upload_time": "2018-09-26T16:59:11", "url": "https://files.pythonhosted.org/packages/7a/75/20752146e9c73e74a286f66d4ee84ed102b4855c04d9bb8892b52a1f166c/cligj-0.5.0.tar.gz" } ] }