| get_list_of_available_datasetsA | Get a list of available datasets from ISTAT Example:
get_list_of_available_datasets()
|
| search_datasetsA | Search datasets in ISTAT website by a query string Args:
query: The query string to search for.
Example:
search_datasets(query="import")
|
| get_dataset_dimensionsC | Get the dimensions of a dataset Args:
dataflow_identifier: The identifier of the dataset.
Example:
get_dataset_dimensions(dataflow_identifier="139_176")
|
| get_dimension_valuesC | Get the values of a dimension for a given dataset Args:
dataflow_identifier: The identifier of the dataset.
dimension: The dimension to get the values for.
Example:
get_dimension_values(dataflow_identifier="139_176", dimension="TIPO_DATO")
|
| get_dataA | Get data from a dataset with filters. Attempt to retrieve data, if it times out or is too big,
return the URL of the file to download.
Args:
dataflow_identifier: The identifier of the dataset.
filters: A dictionary of filters to apply to the dataset.
Example:
get_data(dataflow_identifier="139_176", filters={"freq": "M", "tipo_dato": ["ISAV", "ESAV"], "paese_partner": "WORLD"})
|
| get_data_limitedA | Get limited data from a dataset with filters. Returns only the first N records.
Attempt to retrieve data, if it times out or is too big, return the URL of the file to download.
Args:
dataflow_identifier: The identifier of the dataset.
filters: A dictionary of filters to apply to the dataset.
limit: The maximum number of records to return.
Example:
get_data_limited(dataflow_identifier="139_176", filters={"freq": "M", "tipo_dato": ["ISAV", "ESAV"], "paese_partner": "WORLD"}, limit=100)
|
| get_summaryA | Get a summary of a dataset from ISTAT.
Args:
dataflow_identifier: The identifier of the dataset.
filters: A dictionary of filters to apply to the dataset.
Example:
get_summary(dataflow_identifier="139_176", filters={"freq": "M", "tipo_dato": ["ISAV", "ESAV"], "paese_partner": "WORLD"})
|
| get_dataset_urlA | Get the URL to download a dataset with metadata.
Args:
dataflow_identifier: The identifier of the dataset.
filters: A dictionary of filters to apply to the dataset.
Filter keys should be dimension names in lowercase.
For unfiltered dimensions, omit them or set to None.
Example:
get_dataset_url(dataflow_identifier="139_176", filters={"freq": "M", "tipo_dato": ["ISAV", "ESAV"], "paese_partner": "WORLD"})
Returns:
JSON with URL and metadata (content-type, size, etc.)
|
| download_datasetA | Download a dataset file from a URL to a local path with automatic format detection.
Better for large datasets that cannot be handled in-memory or when Json responses are too large or not supported.
The file extension is automatically determined from the Content-Type header.
Args:
url: The URL of the file to download.
output_path: Optional. A relative or absolute path for the saved file.
If relative, it's resolved against the configured storage directory.
If absolute, it MUST be inside the storage directory.
If not provided, a filename is generated from the URL with the appropriate extension.
Example:
# Saves to <storage_dir>/my_data/export.xml (extension based on content type)
download_dataset(url="http://.../data", output_path="my_data/export")
# Saves to <storage_dir>/<generated_name>.<ext> (extension based on content type)
download_dataset(url="http://.../data")
|