wyro (Python)
Official Python client for the wyro API: publish and schedule posts on Instagram, Facebook, TikTok, LinkedIn, X, Threads, YouTube and Pinterest from your app or agent.
- Python 3.9+, no dependencies (standard library
urllib), typed (TypedDict,py.typed). - Retries on
429and5xx, honoringRetry-After. Creates are only retried when you pass anidempotency_key. - Typed errors (
WyroError) withcode,message,fixanddetails. - Webhook signature verification.
Not published on PyPI yet:
pip install wyrowill work soon. Meanwhile:pip install ./packages/sdk-python.
Quick start
import os, uuid
from wyro import Wyro
wyro = Wyro(api_key=os.environ["WYRO_API_KEY"]) # no key yet? POST https://wyroapi.com/v1/sandbox
post = wyro.posts.create(
{"text": "Launching something new", "platforms": ["instagram", "linkedin"], "media": [{"url": "https://…/a.jpg"}]},
idempotency_key=str(uuid.uuid4()),
)
print(post["status"], post["preview_url"])
Resources
| Posts | posts.create(post, idempotency_key=…), posts.get(id), posts.list(limit=, cursor=), posts.iterate(), posts.reschedule(id, when), posts.cancel(id) |
| Accounts | accounts.list(), accounts.disconnect(id) |
| Connect | connect(platform, return_url=None, idempotency_key=…) |
| Media | media.upload(data, content_type, filename, uploader=None), media.upload_small(...), media.create_upload(...) |
| Webhooks | webhooks.set(url), webhooks.get(), webhooks.delete() |
| Partners | partner.workspaces.create/list/get/delete/rotate_key, for_client(external_id) |
Files over 4 MB get an upload ticket (media.create_upload); pass uploader(ticket, data, auth_headers) -> url to media.upload to send the bytes where the ticket says.
Partners
wyro = Wyro(partner_token=os.environ["WYRO_PARTNER_TOKEN"])
wyro.partner.workspaces.create("client-123", idempotency_key="create-client-123")
client = wyro.for_client("client-123") # sends X-Wyro-External-Id
client.connect("instagram", "https://yourapp.com/integrations")
Errors
from wyro import WyroError
try:
wyro.posts.create({"text": "Hello", "platforms": ["linkedin"]})
except WyroError as e:
if e.code == "duplicate_post":
print("Already posted:", e.details["existing_post_id"])
else:
raise
Webhooks
from wyro import verify_signature
# raw_body: the request body exactly as received (bytes or str)
ok = verify_signature(secret, request.headers["X-Wyro-Timestamp"], raw_body, request.headers["X-Wyro-Signature"])
Dedupe events on id: retries (header X-Wyro-Attempt) keep the same id. Contract: https://wyroapi.com/en/docs/webhooks
Tests
pip install pytest && pytest
Español
SDK oficial de Python para la API de wyro. Sin dependencias, con tipos, reintentos ante 429 y 5xx (respetando Retry-After; las creaciones solo se reintentan con idempotency_key), errores tipados (WyroError con code, message, fix) y verificación de firmas de webhooks (verify_signature).
Todavía no está publicado en PyPI:
pip install wyroestará disponible pronto.
from wyro import Wyro
wyro = Wyro(api_key=os.environ["WYRO_API_KEY"])
post = wyro.posts.create({"text": "Lanzamos algo nuevo", "platforms": ["instagram"], "media": [{"url": "https://…"}]}, idempotency_key=str(uuid.uuid4()))
Documentación: https://wyroapi.com/docs/sdks
License
MIT
Metadata
Release files for wyro 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| wyro-0.1.0.tar.gz | 13.1 kB | With provenance | Details for wyro-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| wyro-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for wyro-0.1.0-py3-none-any.whl |
Total release size: 23.2 kB
Release files / wyro-0.1.0.tar.gz
| Download URL | wyro-0.1.0.tar.gz |
|---|---|
| Size | 13.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
52dea53682fbb5207a2303e91e04c7e110c3805f74f48a7a8ff61aa574668329
|
|
BLAKE2b-256 checksum How to use checksums |
69c964fc5ae4d3179f70f6ab13c4e7ca42e960ba037fb8957556e3421df1ae88
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 18, 2026.
Transparency logRelease files / wyro-0.1.0-py3-none-any.whl
| Download URL | wyro-0.1.0-py3-none-any.whl |
|---|---|
| Size | 10.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
60fe12cc47dcdc1d75c867775c2e5f65b4e1866de71bd93ff3c9bbbf5b0c90c9
|
|
BLAKE2b-256 checksum How to use checksums |
d518307103c8c6b637aa9deda364453db34e9930bbbe99cc0b42cb697c583cb4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 18, 2026.
Transparency logSecurity for wyro 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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for wyro-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 18, 2026.
Transparency logA 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.