Skip to main content

A Pronouns over DNS specification compliant Python API.

Project description

podns_py

enbyware license pypi-version python-version github-issues github-issues

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.

[!NOTE] there was exactly zero usage of generative ai involved during the development of this package, including autocomplete.

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.2.2.tar.gz (6.1 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.2.2-py3-none-any.whl (10.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: podns-0.2.2.tar.gz
  • Upload date:
  • Size: 6.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for podns-0.2.2.tar.gz
Algorithm Hash digest
SHA256 b463b2b746f46e80a8b2603fe23f6952aa60bac5057a5af4e18f2712632b4754
MD5 dd32b6946be8f6d407460fc51a0a7d2f
BLAKE2b-256 af364d1f599f6298b9500bfd66ba4f7f4f437bac0cef0f852673540648268ff9

See more details on using hashes here.

Provenance

The following attestation bundles were made for podns-0.2.2.tar.gz:

Publisher: ci-cd.yml on ijsbol/podns_py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

  • Download URL: podns-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 10.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for podns-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 9b8a223983c2528a6d42fdc0fcd05c4098fd90e7f97de90e9dc042d9a82b6c58
MD5 9e1eaf18f518d1fb29cbfcc02e5adeaf
BLAKE2b-256 6b29b3a16a9100176d8d49c31e63c9aee2e9203a4bb47e05b94cf4466bbf7983

See more details on using hashes here.

Provenance

The following attestation bundles were made for podns-0.2.2-py3-none-any.whl:

Publisher: ci-cd.yml on ijsbol/podns_py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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