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.0.tar.gz (4.8 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.0-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dockwershell-0.5.0.tar.gz
  • Upload date:
  • Size: 4.8 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.0.tar.gz
Algorithm Hash digest
SHA256 508c5f3989d62daa56a92e35aca60f29e36fba9b6f699932e226d7d6f060fb59
MD5 2ae06c80e992bfe6049f9cf94b499a16
BLAKE2b-256 648554027c3ad910e015ade247b5da35b54b8f70e581078297c3dee17ec5e8c6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dockwershell-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 6.0 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 da004f56e0983dd0e1feffa115694c3c35a90eb67e06a4597926f14e8d4387a4
MD5 de9d73716b6f6be400819a7379d68085
BLAKE2b-256 a5675b2cd0c1f039a4df320f5f1d6eaedbe36bcf4e611d59843ff016f68b08be

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