This release is a pre-release and may not be stable for production use.
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_PATwill stop working. The client warns on everyinitialize()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.
Metadata
Release files for psr-lakehouse 0.6.1rc1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| psr_lakehouse-0.6.1rc1.tar.gz | 976.5 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| psr_lakehouse-0.6.1rc1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 996.4 kB
Release files / psr_lakehouse-0.6.1rc1.tar.gz
| Download URL | psr_lakehouse-0.6.1rc1.tar.gz |
|---|---|
| Size | 976.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
aa2dc7377897c9258ce74e80226ac092caf8cb07988e26fe75614c205e0422a0
|
|
BLAKE2b-256 checksum How to use checksums |
aca45ffb612f5886f8bc91339b135a1bd0a1ed67355ac52dd6bf3bc2e87e267d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.0 {"installer":{"name":"uv","version":"0.13.0","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.1rc1-py3-none-any.whl
| Download URL | psr_lakehouse-0.6.1rc1-py3-none-any.whl |
|---|---|
| Size | 20.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8ce06fb73e07e984378ede877b1101a9c2217315d752a9b85da9463ea13c5a0e
|
|
BLAKE2b-256 checksum How to use checksums |
b3fd64301d8d5de6f97c664120f5026073e943932fff635271b7db4c05f3cd99
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.0 {"installer":{"name":"uv","version":"0.13.0","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}
|
Security for psr-lakehouse 0.6.1rc1
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.