Skip to main content
Pre-release

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

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
  • Schema discovery and exploration
  • Custom ordering and timezone support

💬 Support

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

Release files for psr-lakehouse 0.6.0rc1

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.0rc1
File Size Uploaded
psr_lakehouse-0.6.0rc1.tar.gz 972.7 kB Details

Built distribution (wheel)

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

Total release size: 990.6 kB

Release files / psr_lakehouse-0.6.0rc1.tar.gz

Download URL psr_lakehouse-0.6.0rc1.tar.gz
Size 972.7 kB
Tags Source
SHA-256 checksum
How to use checksums
48788810d9d7c522a5b38e38c1abce653ca3f6a3e3802c718270fd91c8a2eb06
BLAKE2b-256 checksum
How to use checksums
1da2f978bd6c2d5a77f62a1f2741daf694667ec1283990b8a6e7ebd109996386
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.15 {"installer":{"name":"uv","version":"0.12.15","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","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.0rc1-py3-none-any.whl

Download URL psr_lakehouse-0.6.0rc1-py3-none-any.whl
Size 17.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d279e6df61541749637850b30975f1c353b127aea17d8f6ed8d992fd0dc3a55f
BLAKE2b-256 checksum
How to use checksums
7af58a8b06d7238df64f6a99f1e77f960f315e6f65ae48c849518ca8b853391c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.15 {"installer":{"name":"uv","version":"0.12.15","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
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