GithubHelp home page GithubHelp logo

narlesky / hec-dss-python Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hydrologicengineeringcenter/hec-dss-python

0.0 0.0 0.0 596 KB

Python usage of hecdss.so https://github.com/HydrologicEngineeringCenter/hec-dss/tree/master/heclib/hecdss

License: MIT License

Python 100.00%

hec-dss-python's Introduction

HEC-DSS Python Wrapper

This repository contains a Python wrapper for the HEC-DSS file database C library. The provided DLL (hecdss.dll on Windows and hecdss.so on Linux) enables interaction with HEC-DSS files while abstracting memory management between Python and C.

Background

The HEC-DSS file database is a widely used data storage format for hydrological and environmental data. This repository provides a Python interface to interact with the HEC-DSS files using the provided C DLL. The primary goal is to enable Python applications to read data from and write data to HEC-DSS files.

Design

These are the driving design ideas and goals of the hec-dss-python project (subject to updates)

Feature What Why
hecdss.dll/libhecdss.so cross platform (Linux,Windows,Mac), cross language (.net, Python, Java) essential API decouple from underlying HEC-DSS Fortran/C Library (allow future DSS versions without C and Fortran backend)
Support only DSS 7 encourage migration from version 6 HEC is moving to DSS version 7 in 2023-2024.
Easy transition from Jython HEC products use an existing Java/Jython API. We will loosely follow that design simplify porting from Jython
hec_dss_native.py native binding layer isolate interactions with low level library(if performance is an issue this Ctypes layer can be replaced )
hec_dss.py Programmer entry point ; Python API Hides interactions with hec_dss_native, seek to be simple user experience
catalog.py manage list of DSS objects (catalog) create condensed catalog perspective
Pandas_Series_Utilities.py future NumPy/pandas support provide features such as dataframes, separate from hec-dss.py; can be developed by different/parallel developers
Easy to get started nothing to install, just copy python files and shared library require minimal privileges to install

Features

  • Read and write data from HEC-DSS files using the provided C DLL.
  • Abstracted memory management: Python allocates memory for arrays passed to the DLL, which the C code then populates.
  • Cross-platform support: hecdss.dll for Windows and hecdss.so for Linux.
  • Potential for future storage backend expansion (e.g., SQLite, HDF5) without altering the API.
  • Language-agnostic approach similar to the .NET implementation (hec-dss-dotnet).
  • No package installation required because the library is using python-ctypes to interact with the DLL.

Getting Started

  1. Clone this repository to your local machine.
  2. Place the appropriate hecdss.dll or hecdss.so file for your platform in the repository's root directory.

Contributing

Contributions to this project are welcome! If you find any issues, have suggestions, or want to add new features, please open an issue or submit a pull request.

hec-dss-python's People

Contributors

flowmatric avatar ktarbet avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.