Skip to main content

PP/Fields reader with pyfive-style high-level API

Project description

ppfive

A PP and Fields file reader that mimics relevant parts of the pyfive high-level API, with support for lazy metadata loading and parallel data loading when necessary.

This is NOT an alternative to pyfive, it is a package which makes pp and fields files look like and taste ("quack like") chunked HDF5 files written by a NetCDF library.

API Contract (ppfive vs pyfive)

ppfive is designed to be pyfive-compatible as far as likely users of pyfive would need such compatability. That is, it produces a chunk index (for kerchunk) if you really want that, and it supports all the information needed by CF/CFDM workflows to make pp-data as CF-compliant as possible.

For the canonical pyfive interface, see the pyfive docs:

What maps directly to pyfive

  • ppfive.File is registered as a pyfive.File virtual type (when pyfive is installed).
  • ppfive.Variable is registered as a pyfive.Dataset virtual type.
  • File/root-level members expected by pyfive-style callers are present:
    • attrs, groups, variables, dimensions, name, path, parent
  • Mapping-style access works:
    • f["var"], iteration over variables, items(), len(f)
  • Dataset-like variable members needed by downstream consumers are present:
    • shape, dtype, ndim, size, attrs, chunks/chunk_shape, file, parent
    • slicing/indexing via __getitem__ (for example f["var"][:])
    • read_direct, astype(...), iter_chunks(...)

Like pyfive, ppfive is Read-only:

- `File(..., mode="r")` is supported; write/update modes are not.

Important differences from pyfive

  • No nested groups in PP/Fields model:
    • f["group/var"] is not supported.
    • groups exists for compatibility but is empty for current PP/Fields inputs.
  • get_lazy_view(...) fallback behavior:
    • pyfive-style API entry exists, but returns the normal variable view with an info log.
  • Some Dataset properties are intentionally placeholders (None) because they are not meaningful for PP/Fields records:
    • compression, compression_opts, shuffle, fletcher32, maxshape, fillvalue, dims, scaleoffset, external, is_virtual.
  • Compatibility metadata is synthesized for CF/cfdm bridging:
    • dimension-scale datasets and DIMENSION_LIST are created where needed.
    • rotated-grid helper variables (for example latitude, longitude, rotated_latitude_longitude) may be exposed when implied by UM headers.
  • ppfive-specific extension API:
    • File.set_parallelism(thread_count=..., cat_range_allowed=...) is provided by ppfive and is not part of pyfive.

Practical expectation

If your code treats ppfive.File and ppfive.Variable as pyfive-like read objects, common analysis workflows should work, including chunk-level access (pp records are treated as chunks).

Authorship

Key authors of this package are:

  • David Hassell (@davidhassell)
  • Alan Iwi (@alaniwi)
  • Bryan Lawrence (@bnlawrence)

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

ppfive-0.1.0.tar.gz (19.7 MB view details)

Uploaded Source

Built Distributions

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

ppfive-0.1.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (145.8 kB view details)

Uploaded CPython 3.14manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

ppfive-0.1.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (145.6 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

ppfive-0.1.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (145.5 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

ppfive-0.1.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (145.8 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

File details

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

File metadata

  • Download URL: ppfive-0.1.0.tar.gz
  • Upload date:
  • Size: 19.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for ppfive-0.1.0.tar.gz
Algorithm Hash digest
SHA256 22456d51227159bb03c39c6f9b1ae55e8467a2f1bfc49dd41d53f306d3f4ef86
MD5 886baec741fb38b26e87f537dffc43ec
BLAKE2b-256 09a1c005163a065d0c30c25cc5510b97d966e71b86902d6da7ee493dbb3e2c25

See more details on using hashes here.

Provenance

The following attestation bundles were made for ppfive-0.1.0.tar.gz:

Publisher: build-and-deploy-wheels-on-pypi.yml on NCAS-CMS/ppfive

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ppfive-0.1.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for ppfive-0.1.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 df5c67cc158397161d1f2ed3d504cb81b9e4b83521bf36fc2aab6db8d31b83a1
MD5 1912359efb4abf1b9790c42217c6dc96
BLAKE2b-256 35ba7926848e478c3b2ccb0e2ce06441141f9f709487deeb6f5439f9e3b49bb1

See more details on using hashes here.

Provenance

The following attestation bundles were made for ppfive-0.1.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl:

Publisher: build-and-deploy-wheels-on-pypi.yml on NCAS-CMS/ppfive

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ppfive-0.1.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for ppfive-0.1.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 c43d6170c93e0fbf90dfc56d825ba7e98c1ee38f26ef41a9d01e644b1b79f1c7
MD5 7bf3549c8e3b7a8eb62f4a809fbd3595
BLAKE2b-256 0bdcf1bb721f9032778b0afbb8d5ab1f2c7575a6ad61ebc63e04e398a0a66c24

See more details on using hashes here.

Provenance

The following attestation bundles were made for ppfive-0.1.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl:

Publisher: build-and-deploy-wheels-on-pypi.yml on NCAS-CMS/ppfive

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ppfive-0.1.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for ppfive-0.1.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 ac66434a2dcfc4c260d483aa2208647e5f6dde88ed3847a9edbf706871a0a96d
MD5 9dc4ce35101a7a638b801a1b388b05c2
BLAKE2b-256 4b82cceb5dea629d5a3a1b93c2e448059f305248ccaabf2984046cd10ebdad33

See more details on using hashes here.

Provenance

The following attestation bundles were made for ppfive-0.1.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl:

Publisher: build-and-deploy-wheels-on-pypi.yml on NCAS-CMS/ppfive

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ppfive-0.1.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for ppfive-0.1.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 c4c94479acf7c35592786ebca2171ceaf2d7b2c6dc63b0009f3f1cefc3c293f2
MD5 a2626a650ff1c7b154acfcad66c880a7
BLAKE2b-256 596529d8bc466602ec331cca4a0a1c3ee6aa4d58e27d1efcba61207b16475d08

See more details on using hashes here.

Provenance

The following attestation bundles were made for ppfive-0.1.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl:

Publisher: build-and-deploy-wheels-on-pypi.yml on NCAS-CMS/ppfive

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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