airbase.csv_api.client module

Client for Legacy AirQualityExport https://discomap.eea.europa.eu/map/fme/AirQualityExport.htm

class airbase.csv_api.client.Client(*, timeout=None, max_concurrent=10)[source]

Bases: AbstractAsyncContextManager

Handle for requests to Legacy AirQualityExport https://discomap.eea.europa.eu/map/fme/AirQualityExport.htm

Parameters:
  • timeout (float | None) –

  • max_concurrent (int) –

async download_binary(url, path)[source]

get request to url, write response body content (in binary form) into a a binary file, and return path (exactly as the input)

Parameters:
  • url (str) –

  • path (Path) –

Return type:

Path

async download_metadata(path)[source]

download metadata file and return path (exactly as the input)

Parameters:

path (Path) –

Return type:

Path

async download_urls(params)[source]

get request to AirQualityExport

Parameters:

params (CSVDataJSON) –

Return type:

str