greenlandai (Python)
Unified SDK for the GreenlandAI ecosystem — ENYAL, JoulePAI, RAREEAI, GreenlandAI.
Supersedes but does not replace enyal-sdk v2.1.x (permanent coexistence — the
standalone enterprise track stays published and maintained; see design §5).
Install
pip install greenlandai # core
pip install "greenlandai[bip39]" # + mnemonic recovery primitives
pip install "greenlandai[otel]" # + OpenTelemetry metrics (opt-in; OFF by default)
Auth
from greenlandai import Client
client = Client(api_key="eyl_...") # eyl_ (ENYAL / cross-product) API key
client = Client(api_key="gai_...") # gai_ (GreenlandAI agent key) — for the gldai intelligence family
client = Client(oauth_token=jwt) # web sessions: ENYAL-issued OAuth JWT
# Any api_key → X-API-Key; an oauth_token (JWT) → Authorization: Bearer. Pass exactly one.
# Passing an API key via oauth_token (or a JWT via api_key) raises immediately — no silent mis-route.
# 401s surface to you (no auto-refresh); hook: Client(..., on_auth_expired=cb)
# Key rotation = generate a new key server-side and rebuild the Client (no dual-validation window).
gai_+ marketplace — resolved in 0.3.2:client.rareeai.*now routes through the GreenlandAI door (greenlandai.ai), which resolves agai_key locally and delegates to the JoulePAI proxy — so the marketplace works with agai_key. (<= 0.3.1pointed at joulepai.ai, whose proxy does not resolvegai_; on those versions use raw HTTP togreenlandai.ai/api/v1/marketplace/*.)eyl_/ OAuth marketplace access is unaffected.
Hello world (one per submodule)
client.enyal.archive("agent-1", "decision_record", "k1", {"decision": "x"})
client.joulepai.transfer("@bob", 1000, note="thanks") # auto idempotency key
client.rareeai.create_request(resource_type="gpu") # marketplace (flat 0.5%, route-fixed)
client.gldai.query("lithium deposits greenland")
Idempotency promise matrix (auto-retry behavior — design §6, post-G1 2026-06-10)
| Method (py / js) | Wire class | Tier | Auto-retry |
|---|---|---|---|
| enyal.archive | A body client_chunk_id | ENFORCED | ON |
| enyal.timestamp / create_agreement | A body client_chunk_id | ENFORCED | ON |
| enyal.compliance_attest | A body client_attestation_id | ENFORCED | ON |
| enyal.prove / prove_batch / prove_share_combination | B body idempotency_key | ENFORCED | ON |
| enyal.disclose / request_client_disclosure | B | ENFORCED | ON |
| enyal.send_message | B | ENFORCED | ON |
| enyal.knowledge_upgrade · memory_structured_query · memory_content_query · queue_proof | — | NOT SUPPORTED | OFF (retries may duplicate billed effects) |
| joulepai.transfer (pay) | D body idempotency_key (proc-enforced) | ENFORCED | ON |
| joulepai.fund | — | NOT SUPPORTED | OFF (duplicate Stripe sessions possible) |
| rareeai.create_provider/create_request/deliver/resolve | B | ENFORCED | ON |
| rareeai.approve/reject/dispute/extend_dispute | — | NOT SUPPORTED | OFF |
| gldai metered queries (companies/deposits/infrastructure/query/projects/mapdata) | C header X-Idempotency-Key | ENFORCED | ON |
| all GET reads | — | safe | ON |
Every billed call auto-generates a UUID4 key (stable across retries) unless you pass idempotency_key / idempotencyKey yourself.
Observability (OFF by default)
Client(logger=my_logger, on_retry=..., on_terminal_failure=..., metrics=otel_metrics()) —
DEBUG logs redact Authorization + X-API-Key structurally.
Migration from enyal-sdk 2.1.0: see MIGRATION.md. Changelog: CHANGELOG.md.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file greenlandai-0.3.3.tar.gz.
File metadata
- Download URL: greenlandai-0.3.3.tar.gz
- Upload date:
- Size: 40.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
54582f39e2744392151d24fcd3fc041fa97e1ff88ec32d0865d235bc9c67eb82
|
|
| MD5 |
5047f0f5c7421e3fc2f70a3332e74d88
|
|
| BLAKE2b-256 |
8830cf2f9ffb475b28586d0a4df90332ac255f994f45ae6fd2d91c30c09fa0cc
|
File details
Details for the file greenlandai-0.3.3-py3-none-any.whl.
File metadata
- Download URL: greenlandai-0.3.3-py3-none-any.whl
- Upload date:
- Size: 43.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
758020e3e64b78de05c29949ba509e8086eadafecb66c9401bd84d01240a4930
|
|
| MD5 |
5512177b14ce13688c8763217debb1bd
|
|
| BLAKE2b-256 |
84a1bb28c4ae693ca129bbba407098d28ac3505f8da7207c18e3642cdb7dda36
|