Official Python SDK for the Eclipse Softworks Platform API
Project description
luna-sdk
Official Python SDK for the Eclipse Softworks Platform API.
Installation
pip install luna-sdk
Quick Start
import asyncio
from luna import LunaClient
async def main():
# API Key authentication
async with LunaClient(api_key="lk_live_xxxx") as client:
# List users
users = await client.users.list(limit=10)
# Get a specific user
user = await client.users.get("usr_123")
# Create a new user
from luna import UserCreate
new_user = await client.users.create(
UserCreate(email="john@example.com", name="John Doe")
)
asyncio.run(main())
Authentication
API Key
client = LunaClient(api_key="lk_live_xxxx")
OAuth Token
async def save_tokens(tokens):
# Save tokens to database
pass
client = LunaClient(
access_token=session.access_token,
refresh_token=session.refresh_token,
on_token_refresh=save_tokens,
)
Error Handling
from luna import LunaClient, NotFoundError, RateLimitError
try:
await client.users.get("usr_nonexistent")
except NotFoundError as e:
print(f"User not found: {e.message}")
except RateLimitError as e:
print(f"Rate limited, retry after: {e.retry_after}")
Configuration
client = LunaClient(
api_key="lk_live_xxxx",
base_url="https://api.staging.eclipse.dev",
timeout=60.0,
max_retries=5,
log_level="debug",
)
License
MIT © Eclipse Softworks
Project details
Release history Release notifications | RSS feed
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 luna_sdk-1.0.1.tar.gz.
File metadata
- Download URL: luna_sdk-1.0.1.tar.gz
- Upload date:
- Size: 25.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8f72ae3bb72f6c39661e290483ba0d9e87be31f48a93b39be40ae2988ee58155
|
|
| MD5 |
368b2f8baf1e06b6306cedbd87d5a6ab
|
|
| BLAKE2b-256 |
1da24157c8570bfceff5cce904126f193dec0f5f96cf438c9fd328f7ae134f9b
|
Provenance
The following attestation bundles were made for luna_sdk-1.0.1.tar.gz:
Publisher:
release.yml on Eclipse-Softworks/Luna-SDK
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
luna_sdk-1.0.1.tar.gz -
Subject digest:
8f72ae3bb72f6c39661e290483ba0d9e87be31f48a93b39be40ae2988ee58155 - Sigstore transparency entry: 752255597
- Sigstore integration time:
-
Permalink:
Eclipse-Softworks/Luna-SDK@4ecde9cbb0e620439a41126aeb84c3dbfc1d682c -
Branch / Tag:
refs/tags/v1.0.1 - Owner: https://github.com/Eclipse-Softworks
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@4ecde9cbb0e620439a41126aeb84c3dbfc1d682c -
Trigger Event:
push
-
Statement type:
File details
Details for the file luna_sdk-1.0.1-py3-none-any.whl.
File metadata
- Download URL: luna_sdk-1.0.1-py3-none-any.whl
- Upload date:
- Size: 26.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ca368d4a308e0f14e7a0601797e5cadcb5ca45882b8db48e0ab50e1341b9ba8e
|
|
| MD5 |
7894c4642d320baaa5b1622d7fa3997f
|
|
| BLAKE2b-256 |
553ca307e1b9bdae18d7efd3841c7e1c67a171b6304bce161fef0a2b5f299637
|
Provenance
The following attestation bundles were made for luna_sdk-1.0.1-py3-none-any.whl:
Publisher:
release.yml on Eclipse-Softworks/Luna-SDK
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
luna_sdk-1.0.1-py3-none-any.whl -
Subject digest:
ca368d4a308e0f14e7a0601797e5cadcb5ca45882b8db48e0ab50e1341b9ba8e - Sigstore transparency entry: 752255601
- Sigstore integration time:
-
Permalink:
Eclipse-Softworks/Luna-SDK@4ecde9cbb0e620439a41126aeb84c3dbfc1d682c -
Branch / Tag:
refs/tags/v1.0.1 - Owner: https://github.com/Eclipse-Softworks
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@4ecde9cbb0e620439a41126aeb84c3dbfc1d682c -
Trigger Event:
push
-
Statement type: