Metadata-Version: 2.1
Name: cl-hubeau
Version: 0.1.1
Summary: Hubeau client to collect data from the different APIs
Home-page: https://github.com/tgrandje/cl-hubeau/
License: GPL-3.0-or-later
Keywords: france,water,hydrology
Author: Thomas Grandjean
Author-email: thomas.grandjean@developpement-durable.gouv.fr
Requires-Python: >=3.9,<4.0
Classifier: Development Status :: 1 - Planning
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering
Requires-Dist: diskcache (>=5.6.3,<6.0.0)
Requires-Dist: geopandas (>=1.0.1,<2.0.0)
Requires-Dist: importlib-metadata (>=8.2.0,<9.0.0)
Requires-Dist: pandas (>=2.2.2,<3.0.0)
Requires-Dist: pebble (>=5.0.7,<6.0.0)
Requires-Dist: platformdirs (>=4.2.2,<5.0.0)
Requires-Dist: requests-cache (>=1.2.1,<2.0.0)
Requires-Dist: tqdm (>=4.66.4,<5.0.0)
Project-URL: Documentation, https://github.com/tgrandje/cl-hubeau/
Project-URL: Repository, https://github.com/tgrandje/cl-hubeau/
Description-Content-Type: text/markdown

# cl-hubeau

Simple hub'eau client for python

This package is currently under active development.
Every API on [Hub'eau](hubeau.eaufrance.fr/) will be covered by this package in due time.

## Basic examples

### Piezometry

3 high level functions are available (and one class for more low level operations).

```python

from cl_hubeau.piezometry import get_all_stations, get_chronicles, get_realtime_chronicles, PiezometrySession


# Get all piezometers (uses a 30 days caching)

gdf = get_all_stations()

# Get chronicles for the first 100 piezometers (uses a 30 days caching)

df = get_chronicles(gdf["code_bss"].head(100).tolist())

# Get realtime data for the first 100 piezometers (no cache stored)

df = get_realtime_chronicles(gdf["code_bss"].head(100).tolist())

# Low level class to perform the same tasks:
# (note that the API is currently forbidding results > 20k rows and you may need inner loops)

with PiezometrySession() as session:
    df = session.get_chronicles(code_bss="07548X0009/F")
    df = session.get_stations(code_departement=['02', '59', '60', '62', '80'], format="geojson")
    df = session.get_chronicles_real_time(code_bss="07548X0009/F")

```
