Skip to main content

Single Python client for Latitude-shaped compute providers — wraps latitudesh-python-sdk with permissive catalog enums.

Project description

edge-provider-sdk

Status: pre-release scaffolding (v0.1.0 in progress). API surface is frozen per SPEC.md; patches and wrapper not yet implemented.

A single Python client for multiple Latitude-shaped compute providers. Wraps the upstream latitudesh-python-sdk (v3.0.5), removes client-side strict-enum validation for catalog fields (sites/plans/operating systems), and selects a backend provider at construction time.

Modeled on LiteLLM's "1 API, N providers" approach — adapted for stateful bare-metal compute.

Why this exists

  • The upstream SDK ships with (str, Enum) classes for site/plan/OS slugs. Any provider whose catalog differs from Latitude's (a self-hosted adapter, a fork, a regional reseller) gets rejected at the SDK layer before the request reaches the server.
  • We patch those seven enums to be permissive type aliases — any string passes through to the API, which is the only authority on what's actually valid.
  • Strict validation is preserved for provider="latitude" via runtime validation against the original enum values.

Installation

pip install edge-provider-sdk

Quickstart

from edge_provider_sdk import EdgeClient

# Latitude direct (strict enums enforced where upstream enforces them)
client = EdgeClient(provider="latitude", bearer="lt_...")

# Digital Frontier adapter (Latitude-shaped, any URL)
client = EdgeClient(
    provider="digital-frontier",
    base_url="https://df.example.com/api/v1",
    bearer="df_...",
)

# Operations are identical to upstream latitudesh-python-sdk
server = client.servers.create(...)

# Catalog accessor — new in this package
client.catalog.sites()   # list[str]
client.catalog.plans()   # list[str]
client.catalog.os()      # list[str]

See docs/quickstart.md for a full walkthrough.

Upstream version

This release wraps latitudesh-python-sdk==3.0.5. Wrapper versioning is independent of upstream — see SPEC.md §6.

import edge_provider_sdk
edge_provider_sdk.__version__         # "0.1.0"
edge_provider_sdk.upstream_version    # "3.0.5"

Migrating from latitudesh-python-sdk

The only API difference is the constructor. See docs/upgrading-from-latitudesh.md.

Development

The patched SDK lives in src/edge_provider_sdk/_generated/ (gitignored, built from patches/ against the pinned upstream tarball).

# One-time: build the patched _generated/ tree
./scripts/apply-patches.sh

# Standard workflow
uv sync
uv run pytest
uv run ruff check
uv run mypy src

See SPEC.md for the full design document.

License

Apache-2.0 — matches upstream.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

edge_provider_sdk-0.1.0.tar.gz (24.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

edge_provider_sdk-0.1.0-py3-none-any.whl (340.9 kB view details)

Uploaded Python 3

File details

Details for the file edge_provider_sdk-0.1.0.tar.gz.

File metadata

  • Download URL: edge_provider_sdk-0.1.0.tar.gz
  • Upload date:
  • Size: 24.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for edge_provider_sdk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d43b62846da4668ef5b58d90f29a70bef7f22a35b92288feb9d669bed5dce231
MD5 c04e95f1acf33c913c15d1a54da3a7b5
BLAKE2b-256 37c96503577f38b513a0eb62b342c63edc751d18f78a5e7dd4fb69c71497b4c5

See more details on using hashes here.

Provenance

The following attestation bundles were made for edge_provider_sdk-0.1.0.tar.gz:

Publisher: release.yml on Digital-Frontier-LDA/edge-provider-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file edge_provider_sdk-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for edge_provider_sdk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6813155857e605b4357e850571e106c0a9df12d621ed82c0524b04668b5451ce
MD5 21ea9d82d644540b44cc633a47dbb5a6
BLAKE2b-256 edb3a86246764a7bd9d4d8b96340a7561b51bde9463591b9af9e2ec0b3bc9b15

See more details on using hashes here.

Provenance

The following attestation bundles were made for edge_provider_sdk-0.1.0-py3-none-any.whl:

Publisher: release.yml on Digital-Frontier-LDA/edge-provider-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page