API wrapper for the pronoundb.org API. https://pypi.org/project/pronoundb/
Go to file
SteffoSpieler b0715b0622
/ tests (push) Successful in 28s Details
chore(release): 2.0.3
2023-11-26 16:38:31 +01:00
.forgejo/workflows ci: Add test action running in forgejo (Closes #1) 2023-08-02 20:20:30 +02:00
.idea test: Improve tests 2023-05-27 23:01:14 +02:00
pronoundb fix: Crash when identifier doesn't exist 2023-11-26 16:38:03 +01:00
scripts chore: Add updater script for commit-and-tag-version 2022-11-19 19:09:32 +01:00
tests style: Format file correctly 2023-06-30 14:06:37 +02:00
.gitignore chore: Initial commit 2022-11-13 20:51:32 +01:00
.versionrc chore: Add updater script for commit-and-tag-version 2022-11-19 19:09:32 +01:00
CHANGELOG.md chore(release): 2.0.3 2023-11-26 16:38:31 +01:00
LICENSE chore: Add LICENSE file 2022-11-18 18:33:54 +01:00
README.md chore: Update readme.md to reflect newest changes 2023-05-27 23:44:04 +02:00
poetry.lock chore: Update dependencies 2023-08-11 00:00:25 +02:00
pyproject.toml chore(release): 2.0.3 2023-11-26 16:38:31 +01:00

README.md

PronounDB Python API

PyPI PyPI - Python Version PyPI - License

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
  • Twitter

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.