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
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
dockpy_sdk-0.0.1.dev1.tar.gz
(29.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 dockpy_sdk-0.0.1.dev1.tar.gz.
File metadata
- Download URL: dockpy_sdk-0.0.1.dev1.tar.gz
- Upload date:
- Size: 29.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
00ad0b9447b9e3beeaa686e0921277d8070d80c3c7c28055ac8200dfa79c86c0
|
|
| MD5 |
baf9fa42d4cad6e6dce1a5953280ecf9
|
|
| BLAKE2b-256 |
f0c621758f47dfbf514ac69279e78074add432ee3d337d4eaac5a94d9245397b
|
File details
Details for the file dockpy_sdk-0.0.1.dev1-py3-none-any.whl.
File metadata
- Download URL: dockpy_sdk-0.0.1.dev1-py3-none-any.whl
- Upload date:
- Size: 36.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b0c9b39d29570002a9221510ec35713f3f7bc07252700c27ea996a2953f0db1d
|
|
| MD5 |
6725ebc6dbae86e8155a8ee0bf171417
|
|
| BLAKE2b-256 |
c285233ea157096dd8227b49f71a9fa5d035334a3dd89558de0bd70139032691
|