Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

forest-data

Public Python client for the Instituto Forest open-data API.

The package wraps https://institutoforest.org/api/v1. The API returns metadata, official source URLs, and profiling results. Dataset bytes are downloaded from the official source listed in each item source_url. Forest does not mirror raw dataset files in Supabase.

Install

pip install forest-data

Basic Use

import forest_data

client = forest_data.Client()

for dataset in client.list_datasets():
    print(dataset.id, dataset.title)

manifest = client.get_dataset("inpe_bdqueimadas_focos")
for item in manifest.items:
    print(item.period, item.source_url, item.profile_status, item.row_count)

Download From Official Sources

import forest_data

client = forest_data.Client()
paths = client.download("inpe_bdqueimadas_focos", path="./data")

download() follows item source_url values. If an item has sha256, the SDK verifies it by default. If an item does not have sha256, the SDK downloads it without checksum verification.

URL Discovery

import forest_data

client = forest_data.Client()
urls = client.get_source_urls("inpe_bdqueimadas_focos")

Use get_dataset_items() or iter_items() when your pipeline needs profile metadata before deciding what to download:

for item in client.iter_items("inpe_bdqueimadas_focos"):
    if item.profile_status == "ok" and item.row_count:
        print(item.filename, item.row_count, item.source_url)

Profile Fields

profiled_at is the UTC time when Forest finished profiling the item.

profile_status describes the profiling result:

  • ok: download and expected profiling metrics succeeded.
  • partial: the resource was downloaded, but some metrics are incomplete.
  • failed: the URL was discovered, but download or parsing failed.
  • skipped: profiling was intentionally not attempted.

profile_warnings contains public-safe warning objects with code and message. Use these warnings to decide whether an item is fit for automated ingestion.

Configuration

Default base URL: https://institutoforest.org/api/v1.

Override with Client(base_url=...) or FOREST_API_BASE_URL.

Full API documentation: https://institutoforest.org/docs/api/v1

Metadata

Release files for forest-data 0.1.0a0

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

Source distribution (sdist)

Source distribution for forest-data 0.1.0a0
File Size Uploaded Provenance Actions
forest_data-0.1.0a0.tar.gz 6.7 kB Without provenance Details for forest_data-0.1.0a0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for forest-data 0.1.0a0
File Interpreter ABI Platform Actions
forest_data-0.1.0a0-py3-none-any.whl Python 3 none any Details for forest_data-0.1.0a0-py3-none-any.whl

Total release size: 12.7 kB

Release files / forest_data-0.1.0a0.tar.gz

Download URL forest_data-0.1.0a0.tar.gz
Size 6.7 kB
Tags Source
SHA-256 checksum
How to use checksums
49f6c60c629b1bf3f1b0903b22dc9eae549516ee9cab5824198899004159e014
BLAKE2b-256 checksum
How to use checksums
2488b9d8b724cad2cb535e0c99e508693f01c70ed8d823af259d3bd4f784879b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.4

Release files / forest_data-0.1.0a0-py3-none-any.whl

Download URL forest_data-0.1.0a0-py3-none-any.whl
Size 6.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
92b4323df1b9bcf55e360a3a5f783cd062fceb989994fe7eea943855dbef3542
BLAKE2b-256 checksum
How to use checksums
29f38023afbf0f2f1f05fdf49378a4174e1dc7912dbdff4f624d1b731e9f87f2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.4

Security for forest-data 0.1.0a0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.

Release history Release notifications | RSS feed

This release
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