Python wrapper for PluralKit's API.
Project description
pluralkit.py
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 🐛 |
Gem 💻🐛 |
Links
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for pluralkit-1.1.7-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 12b49cba2003fe37db3b3c93fbd114dc829d65c7463a34ed3bae51b00dab4c99 |
|
MD5 | 484ec6572c3ed4722f5c4e5173f31ee4 |
|
BLAKE2b-256 | 58c6d9a43ce73f7c5366b17195df84b65730e88f8e2814b6ec7a79b782c557cb |