dependence.freeze
_iter_sort_dependents_last
_iter_sort_dependents_last(
requirements: collections.abc.Iterable[str],
) -> collections.abc.Iterable[str]
Sort requirements such that dependents are first and dependencies are last.
Source code in src/dependence/freeze.py
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 |
|
get_frozen_requirements
get_frozen_requirements(
requirements: collections.abc.Iterable[str] = (),
*,
exclude: collections.abc.Iterable[str] = (),
exclude_recursive: collections.abc.Iterable[str] = (),
no_version: collections.abc.Iterable[str] = (),
dependency_order: bool = False,
reverse: bool = False,
depth: int | None = None,
include_pointers: tuple[str, ...] = (),
exclude_pointers: tuple[str, ...] = ()
) -> tuple[str, ...]
Get the (frozen) requirements for one or more specified distributions or configuration files.
Parameters:
-
requirements
(collections.abc.Iterable[str]
, default:()
) –One or more requirement specifiers (for example: "requirement-name[extra-a,extra-b]" or ".[extra-a, extra-b]) and/or paths to a setup.cfg, pyproject.toml, tox.ini or requirements.txt file
-
exclude
(collections.abc.Iterable[str]
, default:()
) –One or more distributions to exclude/ignore
-
exclude_recursive
(collections.abc.Iterable[str]
, default:()
) –One or more distributions to exclude/ignore. Note: Excluding a distribution here excludes all requirements which would be identified through recursion.
-
no_version
(collections.abc.Iterable[str]
, default:()
) –Exclude version numbers from the output (only return distribution names)
-
dependency_order
(bool
, default:False
) –Sort requirements so that dependents precede dependencies
-
depth
(int | None
, default:None
) –Depth of recursive requirement discovery
-
include_pointers
(tuple[str, ...]
, default:()
) –A tuple of JSON pointers indicating elements to include (defaults to all elements). Only applies to TOML files.
-
exclude_pointers
(tuple[str, ...]
, default:()
) –A tuple of JSON pointers indicating elements to exclude (defaults to no exclusions). Only applies to TOML files.
Source code in src/dependence/freeze.py
77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 |
|
freeze
freeze(
requirements: collections.abc.Iterable[str] = (),
*,
exclude: collections.abc.Iterable[str] = (),
exclude_recursive: collections.abc.Iterable[str] = (),
no_version: collections.abc.Iterable[str] = (),
dependency_order: bool = False,
reverse: bool = False,
depth: int | None = None,
include_pointers: tuple[str, ...] = (),
exclude_pointers: tuple[str, ...] = ()
) -> None
Print the (frozen) requirements for one or more specified requirements or configuration files.
Parameters:
-
requirements
(collections.abc.Iterable[str]
, default:()
) –One or more requirement specifiers (for example: "requirement-name[extra-a,extra-b]" or ".[extra-a, extra-b]) and/or paths to a setup.py, setup.cfg, pyproject.toml, tox.ini or requirements.txt file
-
exclude
(collections.abc.Iterable[str]
, default:()
) –One or more distributions to exclude/ignore
-
exclude_recursive
(collections.abc.Iterable[str]
, default:()
) –One or more distributions to exclude/ignore. Note: Excluding a distribution here halts recursive discovery of requirements.
-
no_version
(collections.abc.Iterable[str]
, default:()
) –Exclude version numbers from the output (only print distribution names) for package names matching any of these patterns
-
dependency_order
(bool
, default:False
) –Sort requirements so that dependents precede dependencies
-
depth
(int | None
, default:None
) –Depth of recursive requirement discovery
-
include_pointers
(tuple[str, ...]
, default:()
) –If this not empty, only these TOML tables will inspected (for pyproject.toml files)
-
exclude_pointers
(tuple[str, ...]
, default:()
) –If not empty, these TOML tables will not be inspected (for pyproject.toml files)
Source code in src/dependence/freeze.py
244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 |
|