package_name_to_import_with.data_using_module module#
Define package contents.
- pydantic model PackageMetadata[source]#
Bases:
CustomPydanticBaseModelDefine keys and types of corresponding values for package metadata.
- Keywords#
keywords associated with the package
- Type:
list[str]
- Maintainers#
maintainers of the package
- Type:
list[str]
- Authors#
authors of the package
- Type:
list[str]
- Links#
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:
- 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:
- Raises:
ValueError -- if version is not a valid semantic version
Notes
Only checks for MAJOR.MINOR.PATCH format.
References
- Validates: