This release has been yanked by its maintainers, and will be ignored by installers, except when explicitly specified.
Consider using release 0.2.0 instead.
Reason given by maintainers: Incompatible with the current Postdom media upload contract; upgrade to 0.2.0.
postdom
Typed synchronous and asynchronous Python clients for the Postdom short-form publishing API.
pip install postdom
from pathlib import Path
import os
from postdom import Postdom
with Postdom(os.environ["POSTDOM_API_KEY"]) as postdom:
upload = postdom.upload_media(
Path("launch.mp4").read_bytes(),
content_type="video/mp4",
platforms=["tiktok"],
)
media = postdom.wait_for_media(upload.media_handle)
if media.status != "stored":
raise RuntimeError(f"Media is {media.status}")
submission = postdom.publish_video(
account_ids=["account-tiktok"],
media_handle=media.media_handle,
caption="Launch day. Here is what we shipped.",
intent="Announce the launch",
)
result = postdom.wait_for_publish(submission.id)
print(result.status)
The async client has the same Python operation names:
import os
from postdom import AsyncPostdom
async def workspace_status():
async with AsyncPostdom(os.environ["POSTDOM_API_KEY"]) as postdom:
return await postdom.get_workspace_status()
Contract
The package mirrors the 14 agent-authority operations in @postdom/sdk:
get_workspace_status,list_accounts,connect_accountcreate_media_upload,get_media_status,upload_media,wait_for_mediasubmit_plan,get_planpublish_video,get_post,wait_for_publishget_post_performance,get_account_performance,get_best_postsget_brief,get_digest
Responses are Pydantic v2 models. Models allow additive server fields so a harmless API addition
does not break existing applications. The checked-in contract suite locks operation paths,
platforms, statuses, metrics, limits, and media handles to the audited Node SDK, which is itself
drift-tested against the live API route table and @postdom/core.
Authentication and safety
Use a workspace pd_live_ API key or pd_oauth_ OAuth access token. Both carry agent authority:
approval, billing, and dashboard administration remain human-only and return
403 agent_token_forbidden by design. Credentials are held as Pydantic SecretStr values and
never appear in client representations or SDK-generated errors.
publish_video defaults TikTok to SELF_ONLY, Instagram to a Reel with AI disclosure, and YouTube
to private with synthetic-media disclosure. It generates one idempotency key and reuses it across
safe retries. connect_account is never retried because it has no idempotency key.
upload_media sends bytes through a separate HTTP client directly to the short-lived signed
storage URL. The Postdom bearer credential is never attached to that PUT, the PUT is never
retried, and the signed URL is not returned from the high-level result.
Errors
Non-2xx responses raise typed subclasses of PostdomAPIError, including
PostdomAuthenticationError, PostdomScopeError, PostdomHumanRouteError,
PostdomBillingError, PostdomRateLimitError, and PostdomServerError. Network and deadline
failures use PostdomConnectionError and PostdomTimeoutError.
Release status
Version 0.1.0 is the initial package version. PyPI publishing is held until Dean explicitly
authorizes it; building and audit do not imply registry publication.
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 postdom-0.1.0.tar.gz.
File metadata
- Download URL: postdom-0.1.0.tar.gz
- Upload date:
- Size: 16.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
37dca459b4d0d30952757a5ff7b6020e41c78fae8e4adf2fb49a364ff89715e2
|
|
| MD5 |
bc6fb8ba0d69975e4c694605ecae79f0
|
|
| BLAKE2b-256 |
d125d4d08fa2f2c0418a3a902c14d4d2c8f793ba228b8682d14fb829f5c284f7
|
File details
Details for the file postdom-0.1.0-py3-none-any.whl.
File metadata
- Download URL: postdom-0.1.0-py3-none-any.whl
- Upload date:
- Size: 14.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fa763254167e393164c920e40ddc4e658c6bc6f5733c82895450b0ade069e3cd
|
|
| MD5 |
b914c9fe279a39ace488f3a5a135cb23
|
|
| BLAKE2b-256 |
5542244c7880ebb48f7064e39a0f724892092023e7d6f12c9907a91f89b76a80
|