{ "info": { "author": "Egil Moeller, Kevin Wurster", "author_email": "egil@skytruth.org, kevin@skytruth.org", "bugtrack_url": null, "classifiers": [], "description": "gpsdio\n======\n\nAIS I/O with Python, dictionaries, and the `GPSd AIVDM `_ schema.\n\n.. image:: https://travis-ci.org/SkyTruth/gpsdio.svg?branch=master\n :target: https://travis-ci.org/SkyTruth/gpsdio\n\n\n.. image:: https://coveralls.io/repos/SkyTruth/gpsdio/badge.svg?branch=master\n :target: https://coveralls.io/r/SkyTruth/gpsdio\n\nThis project is still evolving but will calm down once it hits ``v0.1``. We\nwould love to hear from you're using, or would like to use, this project, both\nso we don't make any unexpected changes, and to get outside opinions on AIS\nprocessing.\n\n\nOverview\n--------\n\nVessels use a ship-to-ship Automated Identification System (AIS) to avoid\ncollisions by broadcasting information about who they are, where they are, and\nwhat they are doing. These messages are broadcast as `NMEA 0183 `_\nor `NMEA 2000 `_ sentences and are\nconstantly being collected by terrestrial and satellite receivers.\n\nNMEA is very large and difficult to work with natively, so the solution is to\nparse it and store as another format. Rather than spend time developing our\nown schema we chose to adopt the `GPSd AIVDM `_\nschema, which clearly defines all message types. Messages map well to Python\ndictionaries due to how fields vary type-to-type, so that's what ``gpsdio`` uses.\n\nThis project aims to make AIS data easier to work with by providing I/O and a\nsmall set of useful transforms, and was built with large-scale data processing\npipelines in mind.\n\n\nExample I/O\n-----------\n\nHere's a small example of how to read data stored as `newline delimited JSON `_,\nadd a field, and write as GZIP compressed `MsgPack `_.\nThe driver and compression are explicitly given but can also be detected from the file path.\nFor more information on what ``gpsdio.open()`` returns, see the section on `messages `_.\n\n.. code-block:: python\n\n import gpsdio\n\n with gpsdio.open('sample-data/types.json') as src:\n with gpsdio.open('with-num-fields.msg.gz', 'w', driver='MsgPack', compression='GZIP') as dst:\n for msg in src:\n msg['num_fields'] = len(msg)\n\n\nParsing NMEA Sentences\n----------------------\n\n``gpsdio`` does not yet support reading NMEA directly, although it will hopefully\nin the near future. In the meantime, `libais `_\nhas an ``aisdecode`` utility with an optional ``--gpsd`` format that produces data\nreadable by this library.\n\n\nCommandline Interface\n---------------------\n\nThis project also offers a ``gpsdio`` commandline utility for common tasks like\ninspecting and transforming data. See the `CLI docs `_\nfor more information.\n\n\nMessages\n--------\n\n**NOTE:** Message validation and transformation has not quite settled and will\nchange for ``v0.1``. The description below is currently mostly relevant, although\nsome fields may be placed into an ``__invalid__`` key on read or write.\n\n``gpsdio.open()`` returns a file-like object called ``Stream()`` that is\nresponsible for taking a dictionary from the underlying driver and transforming\nit into a well formed message.\n\nNormally I/O libraries perform some strict validation while reading and before\nwriting data, but working with AIS usually involves adding some custom fields.\nRather than telling ``gpsdio.open()`` what additional fields it may encounter\nevery time a file is opened, message validation only happens when requested.\nThis may seem backwards, but the idea is that validation really only needs to\nhappen as data parsed and brought into the ``gpsdio`` world. After that the\nuser knows far more about their data and is likely adding additional fields\nduring processing.\n\nSee `sample-data `_\nfor some data ``gpsdio`` can immediately read and write.\n\n\nCLI Plugins\n-----------\n\nDevelopers can create their own ``gpsdio`` commands with ``click-plugins``.\n``gpsdio`` loads plugins from a `setuptools entry point `_\ncalled ``gpsdio.cli_plugins``, so in your ``setup.py``:\n\n.. code-block:: python\n\n setup(\n entry_points='''\n [gpsdio.cli_plugins]\n name=package.module:click_command\n '''\n )\n\nFor a more in-depth description see the `click-plugins `_\ndocumentation. Additionally, see `gpsdio-density `_\nfor an example, or one of the other plugins listed in the\n`plugin registry `_.\n\n\nDriver Plugins\n--------------\n\nExternal drivers should be registered to the entry-point ``gpsdio.driver_plugins`` and\nmust subclass ``gpsdio.base.BaseDriver`` or ``gpsdio.base.BaseCompressionDriver``.\nSee the docstrings on those two objects for subclassing information.\n\n\nInstallation\n------------\n\nWith pip:\n\n.. code-block:: console\n\n $ pip install gpsdio\n\nFrom source:\n\n.. code-block:: console\n\n $ git clone https://github.com/SkyTruth/gpsdio\n $ cd gpsdio\n $ python setup.py install\n\n\nDeveloping\n----------\n\n.. code-block:: console\n\n $ git clone https://github.com/SkyTruth/gpsdio.git\n $ cd gpsdio\n $ virtualenv venv\n $ source venv/bin/activate\n $ pip install -e .[dev]\n $ py.test tests --cov gpsdio --cov-report term-missing\n\n\nChangelog\n---------\n\nSee ``CHANGES.md``\n\n\nLicense\n-------\n\nSee ``LICENSE.txt``", "description_content_type": null, "docs_url": null, "download_url": null, "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/SkyTruth/gpsdio", "keywords": "GPSd AIVDM AIS I/O", "license": "Apache 2.0", "maintainer": null, "maintainer_email": null, "name": "gpsdio", "package_url": "https://pypi.org/project/gpsdio/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/gpsdio/", "project_urls": { "Homepage": "https://github.com/SkyTruth/gpsdio" }, "release_url": "https://pypi.org/project/gpsdio/0.0.7/", "requires_dist": null, "requires_python": null, "summary": "A general purpose AIS I/O library using the GPSd AIVDM schema.", "version": "0.0.7" }, "last_serial": 2393042, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "0f1f80f293a65783077746d25c271120", "sha256": "cdffb483e01ec25026770eeda1c9407618c12a8fb1129dc553cb9e0842cc2b4c" }, "downloads": -1, "filename": "gpsdio-0.0.1.tar.gz", "has_sig": false, "md5_digest": "0f1f80f293a65783077746d25c271120", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 24600, "upload_time": "2015-05-26T14:39:24", "url": "https://files.pythonhosted.org/packages/4b/17/af4485a658920626b4053079fb78f8c32b9aa54ec15b3c246819210b5946/gpsdio-0.0.1.tar.gz" } ], "0.0.2": [], "0.0.3": [ { "comment_text": "", "digests": { "md5": "8d64a9fddbcda7c517a8522f2cf3d41d", "sha256": "3358c7d144a60383aac9175e875a7456da4a4a648b34b0277080f5cf3ee8a75d" }, "downloads": -1, "filename": "gpsdio-0.0.3.tar.gz", "has_sig": false, "md5_digest": "8d64a9fddbcda7c517a8522f2cf3d41d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 30700, "upload_time": "2015-05-28T20:33:04", "url": "https://files.pythonhosted.org/packages/fc/fd/f8f39f44bb740ccee13d3c92e3dfb96b169d3a6f9be7700d1f1f1778b784/gpsdio-0.0.3.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "56a7f257c32af287cacc6d1550ed55d3", "sha256": "f8c1a7248c9db66d62b7be741496442d4b43d88a8a8a0cbdda218541bda58177" }, "downloads": -1, "filename": "gpsdio-0.0.4.tar.gz", "has_sig": false, "md5_digest": "56a7f257c32af287cacc6d1550ed55d3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 31651, "upload_time": "2015-06-09T16:08:53", "url": "https://files.pythonhosted.org/packages/f2/b5/00c84ea9e1a590c1dec3398cf960327197638afc769e7d94ca394076b18b/gpsdio-0.0.4.tar.gz" } ], "0.0.5": [ { "comment_text": "", "digests": { "md5": "34c98242b4b0ed759f88ab920af6340b", "sha256": "660baa525936f66ee7a164d1b9464b393f7968aff4778a0e49035f5c0e822dfb" }, "downloads": -1, "filename": "gpsdio-0.0.5.tar.gz", "has_sig": false, "md5_digest": "34c98242b4b0ed759f88ab920af6340b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 34050, "upload_time": "2015-06-24T18:38:00", "url": "https://files.pythonhosted.org/packages/64/2c/69b4ae413f30742968c3b2e2046de055e5473712f14d2b894a94a64e75e5/gpsdio-0.0.5.tar.gz" } ], "0.0.6": [ { "comment_text": "", "digests": { "md5": "f193fdb5301c35b5e7ebcabb2be63a6c", "sha256": "9528e9f44d7a12c0d3a429f66710dea6c4c4f6ee48f8017f10b70040eaaf7940" }, "downloads": -1, "filename": "gpsdio-0.0.6.tar.gz", "has_sig": false, "md5_digest": "f193fdb5301c35b5e7ebcabb2be63a6c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 34654, "upload_time": "2015-06-25T20:23:13", "url": "https://files.pythonhosted.org/packages/fb/dc/601f3aff6e7b51d65830af2be10e048da2ddb76e1fd2aa6d3c2165e4511d/gpsdio-0.0.6.tar.gz" } ], "0.0.7": [ { "comment_text": "", "digests": { "md5": "85025887e1285a1ee7650d092bbf4679", "sha256": "304b77415f840ea94d8bfae914dbdb86b3773deb2d156024658c244d49003226" }, "downloads": -1, "filename": "gpsdio-0.0.7.tar.gz", "has_sig": false, "md5_digest": "85025887e1285a1ee7650d092bbf4679", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 37077, "upload_time": "2015-07-30T18:22:51", "url": "https://files.pythonhosted.org/packages/4a/0b/a7dbf1c6517d6d78af6369542c967d713dcb2846463caf22ba9792b4c377/gpsdio-0.0.7.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "85025887e1285a1ee7650d092bbf4679", "sha256": "304b77415f840ea94d8bfae914dbdb86b3773deb2d156024658c244d49003226" }, "downloads": -1, "filename": "gpsdio-0.0.7.tar.gz", "has_sig": false, "md5_digest": "85025887e1285a1ee7650d092bbf4679", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 37077, "upload_time": "2015-07-30T18:22:51", "url": "https://files.pythonhosted.org/packages/4a/0b/a7dbf1c6517d6d78af6369542c967d713dcb2846463caf22ba9792b4c377/gpsdio-0.0.7.tar.gz" } ] }