Skip to main content
Lakehouse logo

Tests PyPI - Version Docs

PSR Lakehouse 🏞️🏡

A Python client library for accessing PSR's data lakehouse API, providing easy access to Brazilian energy market data including ANEEL, CCEE and ONS datasets.

📦 Installation

pip install psr-lakehouse

⚙️ Quick Start

Configure the API URL and your personal access token:

export LAKEHOUSE_API_URL="https://api.example.com"
export LAKEHOUSE_PAT="psr_..."

Generate a token at cockpit.psr-inc.com.

⚠️ A token will soon be required. Queries still work without one today, but the API is being gated: once it is, a script with no LAKEHOUSE_PAT will stop working. The client warns on every initialize() until you set one. Querying will then need the token and an active Lakehouse plan on the account that owns it. Treat the token like a password — queries run with it are attributed to you.

Check which account the token belongs to:

psr-lakehouse whoami

Fetch data from the API:

from psr.lakehouse import client

# Fetch CCEE spot price data
df = client.fetch_dataframe(
    table_name="ccee_spot_price",
    data_columns=["spot_price"],
    start_reference_date="2023-05-01",
    end_reference_date="2023-05-02",
    filters={"subsystem": "SOUTHEAST"},
)
print(df)

📚 Documentation

For complete documentation including advanced features, API reference, and examples, visit the full documentation.

Features include:

  • Data filtering and aggregation
  • Temporal aggregation with datetime granularity
  • Complex queries with table joins
  • Change tracking: which days changed since you fetched them
  • Schema discovery and exploration
  • Custom ordering and timezone support

💬 Support

For questions or issues, please open an issue on the project repository.

Metadata

Release files for psr-lakehouse 0.6.3

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

Source distribution (sdist)

Source distribution for psr-lakehouse 0.6.3
File Size Uploaded Provenance Actions
psr_lakehouse-0.6.3.tar.gz 980.8 kB Without provenance Details for psr_lakehouse-0.6.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for psr-lakehouse 0.6.3
File Interpreter ABI Platform Actions
psr_lakehouse-0.6.3-py3-none-any.whl Python 3 none any Details for psr_lakehouse-0.6.3-py3-none-any.whl

Total release size: 1.0 MB

Release files / psr_lakehouse-0.6.3.tar.gz

Download URL psr_lakehouse-0.6.3.tar.gz
Size 980.8 kB
Tags Source
SHA-256 checksum
How to use checksums
d0166e29d622a39d2f6db7161a793924a31995e7cd5ce197c9441a24d63b40f7
BLAKE2b-256 checksum
How to use checksums
c165ed11736b7a5b9b3da10b4e0a11935b339e69d7e0560edb17cca071835439
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / psr_lakehouse-0.6.3-py3-none-any.whl

Download URL psr_lakehouse-0.6.3-py3-none-any.whl
Size 21.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
02dc3b3e25ec1b4bbb529a70bd2a09c18e05ebd8598a5d6e6887bfdbdff6c6dd
BLAKE2b-256 checksum
How to use checksums
e0f1863c1e6498d648ace9683ce9a3bacfa8d08714179dd4110dd6fe26744b1c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for psr-lakehouse 0.6.3

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

0.6.3 This release

2 release files No provenance

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