repology_client.types#
Type definitions for Repology API.
- class repology_client.types.ResolvePackageType(*values)#
Bases:
StrEnumPackage type enum for the “Project by package name” tool.
See also
repology_client.tools.resolve_package()functionImplements
/tools/project-byendpoint.
- SOURCE = 'srcname'#
- BINARY = 'binname'#
- class repology_client.types.ProjectsRange(**data: Any)#
Bases:
BaseModelObject for constructing a string representation of range.
>>> str(ProjectsRange()) '' >>> str(ProjectsRange(start="firefox")) 'firefox' >>> str(ProjectsRange(end="firefox")) '..firefox' >>> str(ProjectsRange(start="firefox", end="firefoxpwa")) 'firefox..firefoxpwa'
- model_config = {'defer_build': True, 'extra': 'forbid', 'validate_assignment': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class repology_client.types.Package(**data: Any)#
Bases:
BaseModelPackage description type.
See also
repology_client.get_packages()functionImplements
/api/v1/project/<project>endpoint.repology_client.get_projects()functionImplements
/api/v1/projects/endpoint.
- model_config = {'defer_build': True, 'frozen': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class repology_client.types.Problem(**data: Any)#
Bases:
BaseModelType for repository problem entries.
See also
repology_client.get_problems()functionImplements
/api/v1/repository/<repo>/problemsand/api/v1/maintainer/<maint>/problems-for-repo/<repo>endpoints.
- model_config = {'defer_build': True, 'frozen': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class repology_client.types.LinkStatus(code: int, message: str | None = None)#
Bases:
intStatus code object for repository problems API.
>>> a = LinkStatus(-1, "custom error") >>> b = LinkStatus(404) >>> str(a), a ('custom error', LinkStatus(code=-1, message='custom error')) >>> str(b), b ('HTTP 404', LinkStatus(code=404, message=None))