Socifyr Python SDK
The socifyr package is a small Python client for the Socifyr REST API. Create one Socifyr object with an API key and workspace ID, then call methods on uploads, workspaces, analytics and ai. Responses come back as plain dict and list values, not typed models.
from socifyr import Socifyr
client = Socifyr(api_key="sk_...", workspace_id="ws_...")
ack = client.uploads.text(
connections=["x-myhandle", "linkedin-mybrand"],
text="Shipped v2 today.",
)
print(ack["requestId"])Each request sends Authorization: Bearer <api_key> and X-Workspace-Id, and the client returns the data part of the { success, data } envelope.
How do I install it?
pip install socifyrRequires Python 3.9 or newer and the requests library. See Installation.
What can the Python SDK do?
| Resource | Methods | Page |
|---|---|---|
uploads | text, photos, video, bulk_schedule, get_status, list, get, retry, publish_draft | Uploads |
workspaces | list_connections, refresh_connection, reconnect_link, usage | Workspaces |
analytics | get, get_post, sync, followers, accounts | Analytics |
ai | generate_caption, suggest_hashtags | Reference |
| module function | verify_webhook_signature | Webhooks |
There is no media resource, no file upload, no webhook management and no engagement resource. See Media for the workaround.
How does it compare with the TypeScript SDK?
| Capability | TypeScript SDK | Python SDK |
|---|---|---|
| Publish text | yes | yes |
| Publish photos and video by media ID or URL | yes | yes |
| Upload raw files while posting | yes (Buffer, Blob) | no |
| Publish documents | yes | no |
Per-platform options (platformOptions) | yes | no |
title, description, linkUrl, contentFormat fields | yes | no |
Schedule (scheduledAt, timezone) | yes | scheduled_at on all; timezone on text only |
| Save draft | all create methods | text only |
| Bulk CSV or rows scheduling | yes | yes |
| Status, list, get | yes | yes |
| Wait for completion helper | waitForCompletion | no, poll get_status |
| Retry failed channels, publish draft | yes | yes |
| Cancel, publish now, update draft, archive | yes | no |
| Media library (list, update, delete) | yes | no |
| AI captions and hashtags | yes | yes (no brand_voice, no status) |
| Analytics: aggregate, post, sync | yes | yes |
| Follower growth and account comparison | yes | yes |
| Platform metrics metadata | yes | no |
| Engagement backfill and insights reset | yes | no |
| Webhook CRUD and deliveries | yes | no |
| Webhook signature verification | yes | yes |
| Parse webhook event helper | yes | no, use json.loads |
| Workspaces, members, invitations, API keys | yes | no |
| List, refresh, reconnect connections | yes | yes |
| Automatic retries | safe methods only | none |
| Typed models | yes | no, dict |
| Approvals (submit, approve, reject) | no | no |
For anything marked "no" you can call the REST API directly or use the TypeScript SDK.
FAQ
Does client.uploads.text() wait for the post to publish?
No. Every create method in the Python SDK sends async: true, so the call returns an acknowledgement with requestId and you poll get_status. See Uploads.
Is the package async?
No. It uses requests and blocks. Run it in a thread or worker if you need concurrency.
Where do credentials come from?
Constructor arguments first, then the SOCIFYR_API_KEY, SOCIFYR_WORKSPACE_ID and SOCIFYR_API_URL environment variables. See Configuration.