Skip to main content

FEWS OpenAPI Python Client

A Python client library for accessing the Delft-FEWS Web Services REST API v1. This library provides a type-safe, auto-generated interface to interact with FEWS (Flood Early Warning System) web services.

Table of contents

Features

  • Type-safe: Fully typed Python client with type hints
  • Auto-generated: Generated from the official FEWS OpenAPI specification
  • Async support: Both synchronous and asynchronous API calls
  • Comprehensive: Covers all FEWS REST API v1 endpoints including:
    • Time series data
    • Archive operations
    • Display groups and filters
    • Parameters, locations, and qualifiers
    • Workflow and task management
    • And much more

Installation

From PyPI

uv add fews-openapi-py-client

or:

pip install fews-openapi-py-client

From Source

Clone the repository and install the generated client:

cd fews-openapi-py-client
uv pip install -e .

Using UV

uv add ./fews-openapi-py-client

Usage

Basic Example

from fews_openapi_py_client import Client
from fews_openapi_py_client.api.timeseries import timeseries

# Create a client
client = Client(base_url="https://your-fews-server.com/FewsWebServices")

# Fetch time series data
response = timeseries.sync_detailed(
    client=client,
    filter_id="your_filter_id",
    location_ids="location1,location2",
    start_time="2024-01-01T00:00:00Z",
    end_time="2024-01-31T23:59:59Z"
)

if response.status_code == 200:
    data = response.parsed
    # Process your time series data

Async Example

import asyncio
from fews_openapi_py_client import Client
from fews_openapi_py_client.api.timeseries import timeseries

async def fetch_data():
    client = Client(base_url="https://your-fews-server.com/FewsWebServices")

    response = await timeseries.asyncio_detailed(
        client=client,
        filter_id="your_filter_id",
        location_ids="location1,location2",
        start_time="2024-01-01T00:00:00Z",
        end_time="2024-01-31T23:59:59Z"
    )

    return response.parsed

# Run the async function
data = asyncio.run(fetch_data())

Client Configuration

Configure the client with custom settings:

from fews_openapi_py_client import Client

client = Client(
    base_url="https://your-fews-server.com/FewsWebServices",
    timeout=30.0,  # Request timeout in seconds
    verify_ssl=True,  # SSL certificate verification
    headers={
        "Authorization": "Bearer your_token",
        "Custom-Header": "value"
    }
)

Contributing and releases

Development, client generation, post-processing, and PyPI release instructions are documented in CONTRIBUTING.md.

Metadata

Release files for fews-openapi-py-client 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fews-openapi-py-client 0.2.0
File Size Uploaded Provenance Actions
fews_openapi_py_client-0.2.0.tar.gz 108.6 kB With provenance Details for fews_openapi_py_client-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for fews-openapi-py-client 0.2.0
File Interpreter ABI Platform Actions
fews_openapi_py_client-0.2.0-py3-none-any.whl Python 3 none any Details for fews_openapi_py_client-0.2.0-py3-none-any.whl

Total release size: 377.5 kB

Release files / fews_openapi_py_client-0.2.0.tar.gz

Download URL fews_openapi_py_client-0.2.0.tar.gz
Size 108.6 kB
Tags Source
SHA-256 checksum
How to use checksums
08c502ae9bc0d6b3b7f49b647f4e39f5a91275344b78c48dd5304eb6e653e01a
BLAKE2b-256 checksum
How to use checksums
cce625b3880867ea817b84319bc4c6b760154d1deb8fd15d170b2917ddf7aa9c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 21, 2026.

Transparency log

Release files / fews_openapi_py_client-0.2.0-py3-none-any.whl

Download URL fews_openapi_py_client-0.2.0-py3-none-any.whl
Size 268.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
da0947101687afd17f6b0e4e79d003b367bf1825107067158d2fd42c6747cd77
BLAKE2b-256 checksum
How to use checksums
fc6b31d26e5a51fdc9b5b7437cc75d15b7a96464fe4540ddcbb6820940840ceb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 21, 2026.

Transparency log

Security for fews-openapi-py-client 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for fews_openapi_py_client-0.2.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 21, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page