Skip to main content

Official Python SDK for CodivUpload API — publish, schedule, and manage social media posts across 9 platforms.

Project description

codivupload

Official Python SDK for CodivUpload — publish, schedule, and manage social media posts across 9 platforms.

Get an API key

You need a CodivUpload API key (cdv_...) for this SDK. Two paths:

  • 7-day free trial — start at app.codivupload.com/en/dashboard/subscription?trial=1. $0.00 due today, card collected for auto-renewal after 7 days. Cancel anytime during the trial in the Stripe Customer Portal — no charge. API key is unlocked immediately during the trial. One trial per customer lifetime.
  • Direct subscribe — Starter starts at $20/mo (or $200/yr — 2 months free). API access included from Starter and above. Pricing: codivupload.com/pricing.

The Free plan ($0, no credit card) is dashboard-only and does not include API access — this SDK cannot run on Free.

After signup → Dashboard → Profiles → New profile → Connect a social account → Settings → API Keys → Generate key → use cdv_... value below.

Install

pip install codivupload

Quick Start

from codivupload import CodivUpload

codiv = CodivUpload("cdv_your_api_key")

# Publish to TikTok and Instagram
post = codiv.posts.create(
    platforms=["tiktok", "instagram"],
    description="New product launch! 🚀",
    media_urls=["https://cdn.example.com/video.mp4"],
    profile_name="my_brand",
)

print(post["id"])      # "post_k8m2v9x1"
print(post["status"])  # "publishing"

Posts

# Create / publish immediately
post = codiv.posts.create(
    platforms=["tiktok", "instagram", "youtube"],
    description="Check this out!",
    media_urls=["https://cdn.example.com/video.mp4"],
    profile_name="my_brand",
)

# Schedule for later
scheduled = codiv.posts.schedule(
    platforms=["youtube", "linkedin"],
    description="Big announcement!",
    scheduled_date="2026-04-05T14:00:00Z",
    profile_name="my_brand",
)

# List posts
posts = codiv.posts.list(status="completed", limit=20)

# Get single post
post = codiv.posts.get("post_k8m2v9x1")

# Update
codiv.posts.update("post_k8m2v9x1", description="Updated caption")

# Delete
codiv.posts.delete("post_k8m2v9x1")

Profiles

# List all profiles
result = codiv.profiles.list()
for p in result["profiles"]:
    print(f"{p['profile_name']} (@{p['username']})")

# Create a new profile
profile = codiv.profiles.create("new_client", profile_name="New Client Inc.")

# Delete
codiv.profiles.delete("profile-uuid")

Media

# Upload to CDN
media = codiv.media.upload("https://example.com/video.mp4", profile_name="my_brand")
print(media["url"])  # CDN URL

# Use in a post
codiv.posts.create(
    platforms=["tiktok"],
    description="Uploaded via Python SDK!",
    media_urls=[media["url"]],
    profile_name="my_brand",
)

# List / get / delete
assets = codiv.media.list()
asset = codiv.media.get("media-uuid")
codiv.media.delete("media-uuid")

Live Streaming (YouTube 24/7)

# Start immediately
stream = codiv.broadcasts.create(
    profile_name="my_channel",
    title="Lo-fi Coding Radio 24/7 🎵",
    media_url="https://cdn.example.com/lofi-mix.mp4",
    is_loop=True,
)

# Schedule for later
codiv.broadcasts.create(
    profile_name="my_channel",
    title="Friday Jazz",
    media_url="https://cdn.example.com/jazz.mp4",
    start_time="2026-04-04T22:00:00Z",
    is_loop=True,
)

# List / stop
broadcasts = codiv.broadcasts.list()
codiv.broadcasts.stop("broadcast-uuid")

Platform-Specific Overrides

codiv.posts.create(
    platforms=["tiktok", "instagram", "youtube", "linkedin", "x"],
    description="Product launch!",
    media_urls=["https://cdn.example.com/launch.mp4"],
    profile_name="my_brand",
    # TikTok
    tiktok_privacy_level="public",
    tiktok_disable_duet=False,
    tiktok_brand_content_toggle=True,
    # Instagram
    instagram_media_type="REELS",
    instagram_location_id="123456789",
    instagram_alt_text="Product demo video",
    # YouTube
    youtube_type="video",
    youtube_privacy_status="public",
    youtube_category_id="28",
    youtube_tags=["product", "launch", "2026"],
    # LinkedIn
    linkedin_visibility="PUBLIC",
    # X
    x_reply_settings="following",
)

Error Handling

from codivupload import CodivUpload, CodivUploadError

codiv = CodivUpload("cdv_your_api_key")

try:
    codiv.posts.create(platforms=["tiktok"], description="Hello!")
except CodivUploadError as e:
    print(e)           # "Rate limit exceeded"
    print(e.status)    # 429
    print(e.code)      # "RATE_LIMITED"

Context Manager

with CodivUpload("cdv_your_api_key") as codiv:
    codiv.posts.create(platforms=["instagram"], description="Hello!")
# Connection automatically closed

Configuration

# Default (production)
codiv = CodivUpload("cdv_...")

# Custom base URL (local dev)
codiv = CodivUpload("cdv_...", base_url="http://localhost:3000/api/v1")

# Custom timeout
codiv = CodivUpload("cdv_...", timeout=60.0)

Supported Platforms

TikTok, Instagram, YouTube, Facebook, LinkedIn, X (Twitter), Threads, Pinterest, Bluesky

Links

License

MIT — Codivion LLC

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

codivupload-1.0.1.tar.gz (5.4 kB view details)

Uploaded Source

Built Distribution

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

codivupload-1.0.1-py3-none-any.whl (6.5 kB view details)

Uploaded Python 3

File details

Details for the file codivupload-1.0.1.tar.gz.

File metadata

  • Download URL: codivupload-1.0.1.tar.gz
  • Upload date:
  • Size: 5.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for codivupload-1.0.1.tar.gz
Algorithm Hash digest
SHA256 1bc4ba4f5b25fb72c99d877d45806b7f8bdef4f36e5000292facc16ecc0b9939
MD5 4ff5770ba29bc961b26152b9a6a282b8
BLAKE2b-256 3b76f9ce18dc66434af65b54c337e976161c994b461a86cd28d0baf0866a8670

See more details on using hashes here.

File details

Details for the file codivupload-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: codivupload-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 6.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for codivupload-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5ca4d7bf224e3bd6c7c1da400ef6e0959a21a69d9e2b15f9f0adab14dfe47e35
MD5 3cdacc823674b190773d7ec1909260ad
BLAKE2b-256 9507eb794b3726bd8af27e7a169170d4d96b6983a6a4c23d88de3bed8bc7d5ba

See more details on using hashes here.

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