All Projects → ypcrts → fqdn

ypcrts / fqdn

Licence: MPL-2.0 License
RFC-compliant FQDN validation and manipulation for Python.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to fqdn

hapic
Input/Output/Error management for your python controllers with Swagger doc generation
Stars: ✭ 18 (-21.74%)
Mutual labels:  validation
unity-asset-validator
The Asset Validator is an editor tool for validating assets in the project and in scenes.
Stars: ✭ 30 (+30.43%)
Mutual labels:  validation
dockerfile-utils
A library and command line interface for formatting and linting Dockerfiles.
Stars: ✭ 17 (-26.09%)
Mutual labels:  validation
ocaml-uri
RFC3986 URI parsing library for OCaml
Stars: ✭ 85 (+269.57%)
Mutual labels:  rfc-3986
datalize
Parameter, query, form data validation and filtering for NodeJS.
Stars: ✭ 55 (+139.13%)
Mutual labels:  validation
validatedb
Validate on a table in a DB, using dbplyr
Stars: ✭ 15 (-34.78%)
Mutual labels:  validation
cue
The new home of the CUE language! Validate and define text-based and dynamic configuration
Stars: ✭ 2,466 (+10621.74%)
Mutual labels:  validation
vue-tiny-validate
💯 Tiny Vue Validate Composition
Stars: ✭ 80 (+247.83%)
Mutual labels:  validation
frames-android
Checkout API Client, Payment Form UI and Utilities
Stars: ✭ 26 (+13.04%)
Mutual labels:  validation
openapi-lint-vscode
OpenAPI 2.0/3.0.x intellisense, validator, linter, converter and resolver extension for Visual Studio Code
Stars: ✭ 47 (+104.35%)
Mutual labels:  validation
pyvaru
Rule based data validation library for python 3.
Stars: ✭ 17 (-26.09%)
Mutual labels:  validation
filter
Go语言的数据过滤包,由 数据输入、格式化、校验、输出 几个部份组成。
Stars: ✭ 22 (-4.35%)
Mutual labels:  validation
ember-changeset-conditional-validations
Conditional validations for ember-changeset-validations
Stars: ✭ 26 (+13.04%)
Mutual labels:  validation
intl-tel-input-rails
intl-tel-input for the Rails asset pipeline
Stars: ✭ 35 (+52.17%)
Mutual labels:  validation
Fore
Fore - declarative programming with web components
Stars: ✭ 34 (+47.83%)
Mutual labels:  validation
odin
Data-structure definition/validation/traversal, mapping and serialisation toolkit for Python
Stars: ✭ 24 (+4.35%)
Mutual labels:  validation
rdf-validate-shacl
Validate RDF data purely in JavaScript. An implementation of the W3C SHACL specification on top of the RDFJS stack.
Stars: ✭ 61 (+165.22%)
Mutual labels:  validation
ng2-multi-step-wizard-ui-router1
Series 3: Tutorials on creating an Angular 2 Multi-Step Wizard using UI-Router 1.0 and TypeScript 2.0.10
Stars: ✭ 33 (+43.48%)
Mutual labels:  validation
cnpj
🇧🇷 Format, validate and generate CNPJ numbers in Node & Deno
Stars: ✭ 26 (+13.04%)
Mutual labels:  validation
formalizer
React hooks based form validation made for humans.
Stars: ✭ 12 (-47.83%)
Mutual labels:  validation

Python FQDN Fully-Qualified Domain Names

License Status Build Status Coverage Status Latest PyPI Version Downloads Monthly Downloads Python Versions

This package validates Fully Qualified Domain Names (FQDNs) conforming to the Internet Engineering Task Force specification [1]. The design intent is to validate that a string would be traditionally acceptable as a public Internet hostname to RFC-conforming software, which is a strict subset of the logic in modern web browsers like Mozilla Firefox and Chromium that determines whether make a DNS lookup [2]. Configuration options can relax constraints so that short hostnames without periods or others with underscores will be valid. These relaxations are closer to how modern web browsers work [3] .

>>> from fqdn import FQDN
>>> domain = 'bbc.co.uk'
>>> bbc_fqdn = FQDN(domain)
>>> bbc_fqdn.is_valid
True
>>> bbc_fqdn.absolute
'bbc.co.uk.'
>>> bbc_fqdn.relative
'bbc.co.uk'

Equality checks are implemented case insensitive conforming to to the IETF specification [#equality].

>>> FQDN('BBC.CO.UK.') == FQDN('BbC.Co.uK')
True
>>> hash(FQDN('BBC.CO.UK.')) == hash(FQDN('BbC.Co.uK'))
True
[1]See IETF Specification.
[2]Certificate Authorities like Let's Encrypt run a narrower set of string validation logic to determine validity for issuance. This package is not intended to achieve functional parity with CA issuance, because they may have proprietary or custom login. Boulder's code is starkly different from Chromium's, as outlined in Issue #14.
[3]See Issue #14.

Standards Conformance

In the default configuration, this package adds only one additional constraint to the IETF specification, requiring a minimum of two labels, separated by periods. This extra restriction can be disabled. It is enabled by default to prevent breaking backwards compatibility. Review the tests for examples of the impact of this.

IETF Specification

The IETF specification restricts domain names to alphanumeric ASCII characters and hyphens as described below.

RFC 1123: Requirements for Internet Hosts - Application and Support, October 1989

This RFC is an official specification for the Internet community. It incorporates by reference, amends, corrects, and supplements the primary protocol standards documents relating to hosts.

2.1 Host Names and Numbers

The syntax of a legal Internet host name was specified in RFC-952 [DNS:4]. One aspect of host name syntax is hereby changed: the restriction on the first character is relaxed to allow either a letter or a digit. Host software MUST support this more liberal syntax.

Host software MUST handle host names of up to 63 characters and SHOULD handle host names of up to 255 characters.

Whenever a user inputs the identity of an Internet host, it SHOULD be possible to enter either (1) a host domain name or (2) an IP address in dotted-decimal ("#.#.#.#") form. The host SHOULD check the string syntactically for a dotted-decimal number before looking it up in the Domain Name System.

RFC 952: DoD Internet host table specification, October 1985

This RFC is the official specification of the format of the Internet Host Table.
<hname> ::= <name>*["."<name>]
<name>  ::= <let>[*[<let-or-digit-or-hyphen>]<let-or-digit>]

Commentary

RFC-1034: Domain Name Concepts and Facilities, November 1987

  • Section 3.5 specifies a "preferred name syntax", which is non-compulsory.

    3.5. Preferred name syntax

    The DNS specifications attempt to be as general as possible in the rules for constructing domain names. The idea is that the name of any existing object can be expressed as a domain name with minimal changes. However, when assigning a domain name for an object, the prudent user will select a name which satisfies both the rules of the domain system and any existing rules for the object, whether these rules are published or implied by existing programs.

    For example, when naming a mail domain, the user should satisfy both the rules of this memo and those in RFC-822. When creating a new host name, the old rules for HOSTS.TXT should be followed. This avoids problems when old software is converted to use domain names.

RFC-1035: Domain Names - Implementation and Specification, November 1987

  • Section 2.3.1 repeats the "preferred name syntax" proposal from RFC-1034.

RFC-2181: Clarification to the DNS Specification, July 1997

  • Section 11 comments that RFC-1035 does not restrict domain names to the preferred name syntax set out in it. Instead Internet hostnames are restricted more or less by a combination of tradition and RFC-2181, where this package finds itself.

RFC-3696: Application Techniques for Checking and Transformation of Names, February 2004

  • This memo provides fascinating commentary of the history of string validation for domain names.

Licenses

License Status Shield

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].