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.5.4.tar.gz (4.9 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.5.4-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for dockwershell-0.5.4.tar.gz
Algorithm Hash digest
SHA256 06c9ba661805a8dc279de238b515f1dec0dcb4d9aa9d857b2e08148e5580254c
MD5 1b487bd6aa5a099c1a7957f694103036
BLAKE2b-256 206433c1bacccb5a5e456945adf08a7b749922956db4fe6caf5eeb9da11cfa92

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dockwershell-0.5.4-py3-none-any.whl
  • Upload date:
  • Size: 6.3 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.5.4-py3-none-any.whl
Algorithm Hash digest
SHA256 e97192d5404e43b13293181a3dc91935acb4fafcd0e8d37b645460b1670fd2e7
MD5 5def58b14bb9d12b7b3be58d9aa3d9df
BLAKE2b-256 2d167cec7e18ed32c643cc2c1fd5ab743c43a3ed32b5fc693ef41c62b87f216d

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