Skip to main content

elido-sdk — Python SDK

Sync HTTP client for the Elido URL-shortener API.

from elido import Client

elido = Client(
    base_url="https://api.elido.app",
    token="elido_...",
)

# Who am I?
me = elido.users.me()
print(me["email"])

# Create a link
link = elido.links.create(
    workspace_id=42,
    domain_id=1,
    destination_url="https://example.com/landing",
    tags=["spring-2026"],
)
print(link["slug"])

# Last-30-day clicks per link
top = elido.analytics.top_links(
    workspace_id=42,
    from_="2026-04-01",
    to="2026-05-01",
    limit=20,
)
for row in top["items"]:
    print(row["link_id"], row["count"])

Types

The core resource shapes (User, Workspace, Link, PaginatedLinks) are exposed as TypedDicts for editor completion. They're type-only — the runtime client still hands back raw dicts, so unknown fields the server adds keep working without a SDK release:

from elido import Client, Link

elido = Client(base_url="https://api.elido.app", token="elido_...")
link: Link = elido.links.create(42, domain_id=1, destination_url="https://example.com/x")

Auth

In order of precedence:

Constructor arg Header sent Use case
token="elido_..." Authorization: Bearer … Production scripts
cookie="ory_kratos_session=..." Cookie: … Server-side proxies

API keys start with the elido_ prefix and are created at https://app.elido.app under API keys. Plain elido_… strings are shown once on creation and stored hashed; rotate with api_keys.create

  • api_keys.revoke(old_id).

Multi-host setups

If you front Elido with separate hostnames per service, pass the URLs explicitly:

elido = Client(
    base_url="https://api.elido.app",
    analytics_base_url="https://analytics.elido.app",
    billing_base_url="https://billing.elido.app",
    token="elido_...",
)

The default keeps everything on base_url.

Errors

elido.ElidoApiError carries status, body, message. Catch it for 4xx/5xx responses; transport-level errors raise ElidoError.

Install

pip install elido-sdk

The distribution is called elido-sdk on PyPI; the import name is elido (from elido import Client). Requires Python 3.9+.

Versioning

This SDK is hand-written against Elido's public OpenAPI spec (https://elido.app/openapi.json). Add or rename a field server-side, the SDK keeps working as long as the wire JSON stays. Breaking changes bump the SDK minor.

License

MIT (c) Elido. The Elido service itself is a separate, hosted product; this repository contains only the client library.

Metadata

Release files for elido-sdk 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for elido-sdk 0.1.0
File Size Uploaded Provenance Actions
elido_sdk-0.1.0.tar.gz 11.2 kB Without provenance Details for elido_sdk-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for elido-sdk 0.1.0
File Interpreter ABI Platform Actions
elido_sdk-0.1.0-py3-none-any.whl Python 3 none any Details for elido_sdk-0.1.0-py3-none-any.whl

Total release size: 20.9 kB

Release files / elido_sdk-0.1.0.tar.gz

Download URL elido_sdk-0.1.0.tar.gz
Size 11.2 kB
Tags Source
SHA-256 checksum
How to use checksums
5e381a66d4a2cf10405bbe3dba5d0f61383843792a3330231a46098c05e62cbc
BLAKE2b-256 checksum
How to use checksums
89edd651216fee4e5e15608356e9a2952ef4caae2679bb9c866f02d962f17dfa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Release files / elido_sdk-0.1.0-py3-none-any.whl

Download URL elido_sdk-0.1.0-py3-none-any.whl
Size 9.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
95e9d07dfdf8288d0562fc49b6a96a540486263fa0807f8da5299d6defb53a0e
BLAKE2b-256 checksum
How to use checksums
a81d1eb462fe51392eb324f0ea53c5ae6560cc8e8fb1dbd6d009f1ecd0131e66
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Security for elido-sdk 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page