{ "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 :: Indonesian", "Operating System :: POSIX :: Linux", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7" ], "description": "# bmaclient\n\nBPPTKG Monitoring API Python Client\n\n## Installation\n\nInstall from PyPI by typing this command:\n\n pip install -U bmaclient\n\n## Requirements\n\n* Python 3.5+\n* httplib2\n* six\n\n## Making Requests\n\nYou must set valid API key or OAuth2 access token to make authenticated\nrequest. For example, using API key:\n\n```python\nfrom bmaclient import MonitoringAPI\n\napi = MonitoringAPI(api_key='API_KEY')\ncontent = api.fetch_bulletin()\nprint(content)\n```\n\nOr using access token:\n\n```python\nfrom bmaclient import MonitoringAPI\n\napi = MonitoringAPI(access_token='ACCESS_TOKEN')\ncontent = api.fetch_bulletin()\nprint(content)\n```\n\nUsing API key is only suitable for read only request. If you want to modify\nserver resource, It's **recommended** to use OAuth2 access token.\n\nYou can apply field lookup filtering by passing keyword arguments:\n\n```python\ncontent = api.fetch_bulletin(eventdate__gte='2019-07-01',\n eventdate__lt='2019-07-11',\n eventtype='MP',\n nolimit=True)\nprint(content)\n```\n\nFor the API that requires parameters to be set in the URL path, you can pass\nthose parameters in the method arguments:\n\n```python\ncontent = api.fetch_tiltmeter(station='selokopo', timestamp__gte='2019-07-01')\nprint(content)\n```\n\nFor the API that enable search filtering, you pass `search` keyword in the\nmethod arguments:\n\n```python\ncontent = api.search_slope(search='RB2')\nprint(content)\n\ncontent = api.search_users(search='indra')\nprint(content)\n```\n\n## Changing the API Host\n\nDefault API host for the libary is `192.168.5.10`. If you want to change the\nhost, for example using public IP or so, you can write the code as follow:\n\n```python\nfrom bmaclient import MonitoringAPI\n\napi = MonitoringAPI(api_key='API_KEY')\napi.host = 'SERVER_ADDRESS'\n```\n\nNote that you should include server port if the server doesn't use standard\nport. For example:\n\n```python\napi.host = 'SERVER_ADDRESS:PORT'\n```\n\n## Request Methods\n\nThe following URL paths are relative to the base API URL\n`http://192.168.5.10/api/v1/`.\n\n| API Name | URL Path | Python Method Name |\n| ---------------------------- | ------------------------------------ | ---------------------------- |\n| DOAS | `/doas/` | `fetch_doas` |\n| EDM | `/edm/` | `fetch_edm` |\n| Gas Emission | `/gas/emission/` | `fetch_gas_emission` |\n| Gas Temperature | `/gas/temperature/` | `fetch_gas_temperature` |\n| GPS Positon | `/gps/position/` | `fetch_gps_position` |\n| GPS Baseline | `/gps/baseline/` | `fetch_gps_baseline` |\n| RSAM Seismic | `/rsam/seismic/{station}/` | `fetch_rsam_seismic` |\n| RSAM Seismic Band | `/rsam/seismic/{station}/{band}/` | `fetch_rsam_seismic_band` |\n| RSAM Infrasound | `/rsam/infrasound/{station}/` | `fetch_rsam_infrasound` |\n| RSAM Infrasound Band | `/rsam/infrasound/{station}/{band}/` | `fetch_rsam_infrasound_band` |\n| Thermal | `/thermal/` | `fetch_thermal` |\n| Thermal v2 | `/thermal2/` | `fetch_thermal2` |\n| Tiltmeter Platform | `/tiltmeter/{station}/` | `fetch_tiltmeter` |\n| Tiltmeter Platform Raw | `/tiltmeter/raw/{station}/` | `fetch_tiltmeter_raw` |\n| Tiltmeter Borehole | `/tiltborehole/` | `fetch_tiltborehole` |\n| Seismicity | `/seismicity` | `fetch_seismicity` |\n| Seismic Bulletin | `/bulletin/` | `fetch_bulletin` |\n| Seismic Energy | `/energy/` | `fetch_energy` |\n| Seismic Magnitude | `/magnitude/` | `fetch_magnitude` |\n| EDM Slope Correction | `/slope/` | `fetch_slope` |\n| EDM Slope Correction Detail | `/slope/{pk}/` | `slope` |\n| Create EDM Slope Correction | `/slope/` | `create_slope` |\n| Replace EDM Slope Correction | `/slope/{pk}/` | `replace_slope` |\n| Update EDM Slope Correction | `/slope/{pk}/` | `update_slope` |\n| Search EDM Slope Correction | `/slope/` | `search_slope` |\n| User Profile Info | `/users/` | `fetch_users` |\n| User Detail | `/users/{pk}/` | `user` |\n| Search User | `/users/` | `search_users` |\n\nFor more information about BMA API, see [the BMA API documentation](http://192.168.5.10/docs/).\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## Credit\n\nThis project is highly inspired by [python-instagram](https://github.com/facebookarchive/python-instagram)\nproject and use the same design pattern.\nThe project is licensed under BSD license.\nSee [LICENSE](https://github.com/Instagram/python-instagram/blob/master/LICENSE.md) for details.\n\n## License\n\nBy contributing to the project, you agree that your contributions will be\nlicensed under its MIT license.\nSee [LICENSE](https://gitlab.com/bpptkg/bmaclient/blob/master/LICENSE) for details.", "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/bmaclient", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "bmaclient", "package_url": "https://pypi.org/project/bmaclient/", "platform": "", "project_url": "https://pypi.org/project/bmaclient/", "project_urls": { "Homepage": "https://gitlab.com/bpptkg/bmaclient" }, "release_url": "https://pypi.org/project/bmaclient/0.2.0/", "requires_dist": null, "requires_python": ">=3.5", "summary": "BPPTKG Monitoring API Python Client", "version": "0.2.0" }, "last_serial": 5967469, "releases": { "0.1.2": [ { "comment_text": "", "digests": { "md5": "17db3b9e600eb26f74a9200c69d875ae", "sha256": "5115d7424ad63908194d10b4a091948b9118f45b3ed3466df522a31bf617c34e" }, "downloads": -1, "filename": "bmaclient-0.1.2.tar.gz", "has_sig": false, "md5_digest": "17db3b9e600eb26f74a9200c69d875ae", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 8034, "upload_time": "2019-08-18T09:11:33", "url": "https://files.pythonhosted.org/packages/13/e3/518bebdd671b54b08d92e220f113eda2f2dad21235ef68f4660db32bd7f5/bmaclient-0.1.2.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "89f539411132d23d73dafe895903181f", "sha256": "cb924dfcd2ed41ec986a3a77221d78c6720d92bdb62fef3d09fd43e540c8090d" }, "downloads": -1, "filename": "bmaclient-0.2.0.tar.gz", "has_sig": false, "md5_digest": "89f539411132d23d73dafe895903181f", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 8280, "upload_time": "2019-10-13T14:02:14", "url": "https://files.pythonhosted.org/packages/73/8a/8b150b2172e6192a6e4967924d19aeb3b127ee28be0adbb364709f43ecea/bmaclient-0.2.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "89f539411132d23d73dafe895903181f", "sha256": "cb924dfcd2ed41ec986a3a77221d78c6720d92bdb62fef3d09fd43e540c8090d" }, "downloads": -1, "filename": "bmaclient-0.2.0.tar.gz", "has_sig": false, "md5_digest": "89f539411132d23d73dafe895903181f", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 8280, "upload_time": "2019-10-13T14:02:14", "url": "https://files.pythonhosted.org/packages/73/8a/8b150b2172e6192a6e4967924d19aeb3b127ee28be0adbb364709f43ecea/bmaclient-0.2.0.tar.gz" } ] }