Skip to main content

dockpy-sdk - Docker SDK with async operations

Project description

dockpy-sdk

Pure Python Docker SDK with async operations and direct Docker Engine API access.

Installation

pip install dockpy-sdk

Features

  • Async/Await: Built on asyncio and httpx
  • Direct API: No subprocess calls, pure HTTP/Unix socket
  • Container Management: Create, start, stop, logs, inspect, and more
  • Image Management: Pull, push, build, tag, remove, and more
  • Type Safe: 100% type hints with mypy support
  • Well Tested: Comprehensive test coverage

Quick Start

from dockpysdk.client import AsyncDockerClient

async def main():
    async with AsyncDockerClient() as client:
        # List containers
        containers = await client.containers.list()
        for container in containers:
            print(f"{container.id}: {container.name}")

import asyncio
asyncio.run(main())

Container Operations

# Create and run a container
container = await client.containers.create(
    "nginx:latest",
    name="my-web-server"
)
await container.start()

# Get logs
logs = await client.containers.logs(container.id)

# Stop and remove
await container.stop()
await container.remove()

Image Operations

# Pull image
image = await client.images.pull("python:3.10")

# List images
images = await client.images.list()

# Build image
async for line in await client.images.build(dockerfile="Dockerfile"):
    print(line)

Documentation

See the main repository for full documentation.

License

Apache License 2.0 - See LICENSE file for details.

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

dockpy_sdk-0.0.1rc5.tar.gz (39.5 kB view details)

Uploaded Source

Built Distribution

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

dockpy_sdk-0.0.1rc5-py3-none-any.whl (47.4 kB view details)

Uploaded Python 3

File details

Details for the file dockpy_sdk-0.0.1rc5.tar.gz.

File metadata

  • Download URL: dockpy_sdk-0.0.1rc5.tar.gz
  • Upload date:
  • Size: 39.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for dockpy_sdk-0.0.1rc5.tar.gz
Algorithm Hash digest
SHA256 ad19c325b048a76960a4295925c7867559c24b78761ca245c38108021c0a6e51
MD5 a71abf96c9af489ad35360c3929584a9
BLAKE2b-256 2d656dec3989c364381530021cdc77f9c6480a62b8aaf5e4a6ad4a8d65bbabc4

See more details on using hashes here.

File details

Details for the file dockpy_sdk-0.0.1rc5-py3-none-any.whl.

File metadata

  • Download URL: dockpy_sdk-0.0.1rc5-py3-none-any.whl
  • Upload date:
  • Size: 47.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for dockpy_sdk-0.0.1rc5-py3-none-any.whl
Algorithm Hash digest
SHA256 c2d6022efb1902e52612cc0a1466248eaaf576124049d1bdbe61714b5600db7e
MD5 bde8616d4cb5a86cd65350d85f1543b5
BLAKE2b-256 18af067c2f2772e5481a251bba524c23d7196483db15d5286e2bbc973c32cb5f

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