Skip to main content

gportal-python

Unofficial python client for G-Portal Catalogue Service and SFTP.

This package is distributed under the MIT License, but the data that can be retrieved through this package is provided under G-Portal Terms of Use. Please make sure to review them before using the G-Portal data.

Installation

$ pip install gportal

Quickstart

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.

Development

This project uses Poetry.

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 and commit it.
  2. Create a git tag for the new version.
  3. Push it to GitHub, and then the publish-package workflow starts.

Release files for gportal 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gportal 0.4.0
File Size Uploaded
gportal-0.4.0.tar.gz 17.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for gportal 0.4.0
File Interpreter ABI Platform
gportal-0.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 36.4 kB

Release files / gportal-0.4.0.tar.gz

Download URL gportal-0.4.0.tar.gz
Size 17.6 kB
Tags Source
SHA-256 checksum
How to use checksums
e6ef5b3cb801ccc2a4d27c00d9cbb0a0f3e8a1c74d72f153cfa5ba8f2df31d39
BLAKE2b-256 checksum
How to use checksums
b520e89e973fe69b8fffa87053ca15e15433118f06eeaeebb713c43d08725a2f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.4.2 CPython/3.10.6 Linux/5.15.0-1037-azure

Release files / gportal-0.4.0-py3-none-any.whl

Download URL gportal-0.4.0-py3-none-any.whl
Size 18.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bcfe26ff92b9923428629a8a761c20ea9784b1e10312d3332af57d45a731dd6b
BLAKE2b-256 checksum
How to use checksums
0787a35883e2804398628c41d282f6c20c64aef34d8c184a9ffb5963b26cd9d8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.4.2 CPython/3.10.6 Linux/5.15.0-1037-azure

Release history Release notifications | RSS feed

This release

0.4.0 This release

2 release files

0.3.0

2 release files

0.2.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page