Asynchronous _Docker management for WSL2 using pywershell
Project description
DockwerShell
Asynchronous _Docker management for Debian-based WSL2 using the [pywershell] engine under the hood.
import asyncio
from dockwershell.core import AsyncDocker
async def main():
# get singleton instance
docker = await AsyncDocker.get()
# print version (auto-installs if needed)
version = await docker.version
print("_Docker version:", version)
# list images
images = await docker.images
print("Available images:", images)
# run an ad‐hoc command
await docker.run("ps -a")
from pathlib import Path
from dockwershell.manager import DockerManager
async def build_and_run():
mgr = DockerManager()
img = await mgr.new(
dockerfile=Path("Dockerfile.app"),
build_args="ENV=prod",
rebuild=False,
run_args="-d -p 8000:8000"
)
result = await img.run()
print(result.str)
asyncio.run(build_and_run())
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
dockwershell-0.6.tar.gz
(4.6 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dockwershell-0.6.tar.gz.
File metadata
- Download URL: dockwershell-0.6.tar.gz
- Upload date:
- Size: 4.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d1e048d5399d758f5ba69ff3458f5b44f547226b0fdfe9f54c75afdb7d32e65c
|
|
| MD5 |
f18e70209ce009ee6040bd05a06897da
|
|
| BLAKE2b-256 |
a664349ebad07da31608447a7701fbb1e5dc89608d545b92287dc02b6464c7ca
|
File details
Details for the file dockwershell-0.6-py3-none-any.whl.
File metadata
- Download URL: dockwershell-0.6-py3-none-any.whl
- Upload date:
- Size: 5.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
970b8dd90dbe4d3ec14687868495a4d30d98bf5fffa01f3cffb6730f8afc9a70
|
|
| MD5 |
d9694a3ec00f68608d79e7b8a516ae9b
|
|
| BLAKE2b-256 |
76bf128e1e3957ba241ef60e739e7edba1a131ea1b44d8ea6149fec1788b639c
|