imaged 2026.7.2__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.
- imaged-2026.7.2/.gitattributes +1 -0
- imaged-2026.7.2/.github/FUNDING.yml +3 -0
- imaged-2026.7.2/.github/SECURITY.md +15 -0
- imaged-2026.7.2/.github/dependabot.yml +8 -0
- imaged-2026.7.2/.github/workflows/ci.yml +154 -0
- imaged-2026.7.2/.pre-commit-config.yaml +25 -0
- imaged-2026.7.2/COPYING +19 -0
- imaged-2026.7.2/PKG-INFO +86 -0
- imaged-2026.7.2/README.rst +61 -0
- imaged-2026.7.2/docs/.readthedocs.yaml +19 -0
- imaged-2026.7.2/docs/conf.py +58 -0
- imaged-2026.7.2/docs/index.rst +9 -0
- imaged-2026.7.2/docs/spelling-wordlist.txt +10 -0
- imaged-2026.7.2/imaged/__init__.py +51 -0
- imaged-2026.7.2/imaged/_dialects.py +166 -0
- imaged-2026.7.2/imaged/_errors.py +112 -0
- imaged-2026.7.2/imaged/_subprocess.py +370 -0
- imaged-2026.7.2/imaged/tests/__init__.py +0 -0
- imaged-2026.7.2/imaged/tests/test_engines.py +376 -0
- imaged-2026.7.2/imaged/tests/test_engines_for_real.py +163 -0
- imaged-2026.7.2/noxfile.py +163 -0
- imaged-2026.7.2/pyproject.toml +169 -0
- imaged-2026.7.2/uv.lock +656 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
* text=auto eol=lf
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Security Policy
|
|
2
|
+
|
|
3
|
+
## Supported Versions
|
|
4
|
+
|
|
5
|
+
In general, only the latest released `imaged` version is supported and will receive updates.
|
|
6
|
+
|
|
7
|
+
## Reporting a Vulnerability
|
|
8
|
+
|
|
9
|
+
To report a security vulnerability, please send an email to `Julian+Security` at `GrayVines.com` with subject line `SECURITY (imaged)`.
|
|
10
|
+
|
|
11
|
+
I will do my best to respond within 48 hours to acknowledge the message and discuss further steps.
|
|
12
|
+
|
|
13
|
+
If the vulnerability is accepted, an advisory will be sent out via GitHub's security advisory functionality.
|
|
14
|
+
|
|
15
|
+
For non-sensitive discussion related to this policy itself, feel free to open an issue on the issue tracker.
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches-ignore:
|
|
6
|
+
- "wip*"
|
|
7
|
+
tags:
|
|
8
|
+
- "v*"
|
|
9
|
+
pull_request:
|
|
10
|
+
schedule:
|
|
11
|
+
# Daily at 7:47
|
|
12
|
+
- cron: "47 7 * * *"
|
|
13
|
+
workflow_dispatch:
|
|
14
|
+
|
|
15
|
+
permissions: {}
|
|
16
|
+
|
|
17
|
+
concurrency:
|
|
18
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
19
|
+
cancel-in-progress: true
|
|
20
|
+
|
|
21
|
+
jobs:
|
|
22
|
+
list:
|
|
23
|
+
name: Identify nox sessions
|
|
24
|
+
runs-on: ubuntu-latest
|
|
25
|
+
outputs:
|
|
26
|
+
noxenvs: ${{ steps.noxenvs-matrix.outputs.noxenvs }}
|
|
27
|
+
steps:
|
|
28
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
29
|
+
with:
|
|
30
|
+
persist-credentials: false
|
|
31
|
+
- name: Set up uv
|
|
32
|
+
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
|
|
33
|
+
with:
|
|
34
|
+
enable-cache: ${{ github.ref_type != 'tag' }} # zizmor: ignore[cache-poisoning]
|
|
35
|
+
- id: noxenvs-matrix
|
|
36
|
+
run: |
|
|
37
|
+
echo >>$GITHUB_OUTPUT noxenvs=$(
|
|
38
|
+
uvx nox --list-sessions --json | jq '[.[].session]'
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
ci:
|
|
42
|
+
name: ${{ matrix.noxenv }} (${{ matrix.os }})
|
|
43
|
+
needs: list
|
|
44
|
+
runs-on: ${{ matrix.os }}
|
|
45
|
+
|
|
46
|
+
strategy:
|
|
47
|
+
fail-fast: false
|
|
48
|
+
matrix:
|
|
49
|
+
os: [macos-latest, ubuntu-latest, windows-latest]
|
|
50
|
+
noxenv: ${{ fromJson(needs.list.outputs.noxenvs) }}
|
|
51
|
+
posargs: [""]
|
|
52
|
+
include:
|
|
53
|
+
- os: ubuntu-latest
|
|
54
|
+
noxenv: "tests-3.14"
|
|
55
|
+
posargs: coverage github
|
|
56
|
+
|
|
57
|
+
steps:
|
|
58
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
59
|
+
with:
|
|
60
|
+
persist-credentials: false
|
|
61
|
+
- name: Install dependencies
|
|
62
|
+
run: sudo apt-get update && sudo apt-get install -y libenchant-2-dev
|
|
63
|
+
if: runner.os == 'Linux' && startsWith(matrix.noxenv, 'docs')
|
|
64
|
+
- name: Install dependencies
|
|
65
|
+
run: brew install enchant
|
|
66
|
+
if: runner.os == 'macOS' && startsWith(matrix.noxenv, 'docs')
|
|
67
|
+
|
|
68
|
+
- name: Set up uv
|
|
69
|
+
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
|
|
70
|
+
with:
|
|
71
|
+
enable-cache: ${{ github.ref_type != 'tag' }} # zizmor: ignore[cache-poisoning]
|
|
72
|
+
- name: Run nox
|
|
73
|
+
run: uvx nox -s "${{ matrix.noxenv }}" -- ${{ matrix.posargs }} # zizmor: ignore[template-injection]
|
|
74
|
+
|
|
75
|
+
engines:
|
|
76
|
+
# The tests above drive a stand-in engine, which is what makes them
|
|
77
|
+
# runnable everywhere. These drive the real thing, once per engine,
|
|
78
|
+
# because the entire promise of this package is that all of them
|
|
79
|
+
# answer identically.
|
|
80
|
+
name: ${{ matrix.engine }}
|
|
81
|
+
runs-on: ${{ matrix.os }}
|
|
82
|
+
|
|
83
|
+
strategy:
|
|
84
|
+
fail-fast: false
|
|
85
|
+
matrix:
|
|
86
|
+
include:
|
|
87
|
+
- engine: docker
|
|
88
|
+
os: ubuntu-latest
|
|
89
|
+
- engine: podman
|
|
90
|
+
os: ubuntu-latest
|
|
91
|
+
# No engine can run on GitHub's hosted macOS runners. Every
|
|
92
|
+
# one of them needs a Linux VM there, and those runners are
|
|
93
|
+
# themselves VMs without nested virtualization
|
|
94
|
+
# (actions/runner-images#13505), so podman's vfkit and
|
|
95
|
+
# colima's lima both fail to start one -- as would Apple's
|
|
96
|
+
# container, which wants Virtualization.framework directly.
|
|
97
|
+
# Covering macOS at all needs a self-hosted Apple silicon
|
|
98
|
+
# runner, at which point this becomes:
|
|
99
|
+
#
|
|
100
|
+
# - engine: container
|
|
101
|
+
# os: [self-hosted, macOS, ARM64]
|
|
102
|
+
|
|
103
|
+
steps:
|
|
104
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
105
|
+
with:
|
|
106
|
+
persist-credentials: false
|
|
107
|
+
|
|
108
|
+
- name: Install podman
|
|
109
|
+
run: sudo apt-get update && sudo apt-get install -y podman
|
|
110
|
+
if: matrix.engine == 'podman'
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
- name: Set up uv
|
|
114
|
+
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
|
|
115
|
+
with:
|
|
116
|
+
enable-cache: ${{ github.ref_type != 'tag' }} # zizmor: ignore[cache-poisoning]
|
|
117
|
+
|
|
118
|
+
- name: Run the tests against ${{ matrix.engine }}
|
|
119
|
+
env:
|
|
120
|
+
IMAGED_ENGINE: ${{ matrix.engine }}
|
|
121
|
+
run: uvx nox -s tests-3.14 -- -m real
|
|
122
|
+
|
|
123
|
+
packaging:
|
|
124
|
+
name: Build and publish
|
|
125
|
+
needs: [ci, engines]
|
|
126
|
+
runs-on: ubuntu-latest
|
|
127
|
+
environment:
|
|
128
|
+
name: PyPI
|
|
129
|
+
url: https://pypi.org/p/imaged
|
|
130
|
+
|
|
131
|
+
permissions:
|
|
132
|
+
contents: write # for creating releases
|
|
133
|
+
id-token: write # for trusted publishing to PyPI
|
|
134
|
+
|
|
135
|
+
steps:
|
|
136
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
137
|
+
with:
|
|
138
|
+
persist-credentials: false
|
|
139
|
+
- name: Set up uv
|
|
140
|
+
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
|
|
141
|
+
with:
|
|
142
|
+
enable-cache: ${{ github.ref_type != 'tag' }} # zizmor: ignore[cache-poisoning]
|
|
143
|
+
|
|
144
|
+
- name: Build our distributions
|
|
145
|
+
run: uv run --frozen --with 'build[uv]' -m build --installer=uv
|
|
146
|
+
|
|
147
|
+
- name: Publish to PyPI
|
|
148
|
+
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
|
|
149
|
+
uses: pypa/gh-action-pypi-publish@ba38be9e461d3875417946c167d0b5f3d385a247 # v1.14.1
|
|
150
|
+
- name: Create a Release
|
|
151
|
+
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
|
|
152
|
+
run: gh release create ${{ github.ref_name }} dist/* --generate-notes # zizmor: ignore[template-injection]
|
|
153
|
+
env:
|
|
154
|
+
GH_TOKEN: ${{ github.token }}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
repos:
|
|
2
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
3
|
+
rev: v6.0.0
|
|
4
|
+
hooks:
|
|
5
|
+
- id: check-added-large-files
|
|
6
|
+
- id: check-ast
|
|
7
|
+
- id: check-toml
|
|
8
|
+
- id: check-vcs-permalinks
|
|
9
|
+
- id: check-yaml
|
|
10
|
+
- id: debug-statements
|
|
11
|
+
- id: end-of-file-fixer
|
|
12
|
+
- id: mixed-line-ending
|
|
13
|
+
args: [--fix, lf]
|
|
14
|
+
- id: trailing-whitespace
|
|
15
|
+
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
16
|
+
rev: "v0.15.10"
|
|
17
|
+
hooks:
|
|
18
|
+
- id: ruff-check
|
|
19
|
+
args: [--fix, --exit-non-zero-on-fix]
|
|
20
|
+
- id: ruff-format
|
|
21
|
+
- repo: https://github.com/zizmorcore/zizmor-pre-commit
|
|
22
|
+
rev: v1.23.1
|
|
23
|
+
hooks:
|
|
24
|
+
- id: zizmor
|
|
25
|
+
args: [--pedantic]
|
imaged-2026.7.2/COPYING
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
Copyright (c) 2026 Julian Berman
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
4
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
5
|
+
in the Software without restriction, including without limitation the rights
|
|
6
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
7
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
8
|
+
furnished to do so, subject to the following conditions:
|
|
9
|
+
|
|
10
|
+
The above copyright notice and this permission notice shall be included in
|
|
11
|
+
all copies or substantial portions of the Software.
|
|
12
|
+
|
|
13
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
14
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
15
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
16
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
17
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
18
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
19
|
+
THE SOFTWARE.
|
imaged-2026.7.2/PKG-INFO
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: imaged
|
|
3
|
+
Version: 2026.7.2
|
|
4
|
+
Summary: One interface to docker, podman and Apple's container.
|
|
5
|
+
Project-URL: Documentation, https://imaged.readthedocs.io/
|
|
6
|
+
Project-URL: Homepage, https://github.com/Julian/imaged
|
|
7
|
+
Project-URL: Issues, https://github.com/Julian/imaged/issues/
|
|
8
|
+
Project-URL: Funding, https://github.com/sponsors/Julian
|
|
9
|
+
Project-URL: Source, https://github.com/Julian/imaged
|
|
10
|
+
Author-email: Julian Berman <Julian+imaged@GrayVines.com>
|
|
11
|
+
License-Expression: MIT
|
|
12
|
+
License-File: COPYING
|
|
13
|
+
Keywords: anyio,containers,docker,oci,podman
|
|
14
|
+
Classifier: Development Status :: 3 - Alpha
|
|
15
|
+
Classifier: Operating System :: OS Independent
|
|
16
|
+
Classifier: Programming Language :: Python
|
|
17
|
+
Classifier: Programming Language :: Python :: 3
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
20
|
+
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
21
|
+
Requires-Python: >=3.13
|
|
22
|
+
Requires-Dist: anyio>=4
|
|
23
|
+
Requires-Dist: attrs>=22.2.0
|
|
24
|
+
Description-Content-Type: text/x-rst
|
|
25
|
+
|
|
26
|
+
==========
|
|
27
|
+
``imaged``
|
|
28
|
+
==========
|
|
29
|
+
|
|
30
|
+
|PyPI| |Pythons| |CI| |ReadTheDocs|
|
|
31
|
+
|
|
32
|
+
.. |PyPI| image:: https://img.shields.io/pypi/v/imaged.svg
|
|
33
|
+
:alt: PyPI version
|
|
34
|
+
:target: https://pypi.org/project/imaged/
|
|
35
|
+
|
|
36
|
+
.. |Pythons| image:: https://img.shields.io/pypi/pyversions/imaged.svg
|
|
37
|
+
:alt: Supported Python versions
|
|
38
|
+
:target: https://pypi.org/project/imaged/
|
|
39
|
+
|
|
40
|
+
.. |CI| image:: https://github.com/Julian/imaged/workflows/CI/badge.svg
|
|
41
|
+
:alt: Build status
|
|
42
|
+
:target: https://github.com/Julian/imaged/actions?query=workflow%3ACI
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
.. |ReadTheDocs| image:: https://readthedocs.org/projects/imaged/badge/?version=stable&style=flat
|
|
46
|
+
:alt: ReadTheDocs status
|
|
47
|
+
:target: https://imaged.readthedocs.io/en/stable/
|
|
48
|
+
|
|
49
|
+
``imaged`` gives you one interface to `docker <https://www.docker.com/>`_,
|
|
50
|
+
`podman <https://podman.io/>`_ and `Apple's container
|
|
51
|
+
<https://github.com/apple/container>`_.
|
|
52
|
+
Start a container, speak to its standard streams, and be told what went wrong
|
|
53
|
+
in terms you can branch on.
|
|
54
|
+
|
|
55
|
+
.. code-block:: python
|
|
56
|
+
|
|
57
|
+
from imaged import Engine
|
|
58
|
+
|
|
59
|
+
engine = Engine.detect()
|
|
60
|
+
|
|
61
|
+
id = await engine.create_pulling_if_needed("alpine", "cat")
|
|
62
|
+
async with engine.start(id) as session:
|
|
63
|
+
await session.send("hello")
|
|
64
|
+
assert await session.receive() == "hello"
|
|
65
|
+
|
|
66
|
+
Why
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
Every engine reports the same failure differently, and none of them do so
|
|
70
|
+
machine readably -- not even over their HTTP APIs.
|
|
71
|
+
Working out that an image simply doesn't exist otherwise means matching on
|
|
72
|
+
substrings of prose, separately for each engine.
|
|
73
|
+
``imaged`` does that once, and raises ``NoSuchImage``.
|
|
74
|
+
|
|
75
|
+
Each engine is driven via its command line interface, which is the only
|
|
76
|
+
mechanism all three have in common, as Apple's container has no HTTP API at
|
|
77
|
+
all.
|
|
78
|
+
Doing so also leaves the engine to demultiplex container stdio onto real
|
|
79
|
+
pipes, rather than leaving you to unpick its framing.
|
|
80
|
+
|
|
81
|
+
Containers get no networking unless you ask for it, on the theory that
|
|
82
|
+
something you are running should have to say so before it can phone home.
|
|
83
|
+
|
|
84
|
+
`anyio <https://anyio.readthedocs.io/>`_ is the only async dependency, so
|
|
85
|
+
this runs unmodified on both asyncio and trio.
|
|
86
|
+
Its own test suite runs on both, against all three engines.
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
==========
|
|
2
|
+
``imaged``
|
|
3
|
+
==========
|
|
4
|
+
|
|
5
|
+
|PyPI| |Pythons| |CI| |ReadTheDocs|
|
|
6
|
+
|
|
7
|
+
.. |PyPI| image:: https://img.shields.io/pypi/v/imaged.svg
|
|
8
|
+
:alt: PyPI version
|
|
9
|
+
:target: https://pypi.org/project/imaged/
|
|
10
|
+
|
|
11
|
+
.. |Pythons| image:: https://img.shields.io/pypi/pyversions/imaged.svg
|
|
12
|
+
:alt: Supported Python versions
|
|
13
|
+
:target: https://pypi.org/project/imaged/
|
|
14
|
+
|
|
15
|
+
.. |CI| image:: https://github.com/Julian/imaged/workflows/CI/badge.svg
|
|
16
|
+
:alt: Build status
|
|
17
|
+
:target: https://github.com/Julian/imaged/actions?query=workflow%3ACI
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
.. |ReadTheDocs| image:: https://readthedocs.org/projects/imaged/badge/?version=stable&style=flat
|
|
21
|
+
:alt: ReadTheDocs status
|
|
22
|
+
:target: https://imaged.readthedocs.io/en/stable/
|
|
23
|
+
|
|
24
|
+
``imaged`` gives you one interface to `docker <https://www.docker.com/>`_,
|
|
25
|
+
`podman <https://podman.io/>`_ and `Apple's container
|
|
26
|
+
<https://github.com/apple/container>`_.
|
|
27
|
+
Start a container, speak to its standard streams, and be told what went wrong
|
|
28
|
+
in terms you can branch on.
|
|
29
|
+
|
|
30
|
+
.. code-block:: python
|
|
31
|
+
|
|
32
|
+
from imaged import Engine
|
|
33
|
+
|
|
34
|
+
engine = Engine.detect()
|
|
35
|
+
|
|
36
|
+
id = await engine.create_pulling_if_needed("alpine", "cat")
|
|
37
|
+
async with engine.start(id) as session:
|
|
38
|
+
await session.send("hello")
|
|
39
|
+
assert await session.receive() == "hello"
|
|
40
|
+
|
|
41
|
+
Why
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
Every engine reports the same failure differently, and none of them do so
|
|
45
|
+
machine readably -- not even over their HTTP APIs.
|
|
46
|
+
Working out that an image simply doesn't exist otherwise means matching on
|
|
47
|
+
substrings of prose, separately for each engine.
|
|
48
|
+
``imaged`` does that once, and raises ``NoSuchImage``.
|
|
49
|
+
|
|
50
|
+
Each engine is driven via its command line interface, which is the only
|
|
51
|
+
mechanism all three have in common, as Apple's container has no HTTP API at
|
|
52
|
+
all.
|
|
53
|
+
Doing so also leaves the engine to demultiplex container stdio onto real
|
|
54
|
+
pipes, rather than leaving you to unpick its framing.
|
|
55
|
+
|
|
56
|
+
Containers get no networking unless you ask for it, on the theory that
|
|
57
|
+
something you are running should have to say so before it can phone home.
|
|
58
|
+
|
|
59
|
+
`anyio <https://anyio.readthedocs.io/>`_ is the only async dependency, so
|
|
60
|
+
this runs unmodified on both asyncio and trio.
|
|
61
|
+
Its own test suite runs on both, against all three engines.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
version: 2
|
|
2
|
+
|
|
3
|
+
build:
|
|
4
|
+
os: ubuntu-24.04
|
|
5
|
+
tools:
|
|
6
|
+
python: "3.13"
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
post_create_environment:
|
|
10
|
+
- pip install uv
|
|
11
|
+
post_install:
|
|
12
|
+
- VIRTUAL_ENV=$READTHEDOCS_VIRTUALENV_PATH uv sync --group=docs
|
|
13
|
+
|
|
14
|
+
sphinx:
|
|
15
|
+
builder: dirhtml
|
|
16
|
+
configuration: docs/conf.py
|
|
17
|
+
fail_on_warning: true
|
|
18
|
+
|
|
19
|
+
formats: all
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import importlib.metadata
|
|
2
|
+
import re
|
|
3
|
+
|
|
4
|
+
project = "imaged"
|
|
5
|
+
author = "Julian Berman"
|
|
6
|
+
copyright = f"2026, {author}"
|
|
7
|
+
|
|
8
|
+
release = importlib.metadata.version("imaged")
|
|
9
|
+
version, _, _ = release.rpartition(".")
|
|
10
|
+
|
|
11
|
+
language = "en"
|
|
12
|
+
default_role = "any"
|
|
13
|
+
|
|
14
|
+
extensions = [
|
|
15
|
+
"sphinx.ext.autodoc",
|
|
16
|
+
"sphinx.ext.autosectionlabel",
|
|
17
|
+
"sphinx.ext.coverage",
|
|
18
|
+
"sphinx.ext.doctest",
|
|
19
|
+
"sphinx.ext.intersphinx",
|
|
20
|
+
"sphinx.ext.napoleon",
|
|
21
|
+
"sphinx.ext.viewcode",
|
|
22
|
+
"sphinxcontrib.spelling",
|
|
23
|
+
"sphinxext.opengraph",
|
|
24
|
+
]
|
|
25
|
+
|
|
26
|
+
pygments_style = "lovelace"
|
|
27
|
+
pygments_dark_style = "one-dark"
|
|
28
|
+
|
|
29
|
+
html_theme = "furo"
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
def entire_domain(host):
|
|
33
|
+
return r"http.?://" + re.escape(host) + r"($|/.*)"
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
linkcheck_ignore = [
|
|
37
|
+
entire_domain("img.shields.io"),
|
|
38
|
+
"https://github.com/Julian/imaged/actions",
|
|
39
|
+
"https://github.com/Julian/imaged/workflows/CI/badge.svg",
|
|
40
|
+
# Links which only exist once we exist as a package.
|
|
41
|
+
# Read the Docs has no stable version until something is released,
|
|
42
|
+
# and a release can't happen while this is what fails the build.
|
|
43
|
+
# TODO: remove both once the first release has been built.
|
|
44
|
+
"https://pypi.org/project/imaged/",
|
|
45
|
+
entire_domain("imaged.readthedocs.io"),
|
|
46
|
+
]
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
# = Extensions =
|
|
50
|
+
|
|
51
|
+
# -- autosectionlabel --
|
|
52
|
+
|
|
53
|
+
autosectionlabel_prefix_document = True
|
|
54
|
+
|
|
55
|
+
# -- sphinxcontrib-spelling --
|
|
56
|
+
|
|
57
|
+
spelling_word_list_filename = "spelling-wordlist.txt"
|
|
58
|
+
spelling_show_suggestions = True
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"""
|
|
2
|
+
One interface to docker, podman and Apple's container.
|
|
3
|
+
|
|
4
|
+
Start a container, speak to its standard streams, and get told what went
|
|
5
|
+
wrong in terms you can actually branch on -- with the same code and the
|
|
6
|
+
same answers whichever engine is installed.
|
|
7
|
+
|
|
8
|
+
Each engine is driven via its command line interface, which is the only
|
|
9
|
+
mechanism all three have in common, and which conveniently leaves the
|
|
10
|
+
engine to demultiplex container stdio onto real pipes for us.
|
|
11
|
+
|
|
12
|
+
`anyio` is the only async dependency, so this runs unmodified on both
|
|
13
|
+
asyncio and trio.
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
from imaged._dialects import (
|
|
17
|
+
CONTAINER,
|
|
18
|
+
DOCKER,
|
|
19
|
+
KNOWN,
|
|
20
|
+
PODMAN,
|
|
21
|
+
Dialect,
|
|
22
|
+
)
|
|
23
|
+
from imaged._errors import (
|
|
24
|
+
EngineError,
|
|
25
|
+
EngineFailed,
|
|
26
|
+
EngineNotRunning,
|
|
27
|
+
NoSuchContainer,
|
|
28
|
+
NoSuchEngine,
|
|
29
|
+
NoSuchImage,
|
|
30
|
+
SessionClosed,
|
|
31
|
+
Unsupported,
|
|
32
|
+
)
|
|
33
|
+
from imaged._subprocess import Engine, Session
|
|
34
|
+
|
|
35
|
+
__all__ = [
|
|
36
|
+
"CONTAINER",
|
|
37
|
+
"DOCKER",
|
|
38
|
+
"KNOWN",
|
|
39
|
+
"PODMAN",
|
|
40
|
+
"Dialect",
|
|
41
|
+
"Engine",
|
|
42
|
+
"EngineError",
|
|
43
|
+
"EngineFailed",
|
|
44
|
+
"EngineNotRunning",
|
|
45
|
+
"NoSuchContainer",
|
|
46
|
+
"NoSuchEngine",
|
|
47
|
+
"NoSuchImage",
|
|
48
|
+
"Session",
|
|
49
|
+
"SessionClosed",
|
|
50
|
+
"Unsupported",
|
|
51
|
+
]
|