{ "info": { "author": "Indra Rudianto", "author_email": "indrarudianto.official@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Console", "Intended Audience :: Science/Research", "Natural Language :: English", "Operating System :: POSIX :: Linux", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9" ], "description": "# webobsclient\n\nWebObs Python client.\n\n## Installation\n\n**webobsclient** is available on PyPI. You can install the latest version by\ntyping this command:\n\n pip install -U webobsclient\n\n## Making Requests\n\nYou need to specify `username` and `password` credentials of your WebObs login\naccess in order to make a request. For example:\n\n```python\nimport webobsclient\n\nclient = webobsclient.MC3Client(username='USER', password='PASSWORD')\nresponse, content = client.request(\n slt=0, y1=2019, m1=6, d1=15, h1=0, y2=2019, m2=7, d2=15, h2=4, type='ALL',\n duree='ALL', ampoper='eq', amplitude='ALL', locstatus=0, located=0,\n hideloc=0, mc='MC3', dump='bul', graph='movsum')\n\nprint(response)\nprint(content)\n```\n\nSometimes, using `y1`, `m1`, `d1`, and `h1` options are inconvenient. You can\nuse `starttime`, and `endtime` options indicating the time range of your\nrequest. For example:\n\n```python\nimport webobsclient\n\nclient = webobsclient.MC3Client(username='USER', password='PASSWORD')\nresponse, content = client.request(\n starttime='2019-06-15 12:00:00', endtime='2019-07-15 12:00:00', slt=0,\n type='ALL', duree='ALL', ampoper='eq', amplitude='ALL', locstatus=0,\n located=0, hideloc=0, mc='MC3', dump='bul', graph='movsum')\n\nprint(response)\nprint(content)\n```\n\nNote that `starttime` and `endtime` options are only available on `MC3Client`.\n\nAnother example for Sefran3 client:\n\n```python\nimport webobsclient\n\nclient = webobsclient.Sefran3Client(username='USER', password='PASSWORD')\nresponse, content = client.request(\n s3='SEFRAN', mc3='MC3', date='201907150829', id=550)\n\nprint(response)\nprint(content)\n```\n\nNote that date time in the request and WebObs are both in UTC time zone. If\nyou're using local time zone, you should convert it to UTC time zone before\nmaking the request.\n\n## Parsing MC3 CSV Bulletin\n\n`webobsclient` provides some utility classes to enable parsing MC3 CSV from\nWebObs response:\n\n```python\nimport webobsclient\nfrom webobsclient.parser import MC3Parser\n\nclient = webobsclient.MC3Client(username='USER', password='PASSWORD')\n\nresponse, content = client.request(\n type='VTA', starttime='2019-10-01', endtime='2019-10-31', slt=0,\n duree='ALL', ampoper='eq', amplitude='ALL', locstatus=0, located=0,\n hideloc=0, mc='MC3', dump='bul', graph='movsum')\n\nparser = MC3Parser(as_local_tz=True)\nprint(parser.to_dict(content))\n```\n\nThe above example request `VTA` earthquake event to the WebObs MC3 bulletin from\n`2019-10-01` to `2019-10-31`. We create a parser instance with\n`as_local_tz=True` option. This will convert any columns with date time type\nfrom UTC to Asia/Jakarta time zone because MC3Parser class uses Asia/Jakarta\ntime zone by default. Method `to_dict()` will convert MC3 CSV to Python\ndictionary. Parser class uses Pandas DataFrame as underlying data layer.\n\nMC3 CSV is parsed using pre-defined columns schema. You can see the columns\nschema in `webobsclient/schemas.py`.\n\nFor more information about available methods and options, see the source in\n`webobsclient/parser.py`.\n\n## Changing the WebObs Host\n\nThis package primarily used at BPPTKG to interact with our WebObs server.\nDefault WebObs host in library is `192.168.0.25`. If your WebObs host is\ndifferent, you can change the WebObs host as follows:\n\n```python\nimport webobsclient\n\nclient = webobsclient.MC3Client(username='USER', password='PASSWORD')\nclient.api.host = '192.168.5.10:8080'\n```\n\n## Supported WebObs Clients\n\nCurrently only WebObs MC3 and Sefran3 is supported. More client will be added in\nthe future version.\n\n## Support\n\nThis project is maintained by Indra Rudianto. If you have any question about\nthis project, you can contact him at .\n\n## License\n\nBy contributing to the project, you agree that your contributions will be\nlicensed under its MIT license. See\n[LICENSE](https://gitlab.com/bpptkg/webobsclient/blob/master/LICENSE) for\ndetails.", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://gitlab.com/bpptkg/webobsclient", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "webobsclient", "package_url": "https://pypi.org/project/webobsclient/", "platform": "", "project_url": "https://pypi.org/project/webobsclient/", "project_urls": { "Homepage": "https://gitlab.com/bpptkg/webobsclient" }, "release_url": "https://pypi.org/project/webobsclient/1.1.0/", "requires_dist": null, "requires_python": "", "summary": "WebObs Python Client", "version": "1.1.0", "yanked": false, "yanked_reason": null }, "last_serial": 10976179, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "c0e6d91210f02d6c18221ad2ce193e92", "sha256": "e89af98e43e88a73c7b20b783dc659fff7d34e692869e58d0d8c54ff03a52f5a" }, "downloads": -1, "filename": "webobsclient-0.1.0.tar.gz", "has_sig": false, "md5_digest": "c0e6d91210f02d6c18221ad2ce193e92", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8635, "upload_time": "2019-10-28T08:10:11", "upload_time_iso_8601": "2019-10-28T08:10:11.752801Z", "url": "https://files.pythonhosted.org/packages/2a/6a/90092f2d3da982075877961f9cddbf0a8993cec61e29a20fbadf7fbc5dda/webobsclient-0.1.0.tar.gz", "yanked": false, "yanked_reason": null } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "fa78f4e32fe1faed3c5f72a93324c8a8", "sha256": "d4b4009c2b10539937e9361c324c20009f9e80a5c4ab36c5323e5071f2d76807" }, "downloads": -1, "filename": "webobsclient-0.2.0.tar.gz", "has_sig": false, "md5_digest": "fa78f4e32fe1faed3c5f72a93324c8a8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9059, "upload_time": "2019-11-02T09:26:16", "upload_time_iso_8601": "2019-11-02T09:26:16.444914Z", "url": "https://files.pythonhosted.org/packages/7f/3a/f388f49e139a12f60c6a580d61941b543dc1c5b76c437a79036c9045d6ea/webobsclient-0.2.0.tar.gz", "yanked": false, "yanked_reason": null } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "b2642cfa88c3645f149e41defa9d9fdc", "sha256": "9a6d67313d1239e0ae5455b1b093e844677ba52faccb66c473b4db0c7ef6b8f9" }, "downloads": -1, "filename": "webobsclient-1.0.0.tar.gz", "has_sig": false, "md5_digest": "b2642cfa88c3645f149e41defa9d9fdc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13521, "upload_time": "2021-07-18T07:01:55", "upload_time_iso_8601": "2021-07-18T07:01:55.644106Z", "url": "https://files.pythonhosted.org/packages/1b/08/806fa90503c3b03579aef897c750f21f5b646d1340682859dbed36e5a198/webobsclient-1.0.0.tar.gz", "yanked": false, "yanked_reason": null } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "4b7fda6295c43b96b03cec81553eec72", "sha256": "c6911d1f009d7187d76afc2327b8ab9ac694feada9d30c82381f7c1048dac8bb" }, "downloads": -1, "filename": "webobsclient-1.1.0.tar.gz", "has_sig": false, "md5_digest": "4b7fda6295c43b96b03cec81553eec72", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14289, "upload_time": "2021-07-22T10:03:01", "upload_time_iso_8601": "2021-07-22T10:03:01.422878Z", "url": "https://files.pythonhosted.org/packages/9b/f8/0785a8d510b7734c13866a8c23ee33dc576ba21bbd8446d444e6f9359aec/webobsclient-1.1.0.tar.gz", "yanked": false, "yanked_reason": null } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "4b7fda6295c43b96b03cec81553eec72", "sha256": "c6911d1f009d7187d76afc2327b8ab9ac694feada9d30c82381f7c1048dac8bb" }, "downloads": -1, "filename": "webobsclient-1.1.0.tar.gz", "has_sig": false, "md5_digest": "4b7fda6295c43b96b03cec81553eec72", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14289, "upload_time": "2021-07-22T10:03:01", "upload_time_iso_8601": "2021-07-22T10:03:01.422878Z", "url": "https://files.pythonhosted.org/packages/9b/f8/0785a8d510b7734c13866a8c23ee33dc576ba21bbd8446d444e6f9359aec/webobsclient-1.1.0.tar.gz", "yanked": false, "yanked_reason": null } ], "vulnerabilities": [] }