Skip to main content

Official Python SDK for DropReply — publish replies on Reddit & X

Project description

DropReply Python SDK

Official Python SDK for DropReply — publish replies and upvotes on Reddit & X programmatically.

Installation

pip install dropreply

Requires Python 3.7+. No external dependencies.

Quick Start

from dropreply import DropReply

client = DropReply("drpl_live_sk_your_key_here")

# Submit a reply
reply = client.reply(
    platform="reddit",
    target_url="https://www.reddit.com/r/startup/comments/abc123/...",
    content="Great point! We built something similar..."
)

print(reply["id"])      # 'rpl_abc123'
print(reply["status"])  # 'queued'

Configuration

client = DropReply(
    api_key="drpl_live_sk_xxx",
    base_url="https://api.dropreply.com",  # default
    timeout=30                             # request timeout in seconds (default: 30)
)

Methods

client.reply(platform, target_url, content, schedule_at=None)

Submit a reply for publishing.

reply = client.reply(
    platform="reddit",         # 'reddit' or 'twitter'
    target_url="https://...",  # URL of the post to reply to
    content="Your reply text", # 10-2000 characters
    schedule_at="2026-03-25T14:00:00Z"  # optional: ISO 8601 datetime (Growth/Scale only)
)

# Returns dict:
# {
#   "id": "rpl_abc123",
#   "status": "queued",           # or "scheduled" if schedule_at was set
#   "platform": "reddit",
#   "target_url": "https://...",
#   "credit_cost": 1,
#   "schedule_at": null,          # or the scheduled datetime
#   "created_at": "2026-03-22T..."
# }

client.get_reply(reply_id)

Get the status and details of a reply.

reply = client.get_reply("rpl_abc123")

# Returns dict:
# {
#   "id": "rpl_abc123",
#   "platform": "reddit",
#   "target_url": "https://...",
#   "content": "Your reply text",
#   "credit_cost": 1,
#   "status": "published",        # 'queued' | 'scheduled' | 'publishing' | 'published' | 'failed' | 'rejected'
#   "published_url": "https://...",
#   "schedule_at": null,
#   "published_at": "2026-03-22T...",
#   "created_at": "2026-03-22T..."
# }

client.list_replies(platform=None, status=None, limit=None, offset=None)

List replies with optional filtering and pagination.

result = client.list_replies(
    platform="reddit",   # optional filter
    status="published",  # optional filter
    limit=10,            # default: 20, max: 100
    offset=0             # pagination offset
)

# Returns dict:
# {
#   "data": [ { "id": ..., "platform": ..., "status": ..., ... }, ... ],
#   "pagination": { "total": 42, "limit": 10, "offset": 0 }
# }

client.upvote(platform, target_url)

Submit an upvote/like job.

upvote = client.upvote(
    platform="reddit",
    target_url="https://www.reddit.com/r/startup/comments/abc123/..."
)

# Returns dict:
# {
#   "id": "upv_xyz789",
#   "status": "queued",
#   "platform": "reddit",
#   "target_url": "https://...",
#   "credit_cost": 0.25,
#   "created_at": "2026-03-22T..."
# }

client.usage()

Get current credit balance and plan info.

usage = client.usage()

# Returns dict:
# {
#   "plan": "growth",
#   "credits_included": 100,
#   "credits_used": 23,
#   "credits_remaining": 77,
#   "extra_credits": 0,
#   "total_available": 77,
#   "billing_period_start": "2026-03-01T...",
#   "billing_period_end": "2026-04-01T..."
# }

client.accounts_availability(platform=None)

Check available managed accounts.

result = client.accounts_availability(platform="reddit")

# Returns dict:
# {
#   "accounts": [
#     { "platform": "reddit", "available": 12 }
#   ]
# }

Error Handling

All methods raise DropReplyError on failure:

from dropreply import DropReply, DropReplyError

client = DropReply("drpl_live_sk_xxx")

try:
    client.reply(platform="reddit", target_url="...", content="...")
except DropReplyError as e:
    print(e.status_code)  # HTTP status code (e.g. 400, 402, 422)
    print(e.error_code)   # API error code (e.g. 'validation_error')
    print(e.message)      # Human-readable error message

Common error codes:

  • validation_error (400) — Invalid input parameters
  • insufficient_credits (402) — Not enough credits
  • plan_required (403) — Feature requires a higher plan (e.g. scheduled replies)
  • not_found (404) — Resource not found
  • moderation_rejected (422) — Content failed moderation
  • concurrent_limit (429) — Too many replies in progress
  • rate_limit_exceeded (429) — Too many requests
  • internal_error (500) — Server error

License

MIT

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

dropreply-1.0.0.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

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

dropreply-1.0.0-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file dropreply-1.0.0.tar.gz.

File metadata

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

File hashes

Hashes for dropreply-1.0.0.tar.gz
Algorithm Hash digest
SHA256 cf931e628d68a758faf573b8e9a1ffe7d7efaf249beb281f3ea33343d501157e
MD5 a5be914d07298b8185de32cd5b8e85dd
BLAKE2b-256 34263024e877de8f242948c05cb44c4f721ea334e5c20f19ad4486a44d291214

See more details on using hashes here.

File details

Details for the file dropreply-1.0.0-py3-none-any.whl.

File metadata

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

File hashes

Hashes for dropreply-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6dfeb078b509e827b3234241ab807db7406ab1aa210aa6bb0ae9eee3a8661b89
MD5 f2e8163fd5eb860bdf8e5814512d5e3e
BLAKE2b-256 37b09c34aeaaad76be94b146279566b92fdd688d28bc97fdd0f6af03b856efde

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