{ "info": { "author": "Roel van den Berg", "author_email": "roel.vandenberg@nelen-schuurmans.nl", "bugtrack_url": null, "classifiers": [ "Topic :: Software Development :: Libraries :: Application Frameworks" ], "description": "lizard-connector\n================\n\nIntroduction\n------------\n\nConnector to Lizard api (e.g. https://demo.lizard.net/api/v3) for python.\n\nIncludes:\n- Client (experimental / alpha)\n- Endpoint (Easy access to Lizard api endpoints)\n- Connector (http handling)\n- parsers to parse the json obtained from Endpoint queries\n- queryfunctions for special cases such as geographical queries and time\n related queries other queries can be input as a dictionary\n- callbacks for async data handling.\n\nWhen pandas, numpy are installed the Client returns `pandas.DataFrame`s and/or\n`numpy.array`s in a `ScientifResult` object.\n\nExample usage\n-------------\n\nAn example jupyter notebook can be found `Example_EN.ipynb` or in Dutch:\n`Voorbeeld_NL.ipynb`.\n\nUse one endpoints https://demo.lizard.net/api/v2 in Python with the Endpoint\nclass:\n\n```\n from lizard_connector import Client\n import lizard_connector.queries\n import datetime\n\n # Fill in your username and password (your password will be prompted)\n client = lizard_connector.Client(\n username = \"example.username\"\n )\n\n endpoint = 'timeseries'\n south_west = [48.0, -6.8]\n north_east = [56.2, 18.9]\n\n organisation_id = 'example_organisation_uuid'\n\n start = datetime.datetime(1970, 1, 1)\n end = datetime.datetime.now()\n\n relevant_queries = [\n lizard_connector.queries.in_bbox(south_west, north_east, endpoint),\n lizard_connector.queries.organisation(organisation_id, endpoint),\n lizard_connector.queries.datetime_limits(start, end)\n ]\n\n results = client.timeseries.get(*relevant_queries)\n```\n\nUsage with PyQT (for Qgis plugins)\n----------------------------------\nYou can create a QThread worker like so:\n\n```\n from PyQt4.QtCore import QThread\n from PyQt4.QtCore import pyqtSignal\n\n\n class Worker(QThread):\n \"\"\"This class creates a worker thread for getting the data.\"\"\"\n output = pyqtSignal(object)\n\n def __init__(self, parent=None, endpoint=None, *querydicts, **queries):\n \"\"\"Initiate the Worker.\"\"\"\n super(Worker, self).__init__(parent)\n self._endpoint = endpoint\n self._querydicts = querydicts\n self._queries = queries\n\n def run(self):\n \"\"\"Called indirectly by PyQt if you call start().\n This method retrieves the data from Lizard and emits it via the\n output signal as dictionary.\n \"\"\"\n data = self._endpoint._synchronous_get_async(\n *self._querydicts, **self._queries)\n self.output.emit(data)\n```\n\nCredits\n=======\n\n- roel.vandenberg@nelen-schuurmans.nl started this library\n\n\nChangelog of lizard-connector\n===================================================\n\n\n0.7.1 (2018-04-17)\n------------------\n\n- Nothing changed yet.\n\n\n0.7 (2018-04-17)\n----------------\n\n- Added Client.\n\n- Added parsers (scientific, json).\n\n- Added callbacks.\n\n- Renamed Endpoint `download...` methods to `get...`.\n\n\n0.6 (2018-02-07)\n----------------\n\n- Add explicit py2/3 imports to mitigate problems with the ``future`` library.\n\n\n0.5 (2017-10-16)\n----------------\n\n- Compatible with python 2.7.\n\n- Refactored pagination.\n\n- Added Async downloads with callback.\n\n- Removes max_result on Endpoint initialisation.\n\n\n0.4 (2016-06-05)\n----------------\n\n- Fixed bug in iteration over paginated results.\n\n- When all_pages is set to False all methods involving get return the object as\n an iterator.\n\n\n0.3 (2016-05-06)\n----------------\n\n- Http base urls are not allowed, throws exception when baseurl is not secure\n (i.e. does not start with https).\n\n- Fixed a bug that caused a get to run two times.\n\n\n0.2 (2016-05-04)\n----------------\n\n- Added Datatype classes.\n\n- Renamed Endpoint get and post to download and upload.\n\n\n0.1 (2016-03-29)\n----------------\n\n- Basic setup\n\n- Added tests\n\n- Initial project structure created with nensskel 1.37.dev0.", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://demo.lizard.net", "keywords": "lizard,rest,interface,api", "license": "GPL", "maintainer": "", "maintainer_email": "", "name": "lizard-connector", "package_url": "https://pypi.org/project/lizard-connector/", "platform": "", "project_url": "https://pypi.org/project/lizard-connector/", "project_urls": { "Homepage": "http://demo.lizard.net" }, "release_url": "https://pypi.org/project/lizard-connector/0.7.1/", "requires_dist": null, "requires_python": "", "summary": "A connector to connect to the Lizard-API (https://demo.lizard.net/api/v2/) with Python.", "version": "0.7.1" }, "last_serial": 5216334, "releases": { "0.6": [ { "comment_text": "", "digests": { "md5": "3f58d8edc68f72b8b5a8c2ddd81d0308", "sha256": "bcbd9f26b93ae342aea72d3a67962bf9f13b812b0a978e50710954b92e02b80d" }, "downloads": -1, "filename": "lizard-connector-0.6.tar.gz", "has_sig": false, "md5_digest": "3f58d8edc68f72b8b5a8c2ddd81d0308", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 23225, "upload_time": "2019-05-02T10:22:25", "url": "https://files.pythonhosted.org/packages/fb/0c/f35e2d427471b4c5551121300f87baf02b0ef4068a685ce068c1aeaf662e/lizard-connector-0.6.tar.gz" } ], "0.7": [ { "comment_text": "", "digests": { "md5": "4e2e878d71c2f31ba96fc75baf932c17", "sha256": "7aec948a6aa790826568aaec58a7f3ffef57012a88e987f65fa30253e36ca88d" }, "downloads": -1, "filename": "lizard-connector-0.7.tar.gz", "has_sig": false, "md5_digest": "4e2e878d71c2f31ba96fc75baf932c17", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 62326, "upload_time": "2018-04-17T07:22:26", "url": "https://files.pythonhosted.org/packages/24/5f/a63d295818127c718f0cc0ccbc41d8b026f5943cc9ad1e901850a43a422d/lizard-connector-0.7.tar.gz" } ], "0.7.1": [ { "comment_text": "", "digests": { "md5": "9e7b756a82b76119fc68b86db1344db3", "sha256": "d7e7cb427463c1d200100ace4998c642cd45db9cca0bfd99a388da3410b0a477" }, "downloads": -1, "filename": "lizard-connector-0.7.1.tar.gz", "has_sig": false, "md5_digest": "9e7b756a82b76119fc68b86db1344db3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 62424, "upload_time": "2018-04-17T07:34:45", "url": "https://files.pythonhosted.org/packages/21/85/a2401a8398cbfc70a00c5938b72caa43b251a0f0c2cc51399db81c3ada12/lizard-connector-0.7.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "9e7b756a82b76119fc68b86db1344db3", "sha256": "d7e7cb427463c1d200100ace4998c642cd45db9cca0bfd99a388da3410b0a477" }, "downloads": -1, "filename": "lizard-connector-0.7.1.tar.gz", "has_sig": false, "md5_digest": "9e7b756a82b76119fc68b86db1344db3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 62424, "upload_time": "2018-04-17T07:34:45", "url": "https://files.pythonhosted.org/packages/21/85/a2401a8398cbfc70a00c5938b72caa43b251a0f0c2cc51399db81c3ada12/lizard-connector-0.7.1.tar.gz" } ] }