Skip to main content

CSW (Catalog Services for the Web) and SFTP client for JAXA G-Portal

Project description

gportal-python

Python CSW (Catalog Services for the Web) and SFTP client for G-Portal.

Installation

$ pip install gportal

Quickstart

import gportal
import os

# Get the dictionary of the G-Portal dataset, which corresponds to the spacecraft / sensor search tree of Web UI.
datasets = gportal.datasets()

# Build the 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={
        # Additional parameters.
        # See Appendix 7 of G-Portal User's Manual for more detail.
    },
)

print(f"Matched: {res.matched()}")

# Get a generator of Product, which represents a search result (GeoJSON).
products = res.products()

# Download the product files.
with gportal.sftp(username="sankichi92", password=os.getenv("GPORTAL_PASSWORD")) as sftp:
    sftp.download(
        remote_paths=[product.data_path for product in products],
        local_dir="path/to/download/dir",
    )

Development

This project uses Poetry as a package manager.

Install dependencies

$ poetry install

Run the test suite

$ poetry run pytest

License

MIT License

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.1.0.tar.gz (4.4 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.1.0-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: gportal-0.1.0.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.1 CPython/3.10.6 Linux/5.15.0-1034-azure

File hashes

Hashes for gportal-0.1.0.tar.gz
Algorithm Hash digest
SHA256 66ecc53969d4705c596405883c6ad19af99c6826919163ce39b759d924e5ab58
MD5 5f7a6658903acaef36f49dc37befb77c
BLAKE2b-256 0e170e48e411ddded59b4d79ef9c706157b15c334bf0f3bd9cfebed601cd7303

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for gportal-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 68cdd5179a251580165ae06bb1e175236836f7553255dc7c7ec327c0ec8c6d97
MD5 25b5dffb38b32590824c409ada741ab6
BLAKE2b-256 964614fad645f8e43e78ee8db29ecb2f724d72bbf620fa15ece88adf3af2234b

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