A Pronouns over DNS specification compliant Python API.
Project description
podns_py
A Pronouns over DNS specification compliant Python API.
Documentation
Fetching from domain record.
If you want to fetch someones pronouns from their domain, see the below:
Note that we support both synchronous and asynchronous lookups.
import asyncio
import podns.dns
async def main() -> None:
domain = "abigail.sh"
podns.dns.fetch_pronouns_from_domain_sync(domain)
await podns.dns.fetch_pronouns_from_domain_async(domain)
if __name__ == "__main__":
asyncio.run(main())
Parsing a raw list
If you already have fetched the users pronouns, or are just parsing a raw literal:
import podns.parser
podns.parser.parse_pronoun_records([
"she/her",
"they/them/theirs;preferred"
])
Optional pedantic kwarg on user APIs
For all user-level APIs (that is, podns.dns.fetch_pronouns_from_domain_* and podns.parser.parse_pronoun_records), there is an optional kwarg, pedantic, that defaults to False.
- Setting this to
Truewill raise errors on all specification-violating parse errors from the provided records. - Setting this to
Falsewill only raise errors on egregious specification violations that make parsing impossible. When set toFalse, podns will do its' best to infer intent when met with trivial violations, it will however never return apodns.pronouns.PronounsResponsethat violates the specification.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file podns-0.1.1.tar.gz.
File metadata
- Download URL: podns-0.1.1.tar.gz
- Upload date:
- Size: 4.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c95f6995647b480f64a3506c8e38edd458642007f643873ded45452d0fad6bbc
|
|
| MD5 |
e207181cdd437ea33fee76cb1d3c3b66
|
|
| BLAKE2b-256 |
14ac89adc505b67fd1af80981f2bd0957eab3e2f4d3caa43b03c0975a4900178
|
File details
Details for the file podns-0.1.1-py3-none-any.whl.
File metadata
- Download URL: podns-0.1.1-py3-none-any.whl
- Upload date:
- Size: 9.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0a6ffa7882a45ec4637eb2c5cb4d355abec5f166c66a7b5229d069a6392c242f
|
|
| MD5 |
fed5cd0891809509bda291d3bf4bd0f9
|
|
| BLAKE2b-256 |
bb3fa427fd469bd497dd9e7cd46657d77368f24ffdd2ec7bb895a447238dbab6
|