Skip to main content

socialchimp

CI PyPI Python Coverage Types Ruff Licence

One simple way to connect your app to social networks.

Read this as a website: raghulj.github.io/socialchimp — the tutorial, the reference and everything below, searchable and easier to read than markdown files in a repository.

Mastodon · Bluesky · Facebook Pages · Instagram · YouTube · TikTok · X · Pinterest · Threads

Sign people in, keep their tokens working, post for them, and hear about what happens - a comment, a like - the same way whether the network pushes it to you or socialchimp checks on a timer. One way to do this across all nine networks, and direct access to any one of them when its own features are what you need.


What it does

  • Connect accounts. Sign in with Mastodon, Bluesky, Facebook, Instagram, YouTube, TikTok, X, Pinterest or Threads.
  • Keep tokens working. Refreshed before they expire, safely, even when several workers run at once.
  • Post and read. Text, pictures, video. Read a post's numbers back where the network allows it.
  • Know what happened. Comments and likes reach you the same way whether the network pushes them to you or socialchimp checks on a timer.
  • Get out of the way when you need more. account.direct sends a request of your own through the same token, the same retries and the same rate limits - only the request is yours.

What it does not do

  • It does not touch your database. No models, no migrations. You write a small storage class, socialchimp hands you data to save. Your schema stays yours, and it works the same on Django, FastAPI, Flask, or nothing at all.
  • It does not post to several accounts in one call. account.post(...) posts as one account and raises if that one fails. Looping over your accounts, and deciding what one failure means for the rest, is a few lines in your own app - only your app knows the right answer.
  • It does not pretend networks are the same. Pinterest needs a board. Bluesky cannot schedule. YouTube has no text-only post. Where a network genuinely cannot do something, the answer says so by name instead of guessing.

The real cost of starting

Two of the nine need nothing you have to build: socialchimp registers a Mastodon app for you, and Bluesky has no app at all - just a handle and an app password. The other seven - Facebook, Instagram, YouTube, TikTok, X, Pinterest, Threads - need you to create an app by hand in that network's own developer portal, and most of those review it before it works for anyone but you. That review is usually the slowest part of getting started, so begin it early. Networks says what each one needs.


Install

pip install socialchimp

Add your framework if you want the ready-made routes:

pip install "socialchimp[django]"    # or [fastapi], or [flask]

A first look

Once somebody has connected an account - the tutorial covers signing them in - posting for them looks like this:

from socialchimp import SocialChimp, Post

sc = SocialChimp(storage=my_storage)

account = sc.account(connection_id)
result = await account.post(Post(text="Hello from socialchimp"))
print(result.url)

my_storage is five methods you write once; connection_id is whichever account you saved when that person signed in.


Documentation

New here? Start with the tutorial. It assumes you have built a web app before but have never touched a social network API, and explains why this is harder than one HTTP request.

Learning

Three things people actually build

Reference

  • Networks - what each one can do, and what it needs
  • Frameworks - the ready-made routes in detail
  • Adding a platform - a network we do not support yet
  • Examples - runnable programs, including two whole sample apps
  • Changelog - what changed, and what it means for you

Project

  • Plan - what is built and what is coming
  • Contributing - the three rules that are not negotiable
  • Releasing - how a release goes out

Contributing

Contributions are welcome. A few things to know first:

  • Tests come first. Write the failing test, then make it pass.
  • Coverage must stay at 100%. CI fails below it.
  • Types must be strict. mypy --strict with no ignores.
git clone https://github.com/raghulj/socialchimp
cd socialchimp
uv sync --all-extras --dev
uv run pre-commit install --hook-type pre-commit --hook-type pre-push
uv run pytest

Licence

MIT. See LICENSE.

Metadata

Release files for socialchimp 0.13.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for socialchimp 0.13.0
File Size Uploaded Provenance Actions
socialchimp-0.13.0.tar.gz 1.0 MB With provenance Details for socialchimp-0.13.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for socialchimp 0.13.0
File Interpreter ABI Platform Actions
socialchimp-0.13.0-py3-none-any.whl Python 3 none any Details for socialchimp-0.13.0-py3-none-any.whl

Total release size: 1.4 MB

Release files / socialchimp-0.13.0.tar.gz

Download URL socialchimp-0.13.0.tar.gz
Size 1.0 MB
Tags Source
SHA-256 checksum
How to use checksums
7d944f0429e2ac20841affab5102b468e61e95a6f1a183395619200514ae0557
BLAKE2b-256 checksum
How to use checksums
afaf20998f7826437b2e1a6220565e68b47724bd0e102bf70eb4c66459b8f8f9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 20, 2026.

Transparency log

Release files / socialchimp-0.13.0-py3-none-any.whl

Download URL socialchimp-0.13.0-py3-none-any.whl
Size 425.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
67a6bfc8acddb6541e828932ff2c8fb14f8967aab778ca92eff47f00bd9dcd8e
BLAKE2b-256 checksum
How to use checksums
549a2ccb7bc4b2c32cdd2f94a15e558d51f68c346523c2e86c64f428d7938f30
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 20, 2026.

Transparency log

Security for socialchimp 0.13.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for socialchimp-0.13.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 20, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page