docker-composer 5.1.3__tar.gz → 5.2.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. {docker_composer-5.1.3 → docker_composer-5.2.0}/PKG-INFO +6 -12
  2. {docker_composer-5.1.3 → docker_composer-5.2.0}/README.md +5 -8
  3. {docker_composer-5.1.3 → docker_composer-5.2.0}/pyproject.toml +17 -10
  4. {docker_composer-5.1.3 → docker_composer-5.2.0}/src/docker_composer/_utils/argument.py +6 -4
  5. {docker_composer-5.1.3 → docker_composer-5.2.0}/src/docker_composer/_utils/generate_class.py +17 -14
  6. docker_composer-5.2.0/src/docker_composer/_utils/sync_version.py +21 -0
  7. {docker_composer-5.1.3 → docker_composer-5.2.0}/src/docker_composer/runner/cmd/attach.py +1 -1
  8. {docker_composer-5.1.3 → docker_composer-5.2.0}/src/docker_composer/runner/cmd/build.py +3 -2
  9. {docker_composer-5.1.3 → docker_composer-5.2.0}/src/docker_composer/runner/cmd/commit.py +1 -1
  10. {docker_composer-5.1.3 → docker_composer-5.2.0}/src/docker_composer/runner/cmd/config.py +1 -1
  11. {docker_composer-5.1.3 → docker_composer-5.2.0}/src/docker_composer/runner/cmd/cp.py +1 -1
  12. {docker_composer-5.1.3 → docker_composer-5.2.0}/src/docker_composer/runner/cmd/create.py +1 -1
  13. {docker_composer-5.1.3 → docker_composer-5.2.0}/src/docker_composer/runner/cmd/down.py +5 -3
  14. {docker_composer-5.1.3 → docker_composer-5.2.0}/src/docker_composer/runner/cmd/events.py +1 -1
  15. {docker_composer-5.1.3 → docker_composer-5.2.0}/src/docker_composer/runner/cmd/exec.py +2 -2
  16. {docker_composer-5.1.3 → docker_composer-5.2.0}/src/docker_composer/runner/cmd/export.py +1 -1
  17. {docker_composer-5.1.3 → docker_composer-5.2.0}/src/docker_composer/runner/cmd/images.py +1 -1
  18. {docker_composer-5.1.3 → docker_composer-5.2.0}/src/docker_composer/runner/cmd/kill.py +1 -1
  19. {docker_composer-5.1.3 → docker_composer-5.2.0}/src/docker_composer/runner/cmd/logs.py +1 -1
  20. {docker_composer-5.1.3 → docker_composer-5.2.0}/src/docker_composer/runner/cmd/ls.py +1 -1
  21. {docker_composer-5.1.3 → docker_composer-5.2.0}/src/docker_composer/runner/cmd/pause.py +1 -1
  22. {docker_composer-5.1.3 → docker_composer-5.2.0}/src/docker_composer/runner/cmd/port.py +1 -1
  23. {docker_composer-5.1.3 → docker_composer-5.2.0}/src/docker_composer/runner/cmd/ps.py +5 -3
  24. {docker_composer-5.1.3 → docker_composer-5.2.0}/src/docker_composer/runner/cmd/publish.py +1 -1
  25. {docker_composer-5.1.3 → docker_composer-5.2.0}/src/docker_composer/runner/cmd/pull.py +1 -1
  26. {docker_composer-5.1.3 → docker_composer-5.2.0}/src/docker_composer/runner/cmd/push.py +1 -1
  27. {docker_composer-5.1.3 → docker_composer-5.2.0}/src/docker_composer/runner/cmd/restart.py +1 -1
  28. {docker_composer-5.1.3 → docker_composer-5.2.0}/src/docker_composer/runner/cmd/rm.py +1 -1
  29. {docker_composer-5.1.3 → docker_composer-5.2.0}/src/docker_composer/runner/cmd/run.py +2 -2
  30. {docker_composer-5.1.3 → docker_composer-5.2.0}/src/docker_composer/runner/cmd/scale.py +1 -1
  31. {docker_composer-5.1.3 → docker_composer-5.2.0}/src/docker_composer/runner/cmd/start.py +1 -1
  32. {docker_composer-5.1.3 → docker_composer-5.2.0}/src/docker_composer/runner/cmd/stats.py +3 -2
  33. {docker_composer-5.1.3 → docker_composer-5.2.0}/src/docker_composer/runner/cmd/stop.py +1 -1
  34. {docker_composer-5.1.3 → docker_composer-5.2.0}/src/docker_composer/runner/cmd/top.py +1 -1
  35. {docker_composer-5.1.3 → docker_composer-5.2.0}/src/docker_composer/runner/cmd/unpause.py +1 -1
  36. {docker_composer-5.1.3 → docker_composer-5.2.0}/src/docker_composer/runner/cmd/up.py +15 -8
  37. {docker_composer-5.1.3 → docker_composer-5.2.0}/src/docker_composer/runner/cmd/version.py +1 -1
  38. {docker_composer-5.1.3 → docker_composer-5.2.0}/src/docker_composer/runner/cmd/volumes.py +3 -2
  39. {docker_composer-5.1.3 → docker_composer-5.2.0}/src/docker_composer/runner/cmd/wait.py +1 -1
  40. {docker_composer-5.1.3 → docker_composer-5.2.0}/src/docker_composer/runner/cmd/watch.py +1 -1
  41. {docker_composer-5.1.3 → docker_composer-5.2.0}/src/docker_composer/runner/root.py +33 -18
  42. {docker_composer-5.1.3 → docker_composer-5.2.0}/.gitignore +0 -0
  43. {docker_composer-5.1.3 → docker_composer-5.2.0}/LICENSE.txt +0 -0
  44. {docker_composer-5.1.3 → docker_composer-5.2.0}/src/docker_composer/__init__.py +0 -0
  45. {docker_composer-5.1.3 → docker_composer-5.2.0}/src/docker_composer/_utils/__init__.py +0 -0
  46. {docker_composer-5.1.3 → docker_composer-5.2.0}/src/docker_composer/base.py +0 -0
  47. {docker_composer-5.1.3 → docker_composer-5.2.0}/src/docker_composer/py.typed +0 -0
  48. {docker_composer-5.1.3 → docker_composer-5.2.0}/src/docker_composer/runner/__init__.py +0 -0
  49. {docker_composer-5.1.3 → docker_composer-5.2.0}/src/docker_composer/runner/cmd/__init__.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: docker-composer
3
- Version: 5.1.3
3
+ Version: 5.2.0
4
4
  Summary: Use docker-compose (V2) from within Python
5
5
  Project-URL: Homepage, https://github.com/schollm/docker-composer
6
6
  Project-URL: Repository, https://github.com/schollm/docker-composer
@@ -16,9 +16,6 @@ Classifier: Programming Language :: Python :: 3
16
16
  Classifier: Topic :: Software Development :: Build Tools
17
17
  Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
18
18
  Requires-Python: <4.0,>=3.9
19
- Provides-Extra: generate
20
- Requires-Dist: black>=25.1.0; extra == 'generate'
21
- Requires-Dist: isort>=6.0.1; extra == 'generate'
22
19
  Description-Content-Type: text/markdown
23
20
 
24
21
  # Docker Composer
@@ -71,16 +68,13 @@ print(process.stdout.encode("UTF-8"))
71
68
 
72
69
  ### Development Setup
73
70
 
74
- The `generate` extra is maintainer tooling for code generation/formatting and is not required for normal package usage.
71
+ When developing, the `_utils` module is available for generating the docker_composer
72
+ module from the `docker compose`CLI help output.
73
+ This is not required for normal package usage.
75
74
 
76
75
  ```bash
77
- uv sync --group dev --extra generate
78
- ```
79
-
80
- If you only need the generation tooling, you can install just the extra:
81
-
82
- ```bash
83
- uv sync --extra generate
76
+ uv sync --group dev
77
+ uv run poe generate
84
78
  ```
85
79
 
86
80
  ### Coding Standards
@@ -48,16 +48,13 @@ print(process.stdout.encode("UTF-8"))
48
48
 
49
49
  ### Development Setup
50
50
 
51
- The `generate` extra is maintainer tooling for code generation/formatting and is not required for normal package usage.
51
+ When developing, the `_utils` module is available for generating the docker_composer
52
+ module from the `docker compose`CLI help output.
53
+ This is not required for normal package usage.
52
54
 
53
55
  ```bash
54
- uv sync --group dev --extra generate
55
- ```
56
-
57
- If you only need the generation tooling, you can install just the extra:
58
-
59
- ```bash
60
- uv sync --extra generate
56
+ uv sync --group dev
57
+ uv run poe generate
61
58
  ```
62
59
 
63
60
  ### Coding Standards
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "docker-composer"
3
- version = "5.1.3"
3
+ version = "5.2.0"
4
4
  description = "Use docker-compose (V2) from within Python"
5
5
  authors = [{ name = "Micha", email = "schollm-git@gmx.com" }]
6
6
  requires-python = ">=3.9,<4.0"
@@ -18,20 +18,15 @@ classifiers = [
18
18
  ]
19
19
  dependencies = []
20
20
 
21
- [project.optional-dependencies]
22
- generate = [
23
- "black>=25.1.0",
24
- "isort>=6.0.1",
25
- ]
26
-
27
21
  [project.urls]
28
22
  Homepage = "https://github.com/schollm/docker-composer"
29
23
  Repository = "https://github.com/schollm/docker-composer"
30
24
 
31
25
  [dependency-groups]
32
26
  dev = [
33
- "black",
34
- "isort",
27
+ "black>=25.1.0",
28
+ "isort>=6.0.1",
29
+ "poethepoet>=0.30.0",
35
30
  "pytest>=6.1.2",
36
31
  "pytest-cov>=6.1.1",
37
32
  "ruff>=0.11.10",
@@ -57,8 +52,20 @@ addopts = """
57
52
  --cov=src/docker_composer
58
53
  --cov-report=xml:.out/coverage.xml
59
54
  --cov-report=html:.out/coverage-html
60
- --cov-report term-missing
55
+ --cov-report term-missing:skip-covered
61
56
  --cov-branch
62
57
  --doctest-modules
63
58
  """
64
59
 
60
+ [tool.poe.tasks]
61
+ ruff-check = { cmd = "uv run ruff check" }
62
+ ruff-format-check = { cmd = "uv run ruff format --check" }
63
+ pytest = { cmd = "uv run pytest" }
64
+ format = { cmd = "uv run ruff format" }
65
+ build = { cmd = "uv build" }
66
+ publish-dist = { cmd = "uv publish" }
67
+ generate-code = { cmd = "uv run python -m docker_composer._utils.generate_class" }
68
+ sync-version = { cmd = "uv run python -m docker_composer._utils.sync_version" }
69
+ publish = { sequence = ["build", "publish-dist"] }
70
+ test = { sequence = ["ruff-check", "ruff-format-check", "pytest $POE_EXTRA_ARGS"] }
71
+ generate = { sequence = ["generate-code", "sync-version"] }
@@ -1,3 +1,6 @@
1
+ """Helper modules to parse docker compoose --help arguments"""
2
+
3
+ from __future__ import annotations
1
4
  from typing import Iterable, Iterator
2
5
 
3
6
  import logging
@@ -137,16 +140,15 @@ def _from_line_has_sep(line) -> "Argument":
137
140
  min_arg_chars = 2 # Simple argument with single dash (e.g. -x)
138
141
  min_full_chars = 4 # Named argument with double-dash (e.g. --xy)
139
142
  desc_idx = line[min_arg_chars:].index(" ")
143
+ # Help output can wrap differently depending on terminal width.
144
+ # Normalize all whitespace so wrapped descriptions are stable.
140
145
  desc = line[desc_idx + min_full_chars :].strip()
141
146
  args = iter(line[: desc_idx + min_full_chars].split())
142
147
  arg, default, has_more = "", "", True
143
148
  while has_more:
144
149
  arg, default, has_more = _parse_arg(next(args))
145
150
  type_from_default = _get_type_name_from_default(default)
146
- try:
147
- type_desc = next(args)
148
- except StopIteration:
149
- type_desc = type_from_default
151
+ type_desc = next(args, type_from_default)
150
152
 
151
153
  type_ = _get_type(type_from_default if default else type_desc)
152
154
  return Argument(arg, type_desc, type_, desc, default=default)
@@ -15,6 +15,9 @@ import logging
15
15
 
16
16
  logger = logging.getLogger(__name__)
17
17
 
18
+ # must be larger than 50 (otherwise it's ignored by docker compose)
19
+ _DEFAULT_HELP_COLUMNS = 120
20
+
18
21
 
19
22
  @lru_cache()
20
23
  def project_root():
@@ -35,18 +38,20 @@ def _version() -> str:
35
38
  @lru_cache()
36
39
  def get_help_message(subcommand: str = "") -> str:
37
40
  """Obtain the help message for subcommand from docker-compose."""
38
- args = [arg for arg in ["docker", "compose", subcommand, "--help"] if arg]
41
+ cmd = " ".join(arg for arg in ["docker", "compose", subcommand, "--help"] if arg)
42
+ full_cmd = f"stty cols {_DEFAULT_HELP_COLUMNS}; {cmd}"
39
43
  try:
40
- process = subprocess.run(args, capture_output=True, text=True)
44
+ process = subprocess.run(
45
+ ["script", "-q", "-c", full_cmd, "/dev/null"],
46
+ capture_output=True,
47
+ text=True,
48
+ )
41
49
  except Exception:
42
- logger.error("FAILED to run %s.", args)
50
+ logger.error("FAILED to run %s.", full_cmd)
43
51
  raise
44
52
  if process.returncode:
45
- logger.error(
46
- "docker-compose %s --help exited with %s:", subcommand, process.returncode
47
- )
53
+ logger.error("%s exited with %s:", cmd, process.returncode)
48
54
  raise RuntimeError(process.stderr)
49
-
50
55
  return process.stdout
51
56
 
52
57
 
@@ -147,10 +152,10 @@ def {cmd}(self, {args}) -> {class_name}:
147
152
  )
148
153
 
149
154
 
150
- def generate_class(cmd: str, level: int = 0) -> str:
155
+ def generate_class(cmd: str) -> str:
151
156
  class_name = f"DockerCompose{(cmd or 'Root').capitalize()}"
152
157
  docker_lines = get_help_message(cmd)
153
- nl = level + 4
158
+ nl = 4
154
159
  sections, arguments = parse_help(docker_lines)
155
160
  _add_custom_arguments(cmd, arguments)
156
161
  cmd_fns = ""
@@ -167,8 +172,8 @@ def generate_class(cmd: str, level: int = 0) -> str:
167
172
  if options:
168
173
  options = options + ","
169
174
  new_line = "\n" # Python 3.9 does not support backslashes in format-strings.
170
- res = indent(
171
- f'''
175
+
176
+ res = f'''
172
177
  # DO NOT EDIT: Autogenerated by {"/".join(Path(__file__).parts[-3:])}
173
178
  # for {_version()}
174
179
 
@@ -187,9 +192,7 @@ class {class_name}(DockerBaseRunner):
187
192
  _cmd: str = _dc.field(default="{cmd or ""}", repr=False, init=False)
188
193
  _options: list[str] = _dc.field(default_factory=lambda: [{options}], repr=False, init=False)
189
194
  {indent(cmd_fns, level=nl)}
190
- ''',
191
- level=level,
192
- )
195
+ '''
193
196
  try:
194
197
  res = isort.code(
195
198
  res, config=isort.Config(settings_path=project_root().as_posix())
@@ -0,0 +1,21 @@
1
+ from __future__ import annotations
2
+
3
+ import subprocess
4
+
5
+
6
+ def docker_compose_version_short() -> str:
7
+ return subprocess.check_output(
8
+ ["docker", "compose", "version", "--short"],
9
+ text=True,
10
+ ).strip()
11
+
12
+
13
+ def main() -> None:
14
+ version = docker_compose_version_short()
15
+ if not version:
16
+ raise RuntimeError("docker compose version --short returned an empty version")
17
+ subprocess.check_call(["uv", "version", version])
18
+
19
+
20
+ if __name__ == "__main__":
21
+ main() # pragma: no cover
@@ -1,5 +1,5 @@
1
1
  # DO NOT EDIT: Autogenerated by docker_composer/_utils/generate_class.py
2
- # for Docker Compose version v5.1.3
2
+ # for Docker Compose version v5.2.0
3
3
 
4
4
  import dataclasses as _dc
5
5
  from typing import Optional
@@ -1,5 +1,5 @@
1
1
  # DO NOT EDIT: Autogenerated by docker_composer/_utils/generate_class.py
2
- # for Docker Compose version v5.1.3
2
+ # for Docker Compose version v5.2.0
3
3
 
4
4
  import dataclasses as _dc
5
5
  from typing import Optional
@@ -39,7 +39,8 @@ class DockerComposeBuild(DockerBaseRunner):
39
39
  sbom: Optional[str] = None
40
40
  """Add a SBOM attestation"""
41
41
  ssh: Optional[str] = None
42
- """Set SSH authentications used when building service images. (use 'default' for using your default SSH Agent)"""
42
+ """Set SSH authentications used when building service images. (use 'default' for
43
+ using your default SSH Agent)"""
43
44
  with_dependencies: Optional[bool] = None
44
45
  """Also build dependencies (transitively)"""
45
46
  _cmd: str = _dc.field(default="build", repr=False, init=False)
@@ -1,5 +1,5 @@
1
1
  # DO NOT EDIT: Autogenerated by docker_composer/_utils/generate_class.py
2
- # for Docker Compose version v5.1.3
2
+ # for Docker Compose version v5.2.0
3
3
 
4
4
  import dataclasses as _dc
5
5
  from typing import Optional
@@ -1,5 +1,5 @@
1
1
  # DO NOT EDIT: Autogenerated by docker_composer/_utils/generate_class.py
2
- # for Docker Compose version v5.1.3
2
+ # for Docker Compose version v5.2.0
3
3
 
4
4
  import dataclasses as _dc
5
5
  from typing import Optional
@@ -1,5 +1,5 @@
1
1
  # DO NOT EDIT: Autogenerated by docker_composer/_utils/generate_class.py
2
- # for Docker Compose version v5.1.3
2
+ # for Docker Compose version v5.2.0
3
3
 
4
4
  import dataclasses as _dc
5
5
  from typing import Optional
@@ -1,5 +1,5 @@
1
1
  # DO NOT EDIT: Autogenerated by docker_composer/_utils/generate_class.py
2
- # for Docker Compose version v5.1.3
2
+ # for Docker Compose version v5.2.0
3
3
 
4
4
  import dataclasses as _dc
5
5
  from typing import Optional
@@ -1,5 +1,5 @@
1
1
  # DO NOT EDIT: Autogenerated by docker_composer/_utils/generate_class.py
2
- # for Docker Compose version v5.1.3
2
+ # for Docker Compose version v5.2.0
3
3
 
4
4
  import dataclasses as _dc
5
5
  from typing import Optional
@@ -19,11 +19,13 @@ class DockerComposeDown(DockerBaseRunner):
19
19
  remove_orphans: Optional[bool] = None
20
20
  """Remove containers for services not defined in the Compose file"""
21
21
  rmi: Optional[str] = None
22
- """Remove images used by services. "local" remove only images that don't have a custom tag ("local"|"all")"""
22
+ """Remove images used by services. "local" remove only images that don't have a custom tag
23
+ ("local"|"all")"""
23
24
  timeout: Optional[int] = None
24
25
  """Specify a shutdown timeout in seconds"""
25
26
  volumes: Optional[bool] = None
26
- """Remove named volumes declared in the "volumes" section of the Compose file and anonymous volumes attached to containers"""
27
+ """Remove named volumes declared in the "volumes" section of the Compose file and anonymous
28
+ volumes attached to containers"""
27
29
  _cmd: str = _dc.field(default="down", repr=False, init=False)
28
30
  _options: list[str] = _dc.field(
29
31
  default_factory=lambda: [
@@ -1,5 +1,5 @@
1
1
  # DO NOT EDIT: Autogenerated by docker_composer/_utils/generate_class.py
2
- # for Docker Compose version v5.1.3
2
+ # for Docker Compose version v5.2.0
3
3
 
4
4
  import dataclasses as _dc
5
5
  from typing import Optional
@@ -1,5 +1,5 @@
1
1
  # DO NOT EDIT: Autogenerated by docker_composer/_utils/generate_class.py
2
- # for Docker Compose version v5.1.3
2
+ # for Docker Compose version v5.2.0
3
3
 
4
4
  import dataclasses as _dc
5
5
  from typing import Optional
@@ -23,7 +23,7 @@ class DockerComposeExec(DockerBaseRunner):
23
23
  index: Optional[int] = None
24
24
  """Index of the container if service has multiple replicas"""
25
25
  no_tty: Optional[bool] = None
26
- """Disable pseudo-TTY allocation. By default 'docker compose exec' allocates a TTY. (default true)"""
26
+ """Disable pseudo-TTY allocation. By default 'docker compose exec' allocates a TTY."""
27
27
  privileged: Optional[bool] = None
28
28
  """Give extended privileges to the process"""
29
29
  user: Optional[str] = None
@@ -1,5 +1,5 @@
1
1
  # DO NOT EDIT: Autogenerated by docker_composer/_utils/generate_class.py
2
- # for Docker Compose version v5.1.3
2
+ # for Docker Compose version v5.2.0
3
3
 
4
4
  import dataclasses as _dc
5
5
  from typing import Optional
@@ -1,5 +1,5 @@
1
1
  # DO NOT EDIT: Autogenerated by docker_composer/_utils/generate_class.py
2
- # for Docker Compose version v5.1.3
2
+ # for Docker Compose version v5.2.0
3
3
 
4
4
  import dataclasses as _dc
5
5
  from typing import Optional
@@ -1,5 +1,5 @@
1
1
  # DO NOT EDIT: Autogenerated by docker_composer/_utils/generate_class.py
2
- # for Docker Compose version v5.1.3
2
+ # for Docker Compose version v5.2.0
3
3
 
4
4
  import dataclasses as _dc
5
5
  from typing import Optional
@@ -1,5 +1,5 @@
1
1
  # DO NOT EDIT: Autogenerated by docker_composer/_utils/generate_class.py
2
- # for Docker Compose version v5.1.3
2
+ # for Docker Compose version v5.2.0
3
3
 
4
4
  import dataclasses as _dc
5
5
  from typing import Optional
@@ -1,5 +1,5 @@
1
1
  # DO NOT EDIT: Autogenerated by docker_composer/_utils/generate_class.py
2
- # for Docker Compose version v5.1.3
2
+ # for Docker Compose version v5.2.0
3
3
 
4
4
  import dataclasses as _dc
5
5
  from typing import Optional
@@ -1,5 +1,5 @@
1
1
  # DO NOT EDIT: Autogenerated by docker_composer/_utils/generate_class.py
2
- # for Docker Compose version v5.1.3
2
+ # for Docker Compose version v5.2.0
3
3
 
4
4
  import dataclasses as _dc
5
5
  from typing import Optional
@@ -1,5 +1,5 @@
1
1
  # DO NOT EDIT: Autogenerated by docker_composer/_utils/generate_class.py
2
- # for Docker Compose version v5.1.3
2
+ # for Docker Compose version v5.2.0
3
3
 
4
4
  import dataclasses as _dc
5
5
  from typing import Optional
@@ -1,5 +1,5 @@
1
1
  # DO NOT EDIT: Autogenerated by docker_composer/_utils/generate_class.py
2
- # for Docker Compose version v5.1.3
2
+ # for Docker Compose version v5.2.0
3
3
 
4
4
  import dataclasses as _dc
5
5
  from typing import Optional
@@ -26,7 +26,8 @@ class DockerComposePs(DockerBaseRunner):
26
26
  'table TEMPLATE': Print output in table format using the given Go template
27
27
  'json': Print in JSON format
28
28
  'TEMPLATE': Print output using the given Go template.
29
- Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates (default "table")"""
29
+ Refer to https://docs.docker.com/go/formatting/ for more information about
30
+ formatting output with templates (default "table")"""
30
31
  no_trunc: Optional[bool] = None
31
32
  """Don't truncate output"""
32
33
  orphans: Optional[bool] = None
@@ -36,7 +37,8 @@ class DockerComposePs(DockerBaseRunner):
36
37
  services: Optional[bool] = None
37
38
  """Display services"""
38
39
  status: Optional[list] = None
39
- """Filter services by status. Values: [paused | restarting | removing | running | dead | created | exited]"""
40
+ """Filter services by status. Values: [paused | restarting | removing | running | dead
41
+ | created | exited]"""
40
42
  _cmd: str = _dc.field(default="ps", repr=False, init=False)
41
43
  _options: list[str] = _dc.field(
42
44
  default_factory=lambda: [
@@ -1,5 +1,5 @@
1
1
  # DO NOT EDIT: Autogenerated by docker_composer/_utils/generate_class.py
2
- # for Docker Compose version v5.1.3
2
+ # for Docker Compose version v5.2.0
3
3
 
4
4
  import dataclasses as _dc
5
5
  from typing import Optional
@@ -1,5 +1,5 @@
1
1
  # DO NOT EDIT: Autogenerated by docker_composer/_utils/generate_class.py
2
- # for Docker Compose version v5.1.3
2
+ # for Docker Compose version v5.2.0
3
3
 
4
4
  import dataclasses as _dc
5
5
  from typing import Optional
@@ -1,5 +1,5 @@
1
1
  # DO NOT EDIT: Autogenerated by docker_composer/_utils/generate_class.py
2
- # for Docker Compose version v5.1.3
2
+ # for Docker Compose version v5.2.0
3
3
 
4
4
  import dataclasses as _dc
5
5
  from typing import Optional
@@ -1,5 +1,5 @@
1
1
  # DO NOT EDIT: Autogenerated by docker_composer/_utils/generate_class.py
2
- # for Docker Compose version v5.1.3
2
+ # for Docker Compose version v5.2.0
3
3
 
4
4
  import dataclasses as _dc
5
5
  from typing import Optional
@@ -1,5 +1,5 @@
1
1
  # DO NOT EDIT: Autogenerated by docker_composer/_utils/generate_class.py
2
- # for Docker Compose version v5.1.3
2
+ # for Docker Compose version v5.2.0
3
3
 
4
4
  import dataclasses as _dc
5
5
  from typing import Optional
@@ -1,5 +1,5 @@
1
1
  # DO NOT EDIT: Autogenerated by docker_composer/_utils/generate_class.py
2
- # for Docker Compose version v5.1.3
2
+ # for Docker Compose version v5.2.0
3
3
 
4
4
  import dataclasses as _dc
5
5
  from typing import Optional
@@ -37,7 +37,7 @@ class DockerComposeRun(DockerBaseRunner):
37
37
  name: Optional[str] = None
38
38
  """Assign a name to the container"""
39
39
  no_TTY: Optional[bool] = None
40
- """Disable pseudo-TTY allocation (default: auto-detected) (default true)"""
40
+ """Disable pseudo-TTY allocation (default: auto-detected)"""
41
41
  no_deps: Optional[bool] = None
42
42
  """Don't start linked services"""
43
43
  publish: Optional[list] = None
@@ -1,5 +1,5 @@
1
1
  # DO NOT EDIT: Autogenerated by docker_composer/_utils/generate_class.py
2
- # for Docker Compose version v5.1.3
2
+ # for Docker Compose version v5.2.0
3
3
 
4
4
  import dataclasses as _dc
5
5
  from typing import Optional
@@ -1,5 +1,5 @@
1
1
  # DO NOT EDIT: Autogenerated by docker_composer/_utils/generate_class.py
2
- # for Docker Compose version v5.1.3
2
+ # for Docker Compose version v5.2.0
3
3
 
4
4
  import dataclasses as _dc
5
5
  from typing import Optional
@@ -1,5 +1,5 @@
1
1
  # DO NOT EDIT: Autogenerated by docker_composer/_utils/generate_class.py
2
- # for Docker Compose version v5.1.3
2
+ # for Docker Compose version v5.2.0
3
3
 
4
4
  import dataclasses as _dc
5
5
  from typing import Optional
@@ -24,7 +24,8 @@ class DockerComposeStats(DockerBaseRunner):
24
24
  'table TEMPLATE': Print output in table format using the given Go template
25
25
  'json': Print in JSON format
26
26
  'TEMPLATE': Print output using the given Go template.
27
- Refer to https://docs.docker.com/engine/cli/formatting/ for more information about formatting output with templates"""
27
+ Refer to https://docs.docker.com/engine/cli/formatting/ for more information about
28
+ formatting output with templates"""
28
29
  no_stream: Optional[bool] = None
29
30
  """Disable streaming stats and only pull the first result"""
30
31
  no_trunc: Optional[bool] = None
@@ -1,5 +1,5 @@
1
1
  # DO NOT EDIT: Autogenerated by docker_composer/_utils/generate_class.py
2
- # for Docker Compose version v5.1.3
2
+ # for Docker Compose version v5.2.0
3
3
 
4
4
  import dataclasses as _dc
5
5
  from typing import Optional
@@ -1,5 +1,5 @@
1
1
  # DO NOT EDIT: Autogenerated by docker_composer/_utils/generate_class.py
2
- # for Docker Compose version v5.1.3
2
+ # for Docker Compose version v5.2.0
3
3
 
4
4
  import dataclasses as _dc
5
5
  from typing import Optional
@@ -1,5 +1,5 @@
1
1
  # DO NOT EDIT: Autogenerated by docker_composer/_utils/generate_class.py
2
- # for Docker Compose version v5.1.3
2
+ # for Docker Compose version v5.2.0
3
3
 
4
4
  import dataclasses as _dc
5
5
  from typing import Optional
@@ -1,5 +1,5 @@
1
1
  # DO NOT EDIT: Autogenerated by docker_composer/_utils/generate_class.py
2
- # for Docker Compose version v5.1.3
2
+ # for Docker Compose version v5.2.0
3
3
 
4
4
  import dataclasses as _dc
5
5
  from typing import Optional
@@ -21,7 +21,8 @@ class DockerComposeUp(DockerBaseRunner):
21
21
  always_recreate_deps: Optional[bool] = None
22
22
  """Recreate dependent containers. Incompatible with --no-recreate."""
23
23
  attach: Optional[list] = None
24
- """Restrict attaching to the specified services. Incompatible with --attach-dependencies."""
24
+ """Restrict attaching to the specified services. Incompatible with
25
+ --attach-dependencies."""
25
26
  attach_dependencies: Optional[bool] = None
26
27
  """Automatically attach to log output of dependent services"""
27
28
  build: Optional[bool] = None
@@ -31,11 +32,13 @@ class DockerComposeUp(DockerBaseRunner):
31
32
  dry_run: Optional[bool] = None
32
33
  """Execute command in dry run mode"""
33
34
  exit_code_from: Optional[str] = None
34
- """Return the exit code of the selected service container. Implies --abort-on-container-exit"""
35
+ """Return the exit code of the selected service container. Implies
36
+ --abort-on-container-exit"""
35
37
  force_recreate: Optional[bool] = None
36
38
  """Recreate containers even if their configuration and image haven't changed"""
37
39
  menu: Optional[bool] = None
38
- """Enable interactive shortcuts when running attached. Incompatible with --detach. Can also be enable/disable by setting COMPOSE_MENU environment var."""
40
+ """Enable interactive shortcuts when running attached. Incompatible with
41
+ --detach. Can also be enable/disable by setting COMPOSE_MENU environment var."""
39
42
  no_attach: Optional[list] = None
40
43
  """Do not attach (stream logs) to the specified services"""
41
44
  no_build: Optional[bool] = None
@@ -47,7 +50,8 @@ class DockerComposeUp(DockerBaseRunner):
47
50
  no_log_prefix: Optional[bool] = None
48
51
  """Don't print prefix in logs"""
49
52
  no_recreate: Optional[bool] = None
50
- """If containers already exist, don't recreate them. Incompatible with --force-recreate."""
53
+ """If containers already exist, don't recreate them. Incompatible with
54
+ --force-recreate."""
51
55
  no_start: Optional[bool] = None
52
56
  """Don't start the services after creating them"""
53
57
  pull: Optional[str] = None
@@ -59,11 +63,14 @@ class DockerComposeUp(DockerBaseRunner):
59
63
  remove_orphans: Optional[bool] = None
60
64
  """Remove containers for services not defined in the Compose file"""
61
65
  renew_anon_volumes: Optional[bool] = None
62
- """Recreate anonymous volumes instead of retrieving data from the previous containers"""
66
+ """Recreate anonymous volumes instead of retrieving data from the previous
67
+ containers"""
63
68
  scale: Optional[int] = None
64
- """Scale SERVICE to NUM instances. Overrides the scale setting in the Compose file if present."""
69
+ """Scale SERVICE to NUM instances. Overrides the scale setting in the Compose
70
+ file if present."""
65
71
  timeout: Optional[int] = None
66
- """Use this timeout in seconds for container shutdown when attached or when containers are already running"""
72
+ """Use this timeout in seconds for container shutdown when attached or when
73
+ containers are already running"""
67
74
  timestamps: Optional[bool] = None
68
75
  """Show timestamps"""
69
76
  wait: Optional[bool] = None
@@ -1,5 +1,5 @@
1
1
  # DO NOT EDIT: Autogenerated by docker_composer/_utils/generate_class.py
2
- # for Docker Compose version v5.1.3
2
+ # for Docker Compose version v5.2.0
3
3
 
4
4
  import dataclasses as _dc
5
5
  from typing import Optional
@@ -1,5 +1,5 @@
1
1
  # DO NOT EDIT: Autogenerated by docker_composer/_utils/generate_class.py
2
- # for Docker Compose version v5.1.3
2
+ # for Docker Compose version v5.2.0
3
3
 
4
4
  import dataclasses as _dc
5
5
  from typing import Optional
@@ -22,7 +22,8 @@ class DockerComposeVolumes(DockerBaseRunner):
22
22
  'table TEMPLATE': Print output in table format using the given Go template
23
23
  'json': Print in JSON format
24
24
  'TEMPLATE': Print output using the given Go template.
25
- Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates (default "table")"""
25
+ Refer to https://docs.docker.com/go/formatting/ for more information about formatting
26
+ output with templates (default "table")"""
26
27
  quiet: Optional[bool] = None
27
28
  """Only display volume names"""
28
29
  _cmd: str = _dc.field(default="volumes", repr=False, init=False)
@@ -1,5 +1,5 @@
1
1
  # DO NOT EDIT: Autogenerated by docker_composer/_utils/generate_class.py
2
- # for Docker Compose version v5.1.3
2
+ # for Docker Compose version v5.2.0
3
3
 
4
4
  import dataclasses as _dc
5
5
  from typing import Optional
@@ -1,5 +1,5 @@
1
1
  # DO NOT EDIT: Autogenerated by docker_composer/_utils/generate_class.py
2
- # for Docker Compose version v5.1.3
2
+ # for Docker Compose version v5.2.0
3
3
 
4
4
  import dataclasses as _dc
5
5
  from typing import Optional
@@ -1,5 +1,5 @@
1
1
  # DO NOT EDIT: Autogenerated by docker_composer/_utils/generate_class.py
2
- # for Docker Compose version v5.1.3
2
+ # for Docker Compose version v5.2.0
3
3
 
4
4
  import dataclasses as _dc
5
5
  from typing import Optional
@@ -54,7 +54,8 @@ class DockerComposeRoot(DockerBaseRunner):
54
54
  all_resources: Optional[bool] = None
55
55
  """Include all resources, even those not used by services"""
56
56
  ansi: Optional[str] = None
57
- """Control when to print ANSI control characters ("never"|"always"|"auto") (default "auto")"""
57
+ """Control when to print ANSI control characters ("never"|"always"|"auto")
58
+ (default "auto")"""
58
59
  compatibility: Optional[bool] = None
59
60
  """Run compose in backward compatibility mode"""
60
61
  dry_run: Optional[bool] = None
@@ -145,7 +146,8 @@ class DockerComposeRoot(DockerBaseRunner):
145
146
  :param push: Push service images
146
147
  :param quiet: Suppress the build output
147
148
  :param sbom: Add a SBOM attestation
148
- :param ssh: Set SSH authentications used when building service images. (use 'default' for using your default SSH Agent)
149
+ :param ssh: Set SSH authentications used when building service images. (use 'default' for
150
+ using your default SSH Agent)
149
151
  :param with_dependencies: Also build dependencies (transitively)
150
152
  """
151
153
  runner = docker_composer.runner.cmd.build.DockerComposeBuild(
@@ -307,9 +309,11 @@ class DockerComposeRoot(DockerBaseRunner):
307
309
 
308
310
  :param dry_run: Execute command in dry run mode
309
311
  :param remove_orphans: Remove containers for services not defined in the Compose file
310
- :param rmi: Remove images used by services. "local" remove only images that don't have a custom tag ("local"|"all")
312
+ :param rmi: Remove images used by services. "local" remove only images that don't have a custom tag
313
+ ("local"|"all")
311
314
  :param timeout: Specify a shutdown timeout in seconds
312
- :param volumes: Remove named volumes declared in the "volumes" section of the Compose file and anonymous volumes attached to containers
315
+ :param volumes: Remove named volumes declared in the "volumes" section of the Compose file and anonymous
316
+ volumes attached to containers
313
317
  """
314
318
  runner = docker_composer.runner.cmd.down.DockerComposeDown(
315
319
  **{k: v for k, v in locals().items() if k != "self"}
@@ -358,7 +362,7 @@ class DockerComposeRoot(DockerBaseRunner):
358
362
  :param dry_run: Execute command in dry run mode
359
363
  :param env: Set environment variables
360
364
  :param index: Index of the container if service has multiple replicas
361
- :param no_tty: Disable pseudo-TTY allocation. By default 'docker compose exec' allocates a TTY. (default true)
365
+ :param no_tty: Disable pseudo-TTY allocation. By default 'docker compose exec' allocates a TTY.
362
366
  :param privileged: Give extended privileges to the process
363
367
  :param user: Run the command as this user
364
368
  :param workdir: Path to workdir directory for this command
@@ -544,12 +548,14 @@ class DockerComposeRoot(DockerBaseRunner):
544
548
  'table TEMPLATE': Print output in table format using the given Go template
545
549
  'json': Print in JSON format
546
550
  'TEMPLATE': Print output using the given Go template.
547
- Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates (default "table")
551
+ Refer to https://docs.docker.com/go/formatting/ for more information about
552
+ formatting output with templates (default "table")
548
553
  :param no_trunc: Don't truncate output
549
554
  :param orphans: Include orphaned services (not declared by project) (default true)
550
555
  :param quiet: Only display IDs
551
556
  :param services: Display services
552
- :param status: Filter services by status. Values: [paused | restarting | removing | running | dead | created | exited]
557
+ :param status: Filter services by status. Values: [paused | restarting | removing | running | dead
558
+ | created | exited]
553
559
  """
554
560
  runner = docker_composer.runner.cmd.ps.DockerComposePs(
555
561
  **{k: v for k, v in locals().items() if k != "self"}
@@ -719,7 +725,7 @@ class DockerComposeRoot(DockerBaseRunner):
719
725
  :param interactive: Keep STDIN open even if not attached (default true)
720
726
  :param label: Add or override a label
721
727
  :param name: Assign a name to the container
722
- :param no_TTY: Disable pseudo-TTY allocation (default: auto-detected) (default true)
728
+ :param no_TTY: Disable pseudo-TTY allocation (default: auto-detected)
723
729
  :param no_deps: Don't start linked services
724
730
  :param publish: Publish a container's port(s) to the host
725
731
  :param pull: Pull image before running ("always"|"missing"|"never") (default "policy")
@@ -795,7 +801,8 @@ class DockerComposeRoot(DockerBaseRunner):
795
801
  'table TEMPLATE': Print output in table format using the given Go template
796
802
  'json': Print in JSON format
797
803
  'TEMPLATE': Print output using the given Go template.
798
- Refer to https://docs.docker.com/engine/cli/formatting/ for more information about formatting output with templates
804
+ Refer to https://docs.docker.com/engine/cli/formatting/ for more information about
805
+ formatting output with templates
799
806
  :param no_stream: Disable streaming stats and only pull the first result
800
807
  :param no_trunc: Do not truncate output
801
808
  """
@@ -891,28 +898,35 @@ class DockerComposeRoot(DockerBaseRunner):
891
898
  :param abort_on_container_exit: Stops all containers if any container was stopped. Incompatible with -d
892
899
  :param abort_on_container_failure: Stops all containers if any container exited with failure. Incompatible with -d
893
900
  :param always_recreate_deps: Recreate dependent containers. Incompatible with --no-recreate.
894
- :param attach: Restrict attaching to the specified services. Incompatible with --attach-dependencies.
901
+ :param attach: Restrict attaching to the specified services. Incompatible with
902
+ --attach-dependencies.
895
903
  :param attach_dependencies: Automatically attach to log output of dependent services
896
904
  :param build: Build images before starting containers
897
905
  :param detach: Detached mode: Run containers in the background
898
906
  :param dry_run: Execute command in dry run mode
899
- :param exit_code_from: Return the exit code of the selected service container. Implies --abort-on-container-exit
907
+ :param exit_code_from: Return the exit code of the selected service container. Implies
908
+ --abort-on-container-exit
900
909
  :param force_recreate: Recreate containers even if their configuration and image haven't changed
901
- :param menu: Enable interactive shortcuts when running attached. Incompatible with --detach. Can also be enable/disable by setting COMPOSE_MENU environment var.
910
+ :param menu: Enable interactive shortcuts when running attached. Incompatible with
911
+ --detach. Can also be enable/disable by setting COMPOSE_MENU environment var.
902
912
  :param no_attach: Do not attach (stream logs) to the specified services
903
913
  :param no_build: Don't build an image, even if it's policy
904
914
  :param no_color: Produce monochrome output
905
915
  :param no_deps: Don't start linked services
906
916
  :param no_log_prefix: Don't print prefix in logs
907
- :param no_recreate: If containers already exist, don't recreate them. Incompatible with --force-recreate.
917
+ :param no_recreate: If containers already exist, don't recreate them. Incompatible with
918
+ --force-recreate.
908
919
  :param no_start: Don't start the services after creating them
909
920
  :param pull: Pull image before running ("always"|"missing"|"never") (default "policy")
910
921
  :param quiet_build: Suppress the build output
911
922
  :param quiet_pull: Pull without printing progress information
912
923
  :param remove_orphans: Remove containers for services not defined in the Compose file
913
- :param renew_anon_volumes: Recreate anonymous volumes instead of retrieving data from the previous containers
914
- :param scale: Scale SERVICE to NUM instances. Overrides the scale setting in the Compose file if present.
915
- :param timeout: Use this timeout in seconds for container shutdown when attached or when containers are already running
924
+ :param renew_anon_volumes: Recreate anonymous volumes instead of retrieving data from the previous
925
+ containers
926
+ :param scale: Scale SERVICE to NUM instances. Overrides the scale setting in the Compose
927
+ file if present.
928
+ :param timeout: Use this timeout in seconds for container shutdown when attached or when
929
+ containers are already running
916
930
  :param timestamps: Show timestamps
917
931
  :param wait: Wait for services to be running|healthy. Implies detached mode.
918
932
  :param wait_timeout: Maximum duration in seconds to wait for the project to be running|healthy
@@ -961,7 +975,8 @@ class DockerComposeRoot(DockerBaseRunner):
961
975
  'table TEMPLATE': Print output in table format using the given Go template
962
976
  'json': Print in JSON format
963
977
  'TEMPLATE': Print output using the given Go template.
964
- Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates (default "table")
978
+ Refer to https://docs.docker.com/go/formatting/ for more information about formatting
979
+ output with templates (default "table")
965
980
  :param quiet: Only display volume names
966
981
  """
967
982
  runner = docker_composer.runner.cmd.volumes.DockerComposeVolumes(