Skip to content

almonds0166/pluralkit.py

main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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

πŸ›

Gem

πŸ’»πŸ›

About

Asynchronous Python wrapper for PluralKit's API

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages