Metadata-Version: 2.4
Name: dvas-api-client
Version: 0.6.2
Summary: Python API client for the DVAS API
Author-email: Jan Øyvind Låte <jlaa@nilu.no>
License-Expression: MIT
Project-URL: homepage, https://dc.actris.nilu.no
Project-URL: repository, https://git.nilu.no/cad/datapipeline/libs/api-clients/python.git
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Requires-Python: >=3.13
Description-Content-Type: text/markdown
License-File: LICENSE
License-File: DATA-LICENSE
Requires-Dist: httpx>=0.28
Requires-Dist: orjson>=3.11
Dynamic: license-file

Actris DVAS API Client
======================

DVAS - Data Discovery, Virtual Access and Services - is a platform developed by Actris to facilitate
the discovery, access, and use of atmospheric data. The Actris DVAS API provides programmatic access
to the metadata in DVAS, allowing users to explore the available metadata.

This is the Python client for accessing the metadata in the Actris DVAS API. It provides a simple
interface for retrieving metadata.

The metadata in DVAS is subject to the CC-BY-4.0 license, which means that you are free to use, share,
and adapt the metadata as long as you give appropriate credit to the original source, provide a link
to the license, and indicate if changes were made. For more information about the CC-BY-4.0 license,
please visit [Creative Commons](https://creativecommons.org/licenses/by/4.0/).

# Installation
You can install the Actris DVAS API client using pip:

```bash
pip install dvas-api-client
```

# Basic Usage

```python
#!/usr/bin/env python3

from pprint import pprint
from dvas.client import BoolQuery, QueryField, SortType, PROD_API
from dvas.client import search

query = (
    BoolQuery()
    .must(QueryField.DATASET_REPOSITORY_ID, "In-Situ")
    .must(QueryField.DISTRIBUTION_ACCESS_RESTRICTED, False)
    .filter_range(
        QueryField.TEMPORAL_EXTENT_BEGIN,
        gte="1979-01-01T00:00:00.000Z",
    )
    .sort([
        (QueryField.TEMPORAL_EXTENT_BEGIN, SortType.ASC),
        (QueryField.IDENTIFICATION_PID, SortType.ASC),
    ])
)

for doc in search(PROD_API, query):
    pprint(doc)
``` 
