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.2.0.tar.gz
(4.1 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.2.0.tar.gz.
File metadata
- Download URL: dockwershell-0.2.0.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
86431647b5d298b3870597c3c66f1e240813df2f18b9ab7823a8bcd468629efa
|
|
| MD5 |
e24b4ce41673c5557900f129c9eab8d1
|
|
| BLAKE2b-256 |
9c461f8b3043c8cbae679b111a259c2a98ba8eab0ebf0ceb9a1ed943b635d85f
|
File details
Details for the file dockwershell-0.2.0-py3-none-any.whl.
File metadata
- Download URL: dockwershell-0.2.0-py3-none-any.whl
- Upload date:
- Size: 5.2 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 |
f34c1168d2b28415751a3dacfc4d964d16102544ccad9854a7378c617c2ac40c
|
|
| MD5 |
756a8b2c038a84d644f9136a7ab4f6a5
|
|
| BLAKE2b-256 |
a0374b525510e6d0b8772dd5bf944310d45a42e3e77dd321579a80a6165471c0
|