package_name_to_import_with.data_using_module module#

Define package contents.

pydantic model PackageMetadata[source]#

Bases: CustomPydanticBaseModel

Define keys and types of corresponding values for package metadata.

Name#

name of the package

Type:

str

Version#

version of the package

Type:

str

Description#

description of the package

Type:

str

Keywords#

keywords associated with the package

Type:

list[str]

License#

license of the package

Type:

str

Maintainers#

maintainers of the package

Type:

list[str]

Authors#

authors of the package

Type:

list[str]

links associated with the package

Type:

dict[str, pydantic.HttpUrl]

Show JSON schema
{
   "title": "PackageMetadata",
   "description": "Define keys and types of corresponding values for package metadata.\n\nAttributes\n----------\nName : str\n    name of the package\nVersion : str\n    version of the package\nDescription : str\n    description of the package\nKeywords : list[str]\n    keywords associated with the package\nLicense : str\n    license of the package\nMaintainers : list[str]\n    maintainers of the package\nAuthors : list[str]\n    authors of the package\nLinks : dict[str, pydantic.HttpUrl]\n    links associated with the package",
   "type": "object",
   "properties": {
      "Name": {
         "description": "name of the package",
         "title": "Name",
         "type": "string"
      },
      "Version": {
         "description": "version of the package",
         "title": "Version",
         "type": "string"
      },
      "Description": {
         "description": "description of the package",
         "title": "Description",
         "type": "string"
      },
      "Keywords": {
         "description": "keywords associated with the package",
         "items": {
            "type": "string"
         },
         "title": "Keywords",
         "type": "array"
      },
      "License": {
         "description": "license of the package",
         "title": "License",
         "type": "string"
      },
      "Maintainers": {
         "description": "maintainers of the package",
         "items": {
            "type": "string"
         },
         "title": "Maintainers",
         "type": "array"
      },
      "Authors": {
         "description": "authors of the package",
         "items": {
            "type": "string"
         },
         "title": "Authors",
         "type": "array"
      },
      "Links": {
         "additionalProperties": {
            "format": "uri",
            "maxLength": 2083,
            "minLength": 1,
            "type": "string"
         },
         "description": "links associated with the package",
         "title": "Links",
         "type": "object"
      }
   },
   "additionalProperties": false,
   "required": [
      "Name",
      "Version",
      "Description",
      "Keywords",
      "License",
      "Maintainers",
      "Authors",
      "Links"
   ]
}

Config:
  • extra: str = forbid

Fields:
Validators:
field Name: str [Required]#

name of the package

field Version: str [Required]#

version of the package

Validated by:
field Description: str [Required]#

description of the package

field Keywords: list[str] [Required]#

keywords associated with the package

field License: str [Required]#

license of the package

field Maintainers: list[str] [Required]#

maintainers of the package

field Authors: list[str] [Required]#

authors of the package

field Links: dict[str, Url] [Required]#

links associated with the package

validator validate_version  »  Version[source]#

Validate if specified version adhere to semantic versioning.

Parameters:

version (str) -- specified value for version

Returns:

unchanged version if validation passes

Return type:

str

Raises:

ValueError -- if version is not a valid semantic version

Notes

  1. Only checks for MAJOR.MINOR.PATCH format.

References

Semantic Versioning 2.0.0.

Validates:
model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.