UI-free HTTP client for SEPAL platform services (user files, tasks, processing recipes).
Project description
pysepal-api
UI-free HTTP client for SEPAL platform services. Powers Jupyter notebooks, Voila apps, CLI scripts, and background jobs running inside a SEPAL sandbox.
from pysepal_api import SepalClient
# sync — notebooks, CLI, jobs
with SepalClient(session_id="...") as sepal:
listing = sepal.files.list("/")
task = sepal.tasks.submit("image.download", params={...})
sepal.tasks.wait(task.id)
# escape hatch: any route the typed endpoints don't model
image = sepal.get("/api/gee/image/json", params={"recipeId": "foo"}).json()
from pysepal_api import AsyncSepalClient
# async — Voila / Solara
async with AsyncSepalClient(session_id="...") as sepal:
listing = await sepal.files.list("/")
image = (await sepal.get("/api/gee/image/json", params={"recipeId": "foo"})).json()
The two clients are twins: identical surface, the only difference is await.
- Scoped use —
with SepalClient(...)/async with AsyncSepalClient(...). Construction never performs network I/O; entering the context creates the module results dir (whenmodule_nameis given). - Long-lived clients —
sepal = SepalClient.create(...)/sepal = await AsyncSepalClient.create(...): same eager setup without a context manager; callclose()/aclose()when done.async with AsyncSepalClient.create(...)also works. - Typed endpoints for the common cases:
files,tasks,recipes. File verbs followpathlib:read_bytes/read_text/read_json/write/mkdir. - Generic primitive —
request()/get()/post()/put()/delete()— for any other SEPAL route, with the same typed-error mapping (NotFound,Unauthorized, …). Returns the rawhttpx.Response. - One exception root — catch
PysepalErrorfor anything this library raises.
TLS is verified by default. host.docker.internal is auto-skipped for local dev; for any other self-signed host pass verify=False or list it in PYSEPAL_INSECURE_TLS_HOSTS (comma-separated, exact-host match).
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 pysepal_api-0.2.0.tar.gz.
File metadata
- Download URL: pysepal_api-0.2.0.tar.gz
- Upload date:
- Size: 25.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
390889963c232a2788592e131ffe33076668cee27b9f33e2951eb2ffd773564c
|
|
| MD5 |
906afc48ba1c12bfdbadc6e8f5ac829f
|
|
| BLAKE2b-256 |
64e51e15f697099e17b1c640dc18498247bda2e8b96db0e986775ecbd697eb34
|
Provenance
The following attestation bundles were made for pysepal_api-0.2.0.tar.gz:
Publisher:
release.yml on dfguerrerom/pysepal-api
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pysepal_api-0.2.0.tar.gz -
Subject digest:
390889963c232a2788592e131ffe33076668cee27b9f33e2951eb2ffd773564c - Sigstore transparency entry: 2102026894
- Sigstore integration time:
-
Permalink:
dfguerrerom/pysepal-api@a408c652dc1ca415aad54801984c1bf915b71965 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/dfguerrerom
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@a408c652dc1ca415aad54801984c1bf915b71965 -
Trigger Event:
release
-
Statement type:
File details
Details for the file pysepal_api-0.2.0-py3-none-any.whl.
File metadata
- Download URL: pysepal_api-0.2.0-py3-none-any.whl
- Upload date:
- Size: 19.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4bfda96ae9a87fed866d8c2fcde44239c6c21e0c5cdd969fc8fe856f177ad969
|
|
| MD5 |
813eb73641cf6bdd0c14f0254fb5441f
|
|
| BLAKE2b-256 |
becbf177df997b05ddc59ff7b62c295a2bd0bd22049113e51ee9bf98a9f49705
|
Provenance
The following attestation bundles were made for pysepal_api-0.2.0-py3-none-any.whl:
Publisher:
release.yml on dfguerrerom/pysepal-api
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pysepal_api-0.2.0-py3-none-any.whl -
Subject digest:
4bfda96ae9a87fed866d8c2fcde44239c6c21e0c5cdd969fc8fe856f177ad969 - Sigstore transparency entry: 2102027480
- Sigstore integration time:
-
Permalink:
dfguerrerom/pysepal-api@a408c652dc1ca415aad54801984c1bf915b71965 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/dfguerrerom
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@a408c652dc1ca415aad54801984c1bf915b71965 -
Trigger Event:
release
-
Statement type: