🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

late-sdk

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

late-sdk

Python SDK for Late API - Social Media Scheduling

pipPyPI
Version
1.0.1
Maintainers
1

Late

Late Python SDK

Python SDK for Late API - Schedule social media posts across multiple platforms.

Installation

pip install late-sdk

Quick Start

from late import Late

client = Late(api_key="your_api_key")

# List connected accounts
accounts = client.accounts.list()

# Create a scheduled post
from datetime import datetime, timedelta

post = client.posts.create(
    content="Hello from Late!",
    platforms=[{"platform": "twitter", "accountId": "your_account_id"}],
    scheduled_for=datetime.now() + timedelta(hours=1),
)

🤖 Claude Desktop Integration (MCP)

Schedule posts directly from Claude Desktop using natural language.

Setup in 3 Steps

1. Install uv (package manager)

# macOS / Linux
curl -LsSf https://astral.sh/uv/install.sh | sh

# Windows (PowerShell)
powershell -c "irm https://astral.sh/uv/install.ps1 | iex"

2. Add to Claude Desktop config

Open the config file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json

Add this:

{
  "mcpServers": {
    "late": {
      "command": "uvx",
      "args": ["--from", "late-sdk[mcp]", "late-mcp"],
      "env": {
        "LATE_API_KEY": "your_api_key_here"
      }
    }
  }
}

Get your API key at getlate.dev/dashboard/api-keys

3. Restart Claude Desktop

Done! Ask Claude things like:

  • "Post 'Hello world!' to Twitter"
  • "Schedule a LinkedIn post for tomorrow at 9am"
  • "Show my connected accounts"
Alternative: Using pip instead of uvx
pip install late-sdk[mcp]
{
  "mcpServers": {
    "late": {
      "command": "python",
      "args": ["-m", "late.mcp"],
      "env": {
        "LATE_API_KEY": "your_api_key_here"
      }
    }
  }
}

Uploading Images/Videos

Since Claude can't access local files, use the browser upload flow:

  • Ask Claude: "I want to post an image to Instagram"
  • Claude gives you an upload link → open it in your browser
  • Upload your file and tell Claude "done"
  • Claude creates the post with your media

Available Commands

CommandWhat it does
list_accountsShow connected social accounts
create_postCreate scheduled or immediate post
publish_nowPublish immediately
cross_postPost to multiple platforms
list_postsShow your posts
retry_postRetry a failed post
generate_upload_linkGet link to upload media

SDK Features

Async Support

import asyncio
from late import Late

async def main():
    async with Late(api_key="...") as client:
        posts = await client.posts.alist(status="scheduled")

asyncio.run(main())

AI Content Generation

pip install late-sdk[ai]
from late.ai import ContentGenerator, GenerateRequest

generator = ContentGenerator(provider="openai", api_key="sk-...")

response = generator.generate(
    GenerateRequest(
        prompt="Write a tweet about Python",
        platform="twitter",
        tone="casual",
    )
)

print(response.text)

CSV Scheduling

from late import Late
from late.pipelines import CSVSchedulerPipeline

client = Late(api_key="...")
pipeline = CSVSchedulerPipeline(client)

# Validate first
results = pipeline.schedule("posts.csv", dry_run=True)

# Then schedule
results = pipeline.schedule("posts.csv")

Cross-Posting

from late.pipelines import CrossPosterPipeline, PlatformConfig

cross_poster = CrossPosterPipeline(client)

results = await cross_poster.post(
    content="Big announcement!",
    platforms=[
        PlatformConfig("twitter", "tw_123"),
        PlatformConfig("linkedin", "li_456", delay_minutes=5),
    ],
)

API Reference

Resources

ResourceMethods
client.postslist, get, create, update, delete, retry
client.profileslist, get, create, update, delete
client.accountslist, get
client.mediaupload, upload_multiple
client.analyticsget, get_usage
client.toolsyoutube_download, instagram_download, tiktok_download, generate_caption
client.queueget_slots, preview, next_slot

Client Options

client = Late(
    api_key="...",
    timeout=30.0,      # seconds
    max_retries=3,
)

License

MIT

Keywords

api-client

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts