Skip to main content

Python library to read-write HEC-DSS database file

Project description

About pydsstools

pydsstools is a Cython based Python library to manipulate HEC-DSS database file. It supports regular/irregular time-series, paired data series and spatial grid records. It is compatible with 64-bit Python on Windows 10 and Ubuntu like linux distributions. For the later, zlib, math, quadmath, and gfortran libraries must be installed. dssvue python library provides graphical user interface for HEC-DSS. There is also a Rust binding hecdss for HEC-DSS.

About HEC-DSS [1]

HEC-DSS is designed to be optimal for storing and retrieving large sets, or series, of data. HEC-DSS is not a relational database, but a database that is designed to retrieve and store large amounts of data quickly that are not necessarily interlinked to other sets of data, like relational databases are. Additionally, HEC-DSS provides a flexible set of utility programs and is easy to add to a user's application program. These are the features that distinguish HEC-DSS from most commercial relational database programs and make it optimal for scientific applications.

HEC-DSS uses a block of sequential data as the basic unit of storage. Each block contains a series of values of a single variable over a time span appropriate for most applications. The basic concept underlying HEC-DSS is the organization of data into records of continuous, applications-related elements as opposed to individually addressable data items. This approach is more efficient for scientific applications than a relational database system because it avoids the processing and storage overhead required to assemble an equivalent record from a relational database.

Data is stored in blocks, or records, within a file and each record is identified by a unique name called a "pathname." Each time data is stored or retrieved from the file, its pathname is used to access its data. Information about the record (e.g., units) is stored in a "header array." This includes the name of the program writing the data, the number of times the data has been written to, and the last written date and time. HEC-DSS documents stored data completely via information contained in the pathname and stored in the header so no additional information is required to identify it. One data set is not directly related to another so there is no need to update other areas of the database when a new data set is stored. The self-documenting nature of the database allows information to be recognized and understood months or years after it was stored.

Because of the self-documenting nature of the pathname and the conventions adopted, there is no need for a data dictionary or data definition file as required with other database systems. In fact, there are no database creation tasks or any database setup. Both HEC-DSS utility programs and applications that use HEC-DSS will generate and configure HEC-DSS database files automatically. There is also no pre-allocation of space; the software automatically expands the file size as needed.

HEC-DSS references data sets, or records, by their pathnames. A pathname may consist of up to 391 characters and is, by convention, separated into six parts, which may be up to 64 characters each. Each part is delimited by a slashe "/", and is labeled "A" through "F", as follows: /A/B/C/D/E/F/.

A list of the pathnames in a DSS file is called a "catalog." In version 6, the catalog was a separate file; in version 7, the catalog is constructed directly from pathnames in the file.

Multi-user access mode is handled automatically by HEC-DSS. The user does not need to do anything to turn it on. Multi-user access allows multiple users, multiple processes, to read and write to the same HEC-DSS file at the same time. This is true for a network drive as well as a local drive. You can have a shared network HEC-DSS file that has several processes reading and writing to it at the same time. The only drawback is that file access may be slower, depending on the operating system.

  1. USACE, Hydrologic Engineering Center (July, 2019). HEC Data Storage System Guide (Draft).

Changes

changelog

Documentation

📖 The full documentation (generated with Sphinx) will be published soon.
In the meantime, please refer to the examples and the changelog for usage details and updates.

Dependencies

Build from source

Download the source files, open the command prompt in the root directory, and enter the following command. Note that the command prompt must be setup with build tools and python environment.

python -m build 

Installation from PyPI

pip install pydsstools

Contributing

All contributions, bug reports, bug fixes, documentation improvements, enhancements and ideas are welcome. Feel free to ask questions on my email.

License

This program is a free software: you can modify and/or redistribute it under 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

pydsstools-3.0.0b1.tar.gz (9.2 MB view details)

Uploaded Source

Built Distributions

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

pydsstools-3.0.0b1-cp312-cp312-win_amd64.whl (10.9 MB view details)

Uploaded CPython 3.12Windows x86-64

pydsstools-3.0.0b1-cp311-cp311-win_amd64.whl (10.9 MB view details)

Uploaded CPython 3.11Windows x86-64

pydsstools-3.0.0b1-cp310-cp310-win_amd64.whl (10.9 MB view details)

Uploaded CPython 3.10Windows x86-64

pydsstools-3.0.0b1-cp39-cp39-win_amd64.whl (10.9 MB view details)

Uploaded CPython 3.9Windows x86-64

pydsstools-3.0.0b1-cp38-cp38-win_amd64.whl (10.9 MB view details)

Uploaded CPython 3.8Windows x86-64

File details

Details for the file pydsstools-3.0.0b1.tar.gz.

File metadata

  • Download URL: pydsstools-3.0.0b1.tar.gz
  • Upload date:
  • Size: 9.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.13

File hashes

Hashes for pydsstools-3.0.0b1.tar.gz
Algorithm Hash digest
SHA256 96cb0f2667e77e5f02498ff7a7ee3c1a6e89bc45f5880f1de26eb626b6d36508
MD5 eb04051547068391a3f7bb555e316992
BLAKE2b-256 69aaa770d638e2d691ce822bb77fc677ac8ce74810ab135929fae0b373409962

See more details on using hashes here.

File details

Details for the file pydsstools-3.0.0b1-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for pydsstools-3.0.0b1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 dd49684b0d29d9521777dab24438214b570dec7f8452c1185f7c816925e9ed98
MD5 1d54004d698c6768f35e14729d0830b7
BLAKE2b-256 777a11e4c137ad6c90d388b9a837e673d177de79cc8ad3327139c8f75fe1318f

See more details on using hashes here.

File details

Details for the file pydsstools-3.0.0b1-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for pydsstools-3.0.0b1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 42c65f3cef07dcd6619cd4707726f9f92f687021bb466ea6389a4655c88d87fd
MD5 b6d86eaafe0a3382b47a09685dc6a2d9
BLAKE2b-256 1065008002bc7f6838365b75864b95b015643d2b04c8f8074f82849c9243fc11

See more details on using hashes here.

File details

Details for the file pydsstools-3.0.0b1-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for pydsstools-3.0.0b1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 9c00b87c56cf308496b05f748227984b16ad7c440439f3e1597505e147a45ccf
MD5 bdf268afbdb144c1169dc99511b90013
BLAKE2b-256 8099c4dd30094194676dd2f292b1fa3fdaa0c9cec7cbc4faa9df846f1905fa57

See more details on using hashes here.

File details

Details for the file pydsstools-3.0.0b1-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: pydsstools-3.0.0b1-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 10.9 MB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.13

File hashes

Hashes for pydsstools-3.0.0b1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 ff836e507a92113db42849b03ef7f276e25f446c6dc1a9470c2793cbc364443f
MD5 a904de800084cf9128b65f00533a9f94
BLAKE2b-256 e58ef3a5c3b6978d2756fc29a55cf234ca570aedb6ca230045011bbfffb6f15c

See more details on using hashes here.

File details

Details for the file pydsstools-3.0.0b1-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: pydsstools-3.0.0b1-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 10.9 MB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.13

File hashes

Hashes for pydsstools-3.0.0b1-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 4f3a393e330e70632af5a5308cd0f3081ec63016648121627a45229c23835317
MD5 f164ed13c400ae3f42fdfd2a7e82cf30
BLAKE2b-256 fe84e3f85ebfbacde5bb4d3802cf92890413987c689457bea3cea974ddc94aae

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