Skip to main content

Python wrapper for PluralKit's API.

Project description

pluralkit.py

PyPi Version Documentation Status Discord server invite

Python wrapper for PluralKit's API.

Installing

Python 3.6 or higher is required.

# linux/macOS
python3 -m pip install -U pluralkit

# windows
py -3 -m pip install -U pluralkit

Quick examples

Provided a system's authorization token, the examples below print the system description and list the system's members.

Async usage

pluralkit.py was created with discord.py in mind, and so the default implementation is asynchronous.

from pluralkit import Client
import asyncio

pk = Client("token") # your token here

async def main():
   system = await pk.get_system()
   print(system.description)

   members = pk.get_members()
   async for member in members:
      print(f"{member.name} (`{member.id}`)")

loop = asyncio.get_event_loop()
loop.run_until_complete(main())

Synchronous usage

Blocking execution may be specified with the client argument async_mode=False.

from pluralkit import Client

pk = Client("token", async_mode=False)

system = pk.get_system()
print(system.description)

members = pk.get_members()
for member in members:
   print(f"{member.name} (`{member.id}`)")

Token

The client can be used without one's PluralKit authorization token, but it's required for editing one's system or members or for accessing one's private system or member info.

Contributors ✨

Thanks to these wonderful people (emoji key) and users in the Discord who actively supported development:


Alyx

💻🤔🚇⚠️💬

Kotocade

💻📖🤔🚧📆💬

Ashton Power

💻📓

System in a Box

🐛

Warmth System

💻🐛

Links

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

pluralkit-1.2.1.tar.gz (48.5 kB view details)

Uploaded Source

Built Distribution

pluralkit-1.2.1-py3-none-any.whl (38.3 kB view details)

Uploaded Python 3

File details

Details for the file pluralkit-1.2.1.tar.gz.

File metadata

  • Download URL: pluralkit-1.2.1.tar.gz
  • Upload date:
  • Size: 48.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.1

File hashes

Hashes for pluralkit-1.2.1.tar.gz
Algorithm Hash digest
SHA256 ed49e2b6dc6fb9acf489be8dccf6975d328f3946f69ee41e9fec1b9df06bb6af
MD5 b94fdbb84120b17fa3dcdcc6eb5900c3
BLAKE2b-256 fb7bbb21b4524d9c69c0c5b87031006cf6da7f8addf79383244469e0e0020316

See more details on using hashes here.

File details

Details for the file pluralkit-1.2.1-py3-none-any.whl.

File metadata

  • Download URL: pluralkit-1.2.1-py3-none-any.whl
  • Upload date:
  • Size: 38.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.1

File hashes

Hashes for pluralkit-1.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 feca40875f479ee1000f85314003cdcfa3f2757c32578ba905d425e56cb80baa
MD5 f382c6f923b3f406a614377ffa2ca444
BLAKE2b-256 f00bd340b855a6fe7511b13103530b4dfead86d6a09e73846d588b8a9e48a324

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page