Skip to main content

Pure Rust HEC-DSS version 7 file reader/writer with Python bindings

Project description

dss-python

PyO3 native Python module for HEC-DSS version 7 files. Zero C library dependency.

Installation

cd crates/dss-python
pip install maturin
maturin build --release
pip install ../../target/wheels/dss_python-*.whl

Quick Start

import hecdss_rs
import numpy as np

with hecdss_rs.DssFile.create("example.dss") as dss:
    # Time series
    dss.write_ts("/A/B/FLOW/01JAN2020/1HOUR/SIM/",
                 np.array([100.0, 200.0, 300.0]), "CFS", "INST-VAL")
    values = dss.read_ts("/A/B/FLOW/01JAN2020/1HOUR/SIM/")  # numpy array

    # Catalog with wildcards
    entries = dss.catalog(filter="/*/*/FLOW///*/")

    # Date conversion
    j = hecdss_rs.DssFile.date_to_julian("15MAR2020")
    y, m, d = hecdss_rs.DssFile.julian_to_ymd(j)

All Operations

35+ methods covering: text, regular/irregular time series, paired data, arrays, location, grids, delete/undelete, squeeze, copy, aliases, CRC tracking, date utilities, wildcard catalog filtering.

See Python API Reference for complete documentation.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

hecdss_rs-0.1.0-cp311-cp311-win_amd64.whl (284.2 kB view details)

Uploaded CPython 3.11Windows x86-64

File details

Details for the file hecdss_rs-0.1.0-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for hecdss_rs-0.1.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 542e6b43ab810654f34c3b063f60559fbc0e5dced4271edb85ebe58e9df11be7
MD5 9ee16c1a6479a1ca4107b905b752aa55
BLAKE2b-256 ef5caa7cdb0888161eff0b82226847d6694ac73fb119b559367eae38f22fccfb

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