Skip to main content

Domainprops

Python package for parsing domain name properties

test codecov Code style: black

Install

python -m pip install domainprops

Usage

from domainprops import domainprops

domainprops.tld("foo.com")          # "com"
domainprops.sld("foo.com")          # "foo"
domainprops.is_alpha("foo.com")     # True
domainprops.is_numeric("foo.com")   # False

API

Function Returns Description Example Result
tld string Top level domain tld("foo.com") "com"
sld string Sub level domain sld("foo.bar.com") "foo.bar"
bld string Bottom level domain bld("foo.bar.com") "foo"
length int Lenght of domain length("foo.com") 3
idn string IDN version of domain idn("f⊕⊕.com") "xn--f-vioa.com"
pattern string Char pattern pattern("foo-123.com") "lll-nnn"
domains list Domain parts of domain domains("foo.bar.com") ["foo", "bar", "com"]
has_alpha bool Has alpha characters has_alpha("foo.com") True
has_numbers bool Has numbers has_numbers("foo.com") False
has_hyphens bool Has hyphens has_hyphens("foo.com") False
is_alpha bool Is strictly alpha characters is_alpha("foo.com") True
is_numeric bool Is strictly numbers is_numeric("foo.com") False
is_alphanumeric bool Is strictly alpha characters and/or numbers is_alphanumeric("foo.com") True
is_subdomain bool Is sub domain is_subdomain("foo.com") False

Metadata

Release files for domainprops 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for domainprops 0.3.0
File Size Uploaded Provenance Actions
domainprops-0.3.0.tar.gz 3.0 kB Without provenance Details for domainprops-0.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for domainprops 0.3.0
File Interpreter ABI Platform Actions
domainprops-0.3.0-py3-none-any.whl Python 3 none any Details for domainprops-0.3.0-py3-none-any.whl

Total release size: 6.0 kB

Release files / domainprops-0.3.0.tar.gz

Download URL domainprops-0.3.0.tar.gz
Size 3.0 kB
Tags Source
SHA-256 checksum
How to use checksums
c7cdd789491e870d9e7354729410f4e6478c283e5554fbcc2edb1e1da39688f1
BLAKE2b-256 checksum
How to use checksums
299b8e7957ba2427655c2cd61040e8d139b3d037189d0622aa7547231570ca7a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.0.5 CPython/3.8.0 Linux/4.15.0-111-generic

Release files / domainprops-0.3.0-py3-none-any.whl

Download URL domainprops-0.3.0-py3-none-any.whl
Size 3.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9a1baaafcd090a7f7a0c2a7dc3ed9b49fa6b10990321babfe0a5bc96424efbb3
BLAKE2b-256 checksum
How to use checksums
bb10a94b1cae81bb9222af338a9820f1a9f465b1819b14ddf0ddbadaaef2d5c8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.0.5 CPython/3.8.0 Linux/4.15.0-111-generic

Security for domainprops 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page