Python SDK for the ArchAstro Platform API
Project description
archastro-python
Python SDK for the ArchAstro Platform API.
uv add archastro-sdk # or: pip install archastro-sdk
from archastro import ArchAstro
client = ArchAstro(api_key="pk_...")
teams = client.v1.teams.list()
Packages
All public code lives under the single top-level archastro package:
archastro.platform— typed REST + channel SDK generated from the canonical OpenAPI spec atArchAstro/archastro-openapi. Pydantic models, async channel classes, auth helpers.archastro.phx_channel— the hand-written Phoenix Channels client the generated channel classes run on top of. WebSocket transport, join / reply / push / leave, heartbeat, reconnect, and aHarnessServiceClientfor driving the@archastro/channel-harnessservice from Python tests.
Development
This repo contains:
- Python SDK (
src/archastro/) installed viauv - JS tooling (
package.json) — the channel-harness subprocess that powers the channel contract tests, plus the Prism mock server that backs the REST contract tests. Installed vianpm ci.
Setup
npm ci --ignore-scripts # channel-harness + prism (for contract tests)
uv sync --locked --all-extras
Running tests
# Unit tests only (no external services needed)
uv run pytest tests/test_http_client.py src/archastro/phx_channel/tests/test_unit.py
# REST contract tests (spawns Prism mock server)
uv run pytest tests/contract
# REST + channel contract tests (also spawns channel-harness subprocess)
ARCHASTRO_RUN_CHANNEL_CONTRACT_TESTS=1 uv run pytest tests/contract
Regenerating the SDK
The typed SDK — src/archastro/platform/ and tests/contract/ — is
regenerated from the canonical OpenAPI spec by
@archastro/sdk-generator.
Don't hand-edit files with the auto-generated by @archastro/sdk-generator
header; they'll be overwritten.
./scripts/regenerate_sdk.sh
The script fetches the spec from ArchAstro/archastro-openapi@main and
runs the generator locked in package-lock.json. Knobs:
ARCHASTRO_OPENAPI_REF=some-branch ./scripts/regenerate_sdk.sh— pull the spec from a non-default ref (useful when a spec change is on a branch awaiting merge).
After regenerating, review the diff, run the full test suite, and commit.
Release
# bump version in pyproject.toml, then:
uv sync --locked --all-extras
uv build --no-build-isolation
uv publish
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 archastro_sdk-0.1.1.tar.gz.
File metadata
- Download URL: archastro_sdk-0.1.1.tar.gz
- Upload date:
- Size: 225.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
648665e3f1588fac98b773aeca78e4011e12ed877ae213c48aa074fe55dc6f7e
|
|
| MD5 |
5af1875260f583fae3136e1d1eedae89
|
|
| BLAKE2b-256 |
60ba7a8ff1eddc07b52a9e1541fb8388feaac01b0a3ca614ead422d140c46b48
|
Provenance
The following attestation bundles were made for archastro_sdk-0.1.1.tar.gz:
Publisher:
publish.yml on ArchAstro/archastro-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
archastro_sdk-0.1.1.tar.gz -
Subject digest:
648665e3f1588fac98b773aeca78e4011e12ed877ae213c48aa074fe55dc6f7e - Sigstore transparency entry: 1793736910
- Sigstore integration time:
-
Permalink:
ArchAstro/archastro-python@deaf5a2912d754688ef96b81b7ecb7cc304cc77e -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/ArchAstro
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@deaf5a2912d754688ef96b81b7ecb7cc304cc77e -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file archastro_sdk-0.1.1-py3-none-any.whl.
File metadata
- Download URL: archastro_sdk-0.1.1-py3-none-any.whl
- Upload date:
- Size: 96.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4f306e06676a16e3f3410166b3e68803768e620b73d59000931acd59f77b89f8
|
|
| MD5 |
a01b0643cbb85c24d444886523b1bd8f
|
|
| BLAKE2b-256 |
068f8c04d74ae872d545ac622441b8d1ef3812f9e1004d48798834577d7a160e
|
Provenance
The following attestation bundles were made for archastro_sdk-0.1.1-py3-none-any.whl:
Publisher:
publish.yml on ArchAstro/archastro-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
archastro_sdk-0.1.1-py3-none-any.whl -
Subject digest:
4f306e06676a16e3f3410166b3e68803768e620b73d59000931acd59f77b89f8 - Sigstore transparency entry: 1793737226
- Sigstore integration time:
-
Permalink:
ArchAstro/archastro-python@deaf5a2912d754688ef96b81b7ecb7cc304cc77e -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/ArchAstro
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@deaf5a2912d754688ef96b81b7ecb7cc304cc77e -
Trigger Event:
workflow_dispatch
-
Statement type: