{ "info": { "author": "Ash Wilson", "author_email": "ash.d.wilson@gmail.com", "bugtrack_url": null, "classifiers": [ "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7" ], "description": "----------------\nOpenCellID Utils\n----------------\n\n.. image:: https://travis-ci.org/ashmastaflash/opencellid-wrapper.svg?branch=master\n :target: https://travis-ci.org/ashmastaflash/opencellid-wrapper\n\n.. image:: https://codeclimate.com/github/ashmastaflash/opencellid-wrapper/badges/gpa.svg\n :target: https://codeclimate.com/github/ashmastaflash/opencellid-wrapper\n :alt: Code Climate\n\n.. image:: https://codeclimate.com/github/ashmastaflash/opencellid-wrapper/badges/coverage.svg\n :target: https://codeclimate.com/github/ashmastaflash/opencellid-wrapper/coverage\n :alt: Test Coverage\n\n.. image:: https://codeclimate.com/github/ashmastaflash/opencellid-wrapper/badges/issue_count.svg\n :target: https://codeclimate.com/github/ashmastaflash/opencellid-wrapper\n :alt: Issue Count\n\n\nThis project is not associated with the OpenCellID project. This is a utility\npackage for downloading and parsing the OpenCellID database.\n\nOpenCelliD Project is licensed under a Creative Commons Attribution-ShareAlike\n4.0 International License.\n\n\nUsage (with API key from Unwired Labs)\n--------------------------------------\n\n::\n\n import opencellid\n ocid_obj = opencellid.OpenCellIdFeed(\"/dir/for/feed/file/\", \"api_key\")\n # Update OpenCellID feed from web:\n ocid_obj.update_feed()\n # Print all rows in OpenCellID feed:\n for row in ocid_obj:\n print row\n\n\nUsage (no API key, update from Mozilla Location Services)\n---------------------------------------------------------\n\n::\n\n import opencellid\n ocid_obj = opencellid.OpenCellIdFeed(\"/dir/for/feed/file/\")\n # Update OpenCellID feed from web:\n ocid_obj.update_feed()\n # Print all rows in OpenCellID feed:\n for row in ocid_obj:\n print row\n\n\nError Handling\n--------------\n\nThe tool will attempt to detect if the download is a gzipped CSV file before\nboving the download to replace the original gzipped CSV. If an IOError is\nencountered, a meaningful message will be displayed, and the exception will\nbe re-raised. For example, if you're being rate-limited, you'll see...\n\n::\n\n >>> ocid_obj.update_feed()\n Updating OpenCellID feed from Unwired Labs.\n Feed did not update... you're being rate-limited!\n Traceback (most recent call last):\n File \"\", line 1, in \n File \"opencellid/opencellid_feed.py\", line 60, in update_feed\n consumer.next()\n File \"/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/csv.py\", line 107, in next\n self.fieldnames\n File \"/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/csv.py\", line 90, in fieldnames\n self._fieldnames = self.reader.next()\n File \"/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/gzip.py\", line 464, in readline\n c = self.read(readsize)\n File \"/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/gzip.py\", line 268, in read\n self._read(readsize)\n File \"/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/gzip.py\", line 303, in _read\n self._read_gzip_header()\n File \"/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/gzip.py\", line 197, in _read_gzip_header\n raise IOError, 'Not a gzipped file'\n IOError: Not a gzipped file\n\n\nAnd if your API key is not accepted, you'll see...\n\n::\n\n >>> ocid_obj.update_feed()\n Updating OpenCellID feed from Unwired Labs.\n API token rejected by Unwired Labs!!\n Traceback (most recent call last):\n File \"\", line 1, in \n File \"opencellid/opencellid_feed.py\", line 60, in update_feed\n consumer.next()\n File \"/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/csv.py\", line 107, in next\n self.fieldnames\n File \"/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/csv.py\", line 90, in fieldnames\n self._fieldnames = self.reader.next()\n File \"/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/gzip.py\", line 464, in readline\n c = self.read(readsize)\n File \"/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/gzip.py\", line 268, in read\n self._read(readsize)\n File \"/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/gzip.py\", line 303, in _read\n self._read_gzip_header()\n File \"/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/gzip.py\", line 197, in _read_gzip_header\n raise IOError, 'Not a gzipped file'\n IOError: Not a gzipped file\n\n\nWhen this happens, the original feed is not updated, so you can catch and\nre-initialize the ``ocid_obj`` to pull from MLS until you can sort out the\nrate limiting or API key issue.\n\n\nInstallation\n------------\n\npip install opencellid\n\nTesting\n-------\n\npy.test\n\nThe test fixture file cell_towers.csv.gz contains information from the\nOpenCellID database, which is licensed CC-BY-SA 4.0\n\nChangelog\n=========\n\n\nv1.3.3\n------\n\nNew\n~~~\n- Add support for Python 3.6, 3.7. [Ash]\n\n Closes #11\n\n\nv1.3 (2018-10-16)\n-----------------\n\nChanges\n~~~~~~~\n- Updated CodeClimate settings. [Ash Wilson]\n\n Closes #3\n- Updated download URL for OpenCellID feed. [Ash Wilson]\n\n Updated tests to avoid Travis-CI silence timeout.\n\n Closes #2\n\n\nv1.2 (2017-06-13)\n-----------------\n\nChanges\n~~~~~~~\n- Improved error handling for bad API token and rate limiting\n situations. [Ash Wilson]\n\n\nv1.0 (2017-06-13)\n-----------------\n\nChanges\n~~~~~~~\n- Support update from UnwiredLabs or Mozilla Location Services. API\n changed, now use update_feed() method and source will be chosen\n depending on the presence of an API key. [Ash Wilson]\n\n\nv0.1.1 (2017-01-23)\n-------------------\n\nNew\n~~~\n- Unit and integration tests. [Ash Wilson]\n- Creates an OpenCellIdFeed object which can be updated from web and\n iterated over. [Ash Wilson]", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/ashmastaflash/opencellid-wrapper", "keywords": "opencellid", "license": "BSD", "maintainer": "", "maintainer_email": "", "name": "opencellid", "package_url": "https://pypi.org/project/opencellid/", "platform": "", "project_url": "https://pypi.org/project/opencellid/", "project_urls": { "Homepage": "https://github.com/ashmastaflash/opencellid-wrapper" }, "release_url": "https://pypi.org/project/opencellid/1.3.4/", "requires_dist": null, "requires_python": "", "summary": "A python wrapper for the OpenCellID DB", "version": "1.3.4" }, "last_serial": 5148478, "releases": { "0.1": [], "0.1.1": [ { "comment_text": "", "digests": { "md5": "e93b2349bebf0ab2ab7ebdcb62f570fa", "sha256": "b28e68835f6b02070259b1f9c0bcf969e2484cd31dba2966a7175ce8e2b93380" }, "downloads": -1, "filename": "opencellid-0.1.1-py2-none-any.whl", "has_sig": false, "md5_digest": "e93b2349bebf0ab2ab7ebdcb62f570fa", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 4195, "upload_time": "2017-01-23T02:09:39", "url": "https://files.pythonhosted.org/packages/8e/13/dff02f197b9a14dc4d46fc9be6956c7ce48707f1aa49ad12a2b81ded918e/opencellid-0.1.1-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b08ccf3faca923223394ab3559c7dbfa", "sha256": "dfe02dde3134f9bf99880ec96fee45c8393bed0904179d810a13d4fb7245b235" }, "downloads": -1, "filename": "opencellid-0.1.1.tar.gz", "has_sig": false, "md5_digest": "b08ccf3faca923223394ab3559c7dbfa", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2540, "upload_time": "2017-01-23T02:09:40", "url": "https://files.pythonhosted.org/packages/de/6b/66449f8453ba399b7bcbf3360fb740016e9af89c112afa0a26ef4a110d1b/opencellid-0.1.1.tar.gz" } ], "1.0": [ { "comment_text": "", "digests": { "md5": "19e41e6bd57ae8f52af30c452a8e8817", "sha256": "68cef9fbf6ee27b102d20237e7ed84a84477d935472e320e6059bb606c7571d5" }, "downloads": -1, "filename": "opencellid-1.0-py2-none-any.whl", "has_sig": true, "md5_digest": "19e41e6bd57ae8f52af30c452a8e8817", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 5051, "upload_time": "2017-06-13T04:00:44", "url": "https://files.pythonhosted.org/packages/3e/be/65f0d31d478dc7c19208a8a74b0f74a72fbc92d422b61092dc2f9a28e33b/opencellid-1.0-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7c7d9b54893e0936c0feb04c63bbf337", "sha256": "f794272d3e69edb7346be37ea8e2eeccb18c147b8399921edeb6eeb27aba07be" }, "downloads": -1, "filename": "opencellid-1.0.tar.gz", "has_sig": true, "md5_digest": "7c7d9b54893e0936c0feb04c63bbf337", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3234, "upload_time": "2017-06-13T03:37:37", "url": "https://files.pythonhosted.org/packages/0d/de/f67b2fdf48f9289cab01605765fb6eef35ae64dc8ac2b402e73e5b7c8b84/opencellid-1.0.tar.gz" } ], "1.2": [ { "comment_text": "", "digests": { "md5": "7c6a2ef0d837fc18e16867c311262330", "sha256": "efabb1fe382d2d5729e311603092925e487a7c626d1e0077b0b1a3f4fa16eccf" }, "downloads": -1, "filename": "opencellid-1.2-py2-none-any.whl", "has_sig": true, "md5_digest": "7c6a2ef0d837fc18e16867c311262330", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 6519, "upload_time": "2017-06-13T06:04:50", "url": "https://files.pythonhosted.org/packages/28/c4/e7b1fa748c0e4a0c3ce07f526338feeb64e1d401b3df83f09fe26f9140a1/opencellid-1.2-py2-none-any.whl" } ], "1.3.2": [ { "comment_text": "", "digests": { "md5": "c49f763cef4ec765b43f5d5a6b2fb0f6", "sha256": "564db660ba6f34335e10afcc2e9bbd738cd2f7a64e4f7dc3e0a6e07e0f897e61" }, "downloads": -1, "filename": "opencellid-1.3.2.tar.gz", "has_sig": false, "md5_digest": "c49f763cef4ec765b43f5d5a6b2fb0f6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8470, "upload_time": "2018-10-17T00:28:52", "url": "https://files.pythonhosted.org/packages/e9/59/d2622a861c9e731e19ad41a59996a96f1e129a810406f6795b281ee0ff20/opencellid-1.3.2.tar.gz" } ], "1.3.3": [ { "comment_text": "", "digests": { "md5": "1122ec2239f07aa5f845aee4ea656702", "sha256": "26efbaf957a357af4c813359904ddfc45cfc422b315ee7887780d4d8be68e077" }, "downloads": -1, "filename": "opencellid-1.3.3.tar.gz", "has_sig": false, "md5_digest": "1122ec2239f07aa5f845aee4ea656702", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8687, "upload_time": "2019-04-16T06:52:49", "url": "https://files.pythonhosted.org/packages/50/3e/f3b16ea0cfc246a817dd00316cd9e10502adee241d1dc7ba356ab4c3a488/opencellid-1.3.3.tar.gz" } ], "1.3.4": [ { "comment_text": "", "digests": { "md5": "ab228244bbd1433bce7f92e50323cb5f", "sha256": "0887e6055e5987a172788a0833501893450212fdc8c8bc817687af9f45d9ec2a" }, "downloads": -1, "filename": "opencellid-1.3.4.tar.gz", "has_sig": false, "md5_digest": "ab228244bbd1433bce7f92e50323cb5f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8689, "upload_time": "2019-04-16T07:02:51", "url": "https://files.pythonhosted.org/packages/e4/6b/f786b63e411116cd233428fe775d6c869054ae37c49ac6190abc9a1ebd48/opencellid-1.3.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "ab228244bbd1433bce7f92e50323cb5f", "sha256": "0887e6055e5987a172788a0833501893450212fdc8c8bc817687af9f45d9ec2a" }, "downloads": -1, "filename": "opencellid-1.3.4.tar.gz", "has_sig": false, "md5_digest": "ab228244bbd1433bce7f92e50323cb5f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8689, "upload_time": "2019-04-16T07:02:51", "url": "https://files.pythonhosted.org/packages/e4/6b/f786b63e411116cd233428fe775d6c869054ae37c49ac6190abc9a1ebd48/opencellid-1.3.4.tar.gz" } ] }