Skip to main content

Swagsocial.py

Now on PyPI: https://pypi.org/project/swagsocial-py/

Python module to interact with swagsocial.

Created by Wish wishyt@proton.me, Squirrel squirrelhomebrew@gmail.com, and maxie!

Getting your API key

Log into your desired swagsocial account and go to Settings --> API, or click this link

If you would like to grant manage post permissions, which includes making posts and replies. It also allows deleting posts and replies, so be careful!

Asynchronous code

If you want to do asynchronous stuff do

pip install swagsocial-py[asynchronous]

and access stuff via swagsocial_py.asynchronous

v1

SwagClient(api_key): apikey is the account's API key. You must assign this to a variable

SwagClient.users: You may get total amount of users.

SwagClient.posts: You may get total amount of posts.

SwagClient.me: You may get information about your API key user.

SwagClient.create_post(content, media): You may create a post. With media, you may attach pictures or videos. Media takes a string in the form of a file name. Content takes a string. Requires "Manage posts" permission

SwagClient.reply(post_id, content, media): You may reply to a post. post_id accepts an integer. Works the same as create_post but with reply support.

SwagClient.delete_post(post_id): You may delete a post you have created. post_id takes an integer. Requires "Manage posts" permission

SwagClient.get_post(post_id): You may get post details as Post class. post_id takes an integer.

SwagClient.get_post_stream(post_id): You may get a post's replies as Post classes, in real time, as a stream (SSE1). post_id takes an integer.

SwagClient.get_tagged_posts(): You may get a list of posts as PostsList class.

SwagClient.get_tagged_posts_stream(): You may get posts your API key user is mentioned in, in real time, as a stream (SSE1).

SwagClient.get_user(username): You may get a user's information as User class. username takes a string.

SwagClient.get_user_posts(username): You may get user's posts as PostsList class. username takes a string.

SwagClient.now_playing(username): You may get a user's lastfm now playing details as NowPlayingLastFM class. username takes a string.

  1. SSE stands for Server Side Events, allows to send data to the client in real time ↩ ↩2

Metadata

Release files for swagsocial-py 1.3.1

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

Source distribution (sdist)

Source distribution for swagsocial-py 1.3.1
File Size Uploaded Provenance
swagsocial_py-1.3.1.tar.gz 19.6 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for swagsocial-py 1.3.1
File Interpreter ABI Platform
swagsocial_py-1.3.1-py3-none-any.whl Python 3 none any Details

Total release size: 41.0 kB

Release files / swagsocial_py-1.3.1.tar.gz

Download URL swagsocial_py-1.3.1.tar.gz
Size 19.6 kB
Tags Source
SHA-256 checksum
How to use checksums
f65602e1e20542523ddaa97c76ddbe814989e377fd8d204317f1777933424cf0
BLAKE2b-256 checksum
How to use checksums
03d57d52cd47e32cc7a1e603661c2c8a6784c03dc67f7c3bb65367acc99ce405
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Release files / swagsocial_py-1.3.1-py3-none-any.whl

Download URL swagsocial_py-1.3.1-py3-none-any.whl
Size 21.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2020628075a41c1951c0aae1f862c9008cdbfbb46fab560b6a2283ad40c4bc9b
BLAKE2b-256 checksum
How to use checksums
5944ce3c156aa6b995cad102992db91628379a2820bd3df5f9754c6b2f32bfa0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Security for swagsocial-py 1.3.1

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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