Skip to main content

Client for JAXA G-Portal Catalogue Service and SFTP

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gportal-0.4.0.tar.gz (17.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gportal-0.4.0-py3-none-any.whl (18.7 kB view details)

Uploaded Python 3

File details

Details for the file gportal-0.4.0.tar.gz.

File metadata

  • Download URL: gportal-0.4.0.tar.gz
  • Upload date:
  • Size: 17.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.2 CPython/3.10.6 Linux/5.15.0-1037-azure

File hashes

Hashes for gportal-0.4.0.tar.gz
Algorithm Hash digest
SHA256 e6ef5b3cb801ccc2a4d27c00d9cbb0a0f3e8a1c74d72f153cfa5ba8f2df31d39
MD5 5e595b0bbab535117348ae54e17fe18b
BLAKE2b-256 b520e89e973fe69b8fffa87053ca15e15433118f06eeaeebb713c43d08725a2f

See more details on using hashes here.

File details

Details for the file gportal-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: gportal-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 18.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.2 CPython/3.10.6 Linux/5.15.0-1037-azure

File hashes

Hashes for gportal-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bcfe26ff92b9923428629a8a761c20ea9784b1e10312d3332af57d45a731dd6b
MD5 b037398b39723a3ab49e1310d82d2478
BLAKE2b-256 0787a35883e2804398628c41d282f6c20c64aef34d8c184a9ffb5963b26cd9d8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page