amanoki
Python client for the Amanoki electricity-market regime API. Covers JEPX today; ERCOT / PJM / CAISO / AEMO / NYISO are catalogued and will land as adapters arrive.
pip install amanoki
Quick start
from amanoki import Client
c = Client() # public endpoints, no auth
r = c.get_regime("jepx", "tokyo")
print(r.regime, r.price, r.price_unit) # normal 16.75 kWh
s = c.spike_probability("jepx", "tokyo")
for cell in s.cells:
print(cell.threshold, cell.horizon_min, cell.p, cell.base_rate)
All methods also exist on AsyncClient:
import asyncio
from amanoki import AsyncClient
async def main():
async with AsyncClient() as c:
status = await c.status()
print(status.markets_with_data, status.latest_bar_ms)
asyncio.run(main())
Endpoints covered
| Method | Backs |
|---|---|
list_markets() |
GET /v1/markets |
get_areas(market) |
GET /v1/markets/{market}/areas |
get_regime(m, a) |
GET /v1/power/{m}/{a} |
spike_probability(m, a) |
GET /v1/power/{m}/{a}/spike-probability |
transitions(m, a, limit=) |
GET /v1/power/{m}/{a}/transitions?limit= |
status() |
GET /v1/status |
health() |
GET /v1/health |
Error handling
All non-2xx responses raise a typed subclass of AmanokiError:
from amanoki import Client, NotFoundError, RateLimitError
try:
c.get_regime("jepx", "okinawa")
except NotFoundError:
...
except RateLimitError as e:
time.sleep(e.retry_after or 30)
Authentication
Client(api_key=...) sets Authorization: Bearer <key>. Public
endpoints don't require a key. Paid-tier endpoints are planned — the
hook is in place so code written today keeps working when they open.
Versioning
Matches the API surface, not the service version. Breaking client changes bump the major.
Metadata
Release files for amanoki 0.1.0
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 | Actions |
|---|---|---|---|---|
| amanoki-0.1.0.tar.gz | 18.7 kB | Without provenance | Details for amanoki-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| amanoki-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for amanoki-0.1.0-py3-none-any.whl |
Total release size: 25.1 kB
Release files / amanoki-0.1.0.tar.gz
| Download URL | amanoki-0.1.0.tar.gz |
|---|---|
| Size | 18.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2ea8a13566889002615be2ad70b8bc35b3c1132309669616e8b3dde7998764b6
|
|
BLAKE2b-256 checksum How to use checksums |
8ae9e6df15ff09978fc27132f24853fcb0d3676be43b234318023f24d74009d4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.16 {"installer":{"name":"uv","version":"0.9.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / amanoki-0.1.0-py3-none-any.whl
| Download URL | amanoki-0.1.0-py3-none-any.whl |
|---|---|
| Size | 6.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e99ac73b89b65f6599ba545f7b6ef4ef52ff17f4f92bbf30945353af15801c67
|
|
BLAKE2b-256 checksum How to use checksums |
6ad6a418e095fab4e8275d7ac8e257bfb2128016a2276eff5ed87f5bd1b86c69
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.16 {"installer":{"name":"uv","version":"0.9.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for amanoki 0.1.0
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.