validate_pyproject.formats¶
The functions in this module are used to validate schemas with the format JSON Schema keyword.
The correspondence is given by replacing the _ character in the name of the
function with a - to obtain the format name and vice versa.
- validate_pyproject.formats.SPDX(value: str) bool[source]¶
See PyPA’s License-Expression specification (added in PEP 639).
- validate_pyproject.formats.import_name(value: str) bool[source]¶
This is a valid import name. It has to be series of python identifiers (not keywords), separated by dots, optionally followed by a semicolon and the keyword “private”.
- validate_pyproject.formats.int(value: builtins.int) bool[source]¶
Signed 64-bit integer (\(-2^{63} \leq x < 2^{63}\))
- validate_pyproject.formats.int16(value: builtins.int) bool[source]¶
Signed 16-bit integer (\(-2^{15} \leq x < 2^{15}\))
- validate_pyproject.formats.int32(value: builtins.int) bool[source]¶
Signed 32-bit integer (\(-2^{31} \leq x < 2^{31}\))
- validate_pyproject.formats.int64(value: builtins.int) bool[source]¶
Signed 64-bit integer (\(-2^{63} \leq x < 2^{63}\))
- validate_pyproject.formats.int8(value: builtins.int) bool[source]¶
Signed 8-bit integer (\(-2^{7} \leq x < 2^{7}\))
- validate_pyproject.formats.pep440(version: str) bool[source]¶
See PyPA’s version specification (initially introduced in PEP 440).
- validate_pyproject.formats.pep508(value: str) bool[source]¶
See PyPA’s dependency specifiers (initially introduced in PEP 508).
- validate_pyproject.formats.pep508_identifier(name: str) bool[source]¶
See PyPA’s name specification (initially introduced in PEP 508#names).
- validate_pyproject.formats.pep508_versionspec(value: str) bool[source]¶
Expression that can be used to specify/lock versions (including ranges) See
versionspecin PyPA’s dependency specifiers (initially introduced in PEP 508).
- validate_pyproject.formats.pep517_backend_reference(value: str) bool[source]¶
See PyPA’s specification for defining build-backend references introduced in PEP 517#source-trees.
This is similar to an entry-point reference (e.g.,
package.module:object).
- validate_pyproject.formats.pep561_stub_name(value: str) bool[source]¶
Name of a directory containing type stubs. It must follow the name scheme
<package>-stubsas defined in PEP 561#stub-only-packages.
- validate_pyproject.formats.python_entrypoint_group(value: str) bool[source]¶
See
Data model > groupin the PyPA’s entry-points specification.
- validate_pyproject.formats.python_entrypoint_name(value: str) bool[source]¶
See
Data model > namein the PyPA’s entry-points specification.
- validate_pyproject.formats.python_entrypoint_reference(value: str) bool[source]¶
Reference to a Python object using in the format:
importable.module:object.attr
See
Data model >object referencein the PyPA’s entry-points specification.
- validate_pyproject.formats.python_identifier(value: str) bool[source]¶
Can be used as identifier in Python. (Validation uses
str.isidentifier).
- validate_pyproject.formats.python_module_name(value: str) bool[source]¶
Module name that can be used in an
import-statement in Python. Seepython_qualified_identifier.
- validate_pyproject.formats.python_module_name_relaxed(value: str) bool[source]¶
Similar to
python_module_name, but relaxed to also accept dash characters (-) and cover special cases likepip-run.It is recommended, however, that beginners avoid dash characters, as they require advanced knowledge about Python internals.
The following are disallowed:
names starting/ending in dashes,
names ending in
-stubs(potentially collide withpep561_stub_name).
- validate_pyproject.formats.python_qualified_identifier(value: str) bool[source]¶
Python “dotted identifier”, i.e. a sequence of
python_identifierconcatenated with"."(e.g.:package.module.submodule).
- validate_pyproject.formats.uint(value: builtins.int) bool[source]¶
Signed 64-bit integer (\(0 \leq x < 2^{64}\))
- validate_pyproject.formats.uint16(value: builtins.int) bool[source]¶
Unsigned 16-bit integer (\(0 \leq x < 2^{16}\))
- validate_pyproject.formats.uint32(value: builtins.int) bool[source]¶
Unsigned 32-bit integer (\(0 \leq x < 2^{32}\))
- validate_pyproject.formats.uint64(value: builtins.int) bool[source]¶
Unsigned 64-bit integer (\(0 \leq x < 2^{64}\))
- validate_pyproject.formats.uint8(value: builtins.int) bool[source]¶
Unsigned 8-bit integer (\(0 \leq x < 2^8\))
- validate_pyproject.formats.url(value: str) bool[source]¶
Valid URL (validation uses
urllib.parse). For maximum compatibility please make sure to include aschemeprefix in your URL (e.g.http://).