Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sankichi92/gportal-python
Python client for JAXA G-Portal Catalogue Service and SFTP
https://github.com/sankichi92/gportal-python
python-package
Last synced: 23 days ago
JSON representation
Python client for JAXA G-Portal Catalogue Service and SFTP
- Host: GitHub
- URL: https://github.com/sankichi92/gportal-python
- Owner: sankichi92
- License: mit
- Created: 2023-03-22T11:51:07.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-04-12T02:18:23.000Z (9 months ago)
- Last Synced: 2024-04-14T09:45:21.257Z (9 months ago)
- Topics: python-package
- Language: Python
- Homepage: https://gportal.readthedocs.io
- Size: 8.86 MB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# gportal-python
Unofficial python client for [G-Portal](https://gportal.jaxa.jp/) Catalogue Service and SFTP.
This package is distributed under the [MIT License](https://mit-license.org/), but the data that can be retrieved through this package is provided under [G-Portal Terms of Use](https://gportal.jaxa.jp/gpr/index/eula).
Please make sure to review them before using the G-Portal data.## Installation
$ pip install gportal
## Quickstart
```python
import gportal# Get the dictionary of the G-Portal dataset.
# It corresponds to the "spacecraft/sensor" search tree of the Web UI.
datasets = gportal.datasets()# Build a search query.
res = gportal.search(
dataset_ids=datasets["GCOM-C/SGLI"]["LEVEL2"]["Land area"]["L2-LST"],
start_time="2023-03-25T00:00:00",
end_time="2023-03-25T23:59:59",
bbox=[130, 30, 140, 40],
params={
# You can add more parameters.
# See Appendix 7 of G-Portal User's Manual for more details:
# https://gportal.jaxa.jp/gpr/assets/mng_upload/COMMON/upload/GPortalUserManual_en.pdf
},
)print("Matched:", res.matched())
# Get the resulting products.
products = res.products()# Download the product files via SFTP.
gportal.username = "sankichi92"
gportal.password = "**********" # If env var GPORTAL_PASSWORD is set, the value is used.
gportal.download(products, local_dir="path/to/download/dir")
```## Documentation
https://gportal.readthedocs.io/
## Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/sankichi92/gportal-python.
This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/sankichi92/gportal-python/blob/main/CODE_OF_CONDUCT.md).## Development
This project uses [Poetry](https://python-poetry.org/).
### Install dependencies
$ poetry install
### Run the test suite
$ poetry run pytest
### Start the docs server
$ poetry run mkdocs serve
### Release a new version
1. Bump the version in `pyproject.toml` by [`poetry version`](https://python-poetry.org/docs/cli/#version) and commit it.
2. Create a git tag for the new version.
3. Push it to GitHub, and then the `publish-package` workflow starts.