API wrapper for the pronoundb.org API.
Project description
PronounDB Python API
API wrapper for the pronoundb.org API.
Installation
pip install pronoundb
Examples
lookup someone's pronouns by their discord id:
from pronoundb import lookup, Platform
lookup(Platform.DISCORD, 123456789012345678)
# -> {123456789012345678: ["he", "him"]}
lookup someone's pronouns by their minecraft (java) uuid:
from pronoundb import lookup, Platform
lookup(Platform.MINECRAFT, "12345678-1234-1234-1234-123456789012")
# -> {"12345678-1234-1234-1234-123456789012": ["they", "them"]}
lookup multiple users pronouns by their discord id:
from pronoundb import lookup, Platform
lookup(Platform.DISCORD, [123456789012345678, 987654321098765432])
# -> {123456789012345678: ["he", "him"], 987654321098765432: ["she", "her"]}
Supported Platforms
- Discord
- GitHub
- Minecraft (Java)
- Twitch
Custom Pronouns (Version 2.0.0)
Beginning with version 2.0.0, you can give the lookup function a list of pronouns to translate them, for example.
from pronoundb import lookup, Platform
lookup(Platform.DISCORD, 123456789012345678, {
"unspecified": [],
"he": ["Er", "Ihn"],
"she": ["Sie", "Ihr"],
"it": ["Es", "Seine"],
"they": ["They", "Them"],
"any": ["Jede"],
"other": ["Anderes"],
"ask": ["Frag"],
"avoid": ["Nutz Name"],
})
# -> {123456789012345678: ["Er", "Ihn"]}
Contributing
Contributions to this library are always welcome and highly encouraged.
License
This project is licensed under the MIT License - see the LICENSE file for details.
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
pronoundb-2.0.4.tar.gz
(3.7 kB
view hashes)
Built Distribution
Close
Hashes for pronoundb-2.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 181ca215999a191925ea95c261ef74d12de2d386527bf9c87b9ccf55aca0f46e |
|
MD5 | 254f73e9d94f8f1e53322cc5473f01b7 |
|
BLAKE2b-256 | 9043d30b00865e4c9ce4d7efc6ed2e2e880a55333dd1ce7198d8f84fa45c6a16 |