"""
umwelt_apy - Python package for the umwelt.info search API.

This packages provides a Python-based client to query and fetch datasets
from the umwelt.info server by sending requests to its API.
It supports streaming results, pagination, and conversion of these datasets
to pandas/polars DataFrames.

Examples:
    >>> from umweltinfo import fetch_by_query
    >>> for dataset in fetch_by_query(query="Luftqualität"):
        ... print(dataset['id'])

    >>> from umwelt_apy import download_resources
    >>> download_resources(
    ...     query="source:genesis-destatis AND title:abfall",
    ...     output_dir="./downloads",
    ... )
"""

from .api_client import (
    fetch_by_query,
    fetch_by_url,
    fetch_by_ids,
    fetch_facet_values,
    only_resources,
    FACET_NAMES,
)

from .download_resources import (
    unnest_and_filter,
    preview_resources,
    download_resources,
)


__all__ = [
    "fetch_by_query",
    "fetch_by_url",
    "fetch_by_ids",
    "fetch_facet_values",
    "only_resources",
    "FACET_NAMES",
    "unnest_and_filter",
    "preview_resources",
    "download_resources",
]
