Skip to main content

Python client for the Bio-ORACLE ERDDAP server.

Project description

pyo_oracle

Python client for the Bio-ORACLE ERDDAP server.

Discover, inspect, subset, download, and load Bio-ORACLE marine environmental layers (temperature, salinity, nutrients, sea ice, and more) from Python. pyo_oracle is the Python counterpart of the R package biooracler and is built on erddapy.

📖 Documentation: https://bio-oracle.github.io/pyo_oracle/

Installation

# With pip
pip install pyo-oracle

# Load layers as xarray (optional extra)
pip install "pyo-oracle[xarray]"

# With conda
conda create -n pyo_oracle conda-forge::pyo-oracle

Quick start

import pyo_oracle as pyo

# 1. List available layers (filter by search term, variable, scenario, depth, ...)
pyo.list_layers(search="Temperature")

# 2. Inspect a layer: dimension ranges + variables and units
pyo.info_layer("thetao_baseline_2000_2019_depthsurf")

# 3. Build constraints from friendly bounds (no hand-written dicts)
constraints = pyo.build_constraints(
    "thetao_baseline_2000_2019_depthsurf",
    time=("2000-01-01T00:00:00Z", "2010-01-01T00:00:00Z"),
    latitude=(0, 10),
    longitude=(0, 10),
)

# 4a. Load directly into memory (pandas or xarray)
df = pyo.load_layer(
    "thetao_baseline_2000_2019_depthsurf",
    constraints=constraints,
    variables=["thetao_mean"],
)
ds = pyo.load_layer(
    "thetao_baseline_2000_2019_depthsurf",
    constraints=constraints,
    fmt="xarray",
)

# 4b. Or download to a file (NetCDF by default)
pyo.download_layers(
    "thetao_baseline_2000_2019_depthsurf",
    constraints=constraints,
    variables=["thetao_mean"],
)

# 5. See local data
pyo.list_local_data()

Key functions

Function Purpose
list_layers List/filter available layers
info_layer Inspect a layer's dimensions and variables
build_constraints Build griddap constraints from (min, max) bounds + strides
load_layer Load a layer into memory (pandas or xarray)
download_layers Download a layer (NetCDF/CSV), optionally a variable subset
list_local_data List downloaded files

Contributing

See CLAUDE.md for the dev setup, testing, and release flow. Please open an issue if you experience any problems.

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

pyo_oracle-1.0.0.tar.gz (18.0 kB view details)

Uploaded Source

Built Distribution

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

pyo_oracle-1.0.0-py3-none-any.whl (15.6 kB view details)

Uploaded Python 3

File details

Details for the file pyo_oracle-1.0.0.tar.gz.

File metadata

  • Download URL: pyo_oracle-1.0.0.tar.gz
  • Upload date:
  • Size: 18.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.25

File hashes

Hashes for pyo_oracle-1.0.0.tar.gz
Algorithm Hash digest
SHA256 1cc3c72b4a6bca5c488721d15e3fdc1efff4bdbddb46d8430d03a59f7b0fdaea
MD5 69dbac979441b05871a8c6e9cb5696b5
BLAKE2b-256 2ce1e8c81295cace3a0c520f6822a1c03727332c2bdf38ef97d96e4c3142c619

See more details on using hashes here.

File details

Details for the file pyo_oracle-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: pyo_oracle-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 15.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.25

File hashes

Hashes for pyo_oracle-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 43806bb0c3f2b62d4bfb33daddc44e881dbd95d3aef278ddda7ea699d08272c6
MD5 5d8d35df2941a57efbc84124bbe201de
BLAKE2b-256 24e60a2729d5490bbbe471af190d5f807ce8764c52ef6844d4acd13e90c0e9e0

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