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.1.tar.gz (24.7 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.1-py3-none-any.whl (341.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: edge_provider_sdk-0.1.1.tar.gz
  • Upload date:
  • Size: 24.7 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.1.tar.gz
Algorithm Hash digest
SHA256 2be578ae69a6c0524d81f38033e7762031f819155ec0fb1b2f239a8aa54ec64d
MD5 b4a8ca6580f0fa6860b6463b807cfaa2
BLAKE2b-256 415ffe6b3a9c378c4b78a64fe3dd8275cfad76ad793b5f27c8b89b86d0aa0581

See more details on using hashes here.

Provenance

The following attestation bundles were made for edge_provider_sdk-0.1.1.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.1-py3-none-any.whl.

File metadata

File hashes

Hashes for edge_provider_sdk-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9cb5026abff6ab3557b14af84803d25cc85c8f073605768df0b0c299a7c2eca7
MD5 de50261f05308f0487f96040e9654f41
BLAKE2b-256 0cf3d3786143db7353089aa74e8872dc1a499a98cfe3adf64e757a97c8a4f895

See more details on using hashes here.

Provenance

The following attestation bundles were made for edge_provider_sdk-0.1.1-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