pythonfinder.pythonfinder module¶
- class pythonfinder.pythonfinder.Finder(**data)[source]¶
Bases:
FinderBaseModel
- find_all_python_versions(major=None, minor=None, patch=None, pre=None, dev=None, arch=None, name=None)[source]¶
- find_python_version(major=None, minor=None, patch=None, pre=None, dev=None, arch=None, name=None, sort_by_path=False)[source]¶
Find the python version which corresponds most closely to the version requested.
- Parameters
major (str | int | None) – The major version to look for, or the full version, or the name of the target version.
minor (int | None) – The minor version. If provided, disables string-based lookups from the major version field.
patch (int | None) – The patch version.
pre (bool | None) – If provided, specifies whether to search pre-releases.
dev (bool | None) – If provided, whether to search dev-releases.
arch (str | None) – If provided, which architecture to search.
name (str | None) – Name of the target python, e.g.
anaconda3-5.3.0
sort_by_path (bool) – Whether to sort by path – default sort is by version(default: False)
- Return type
PathEntry | None
- Returns
A new PathEntry pointer at a matching python version, if one can be located.
- global_search: bool¶
- ignore_unsupported: bool¶
- path_prepend: Optional[str]¶
- sort_by_path: bool¶
- system: bool¶
- system_path: Optional[SystemPath]¶