Skip to main content

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 True will raise errors on all specification-violating parse errors from the provided records.
  • Setting this to False will only raise errors on egregious specification violations that make parsing impossible. When set to False, podns will do its' best to infer intent when met with trivial violations, it will however never return a podns.pronouns.PronounsResponse that 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

podns-0.1.0.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

podns-0.1.0-py3-none-any.whl (9.4 kB view details)

Uploaded Python 3

File details

Details for the file podns-0.1.0.tar.gz.

File metadata

  • Download URL: podns-0.1.0.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

Hashes for podns-0.1.0.tar.gz
Algorithm Hash digest
SHA256 15e99baa72740f8a5d1f60fb36a343e1705bf9208a27b2097302fe8bab511008
MD5 47f31f0b44dc5ead1ec21d1543cd154d
BLAKE2b-256 6efb36f6242e876c98a104a6772ffea5b4aa5d11f7df913e9c5451b0923a1c51

See more details on using hashes here.

File details

Details for the file podns-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: podns-0.1.0-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

Hashes for podns-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e96616978e69da23287090bab07869889815a4084937fed22942cea325e59f54
MD5 40d5ee721e7620c0ef27f7ad033789ae
BLAKE2b-256 2218f39f3526c57db4038f2cba0316862bf6e13814304846799bbed3f60544ba

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page