Skip to main content

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


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.3.0.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dockwershell-0.3.0-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file dockwershell-0.3.0.tar.gz.

File metadata

  • Download URL: dockwershell-0.3.0.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for dockwershell-0.3.0.tar.gz
Algorithm Hash digest
SHA256 ee886debe2b373062ac801f659c52637a4bcaaa3b29165c8687c443cd2a3a024
MD5 c72d5c3e48df39c4dc38d9e912f5ddce
BLAKE2b-256 3dac20fde126e1ecc2276340d95a1ea20d4be188f0a73875e5b27af4a935c624

See more details on using hashes here.

File details

Details for the file dockwershell-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: dockwershell-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 5.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for dockwershell-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f84c031ee4374ab64d20ad861fd9665f8178f253d2d2b37c6d4bdcea81800d00
MD5 90ddc0b34c221ff422859fe19a05499b
BLAKE2b-256 b532689dfa8332fb41829e7af0e67c6e1a48035db6d5d9d1c029d247747319bd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page