API wrapper for the pronoundb.org API.
https://pypi.org/project/pronoundb/
/ tests (push) Successful in 28s
Details
|
||
---|---|---|
.forgejo/workflows | ||
.idea | ||
pronoundb | ||
scripts | ||
tests | ||
.gitignore | ||
.versionrc | ||
CHANGELOG.md | ||
LICENSE | ||
README.md | ||
poetry.lock | ||
pyproject.toml |
README.md
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"],
"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.