Skip to main content

Python wrapper for dtach with built-in binary management

Project description

dtachwrap

Python wrapper for dtach with built-in binary management and multi-task CLI. It packages the dtach binary in the wheel (Linux x86_64 / aarch64), so it works out of the box without compilation during installation.

Features

  • Portable: Includes pre-compiled dtach binaries (GPL compliant).
  • Easy Management: start, attach, ls, logs, stop commands.
  • Logging: Automatically captures stdout/stderr to files.
  • Recovery: Keeps tasks running even if you disconnect.

Installation

pip install dtachwrap

Or run directly with uvx:

uvx dtachwrap start my-task -- python script.py

Usage

Start a task

dtachwrap start train-exp1 -- python train.py --cfg exp1.yaml

The task runs in the background.

  • Socket: ~/.dtachwrap/sockets/train-exp1
  • Logs: ~/.dtachwrap/logs/train-exp1.out

List tasks

dtachwrap ls

Shows running tasks. Use dtachwrap ls --all to see stopped tasks.

View logs

dtachwrap logs train-exp1 -f

Attach to a task

dtachwrap attach train-exp1
  • Detach key: ^\ (Ctrl+)
  • Redraw: Ctrl+l

Stop a task

dtachwrap stop train-exp1

License

This project is licensed under MIT. The bundled dtach binary is GPL-2.0. See src/dtachwrap/_vendor/licenses/DTACH_COPYING.

Development

This project uses uv for dependency management.

  1. Setup:

    uv sync
    
  2. Run locally:

    uv run dtachwrap --help
    
  3. Build:

    uv build
    

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

dtachwrap-0.1.0.post1.tar.gz (92.3 kB view details)

Uploaded Source

Built Distributions

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

dtachwrap-0.1.0.post1-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (109.3 kB view details)

Uploaded PyPymanylinux: glibc 2.17+ ARM64

dtachwrap-0.1.0.post1-pp310-pypy310_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (108.8 kB view details)

Uploaded PyPymanylinux: glibc 2.17+ x86-64manylinux: glibc 2.5+ x86-64

dtachwrap-0.1.0.post1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (109.3 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ ARM64

dtachwrap-0.1.0.post1-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (108.8 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64manylinux: glibc 2.5+ x86-64

dtachwrap-0.1.0.post1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (109.3 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ ARM64

dtachwrap-0.1.0.post1-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (108.8 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64manylinux: glibc 2.5+ x86-64

dtachwrap-0.1.0.post1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (109.3 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ ARM64

dtachwrap-0.1.0.post1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (108.8 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64manylinux: glibc 2.5+ x86-64

File details

Details for the file dtachwrap-0.1.0.post1.tar.gz.

File metadata

  • Download URL: dtachwrap-0.1.0.post1.tar.gz
  • Upload date:
  • Size: 92.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for dtachwrap-0.1.0.post1.tar.gz
Algorithm Hash digest
SHA256 e9dcbff50386129754fbd51e3c38ed8fbd69f3661a359def5dc38a32714689a3
MD5 573cc176aabcb6989c77779062c38162
BLAKE2b-256 bfd9ded55e29f3b47796c6615fc1775297f5480fa7331f7a26bf95a86ecbe9f5

See more details on using hashes here.

Provenance

The following attestation bundles were made for dtachwrap-0.1.0.post1.tar.gz:

Publisher: wheels.yml on HarborYuan/dtachwrap

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dtachwrap-0.1.0.post1-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for dtachwrap-0.1.0.post1-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 15a5400212d25b125a5ff605a79c0ff21ffa498066003e2cc132bb4cf06ce87e
MD5 11ef7911c9da6bf487c81bfbac74a8bb
BLAKE2b-256 2c91bbdb327dc225767b82555c4cfbb5de5f2781fc2489489d18d592494f2041

See more details on using hashes here.

Provenance

The following attestation bundles were made for dtachwrap-0.1.0.post1-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: wheels.yml on HarborYuan/dtachwrap

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dtachwrap-0.1.0.post1-pp310-pypy310_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for dtachwrap-0.1.0.post1-pp310-pypy310_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f9aa05b4290a69e542cb74b2799f0ad0d3317a18dd2a744d51a17ad4f6449e81
MD5 98d89bb3cb369e813e7efe18fb38f8c5
BLAKE2b-256 9cdf8c3cd3ef6bb1b4503962782e7b5710d759f00c4e4bd6cb4bb28a25bbb2dd

See more details on using hashes here.

Provenance

The following attestation bundles were made for dtachwrap-0.1.0.post1-pp310-pypy310_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: wheels.yml on HarborYuan/dtachwrap

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dtachwrap-0.1.0.post1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for dtachwrap-0.1.0.post1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 e5c41642f99e8e82d6580e55cc0faede77582336099ce9d9e209fc55eba95674
MD5 3fd578b52808d99beef28cca3aa37960
BLAKE2b-256 36aa741895f30ec7e6a03c2e1c262955625e40f2a4828784537b0f2ec4be1a12

See more details on using hashes here.

Provenance

The following attestation bundles were made for dtachwrap-0.1.0.post1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: wheels.yml on HarborYuan/dtachwrap

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dtachwrap-0.1.0.post1-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for dtachwrap-0.1.0.post1-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 7591794eeb55a71df1a30861042a451b211272476faccb607fc4086e0883d589
MD5 45fa10156e421ada2c557f7730403e80
BLAKE2b-256 91b091a3cc8ef48668cd75ed5cf039a0af0455ca38bc4b78029c6ace49c72c30

See more details on using hashes here.

Provenance

The following attestation bundles were made for dtachwrap-0.1.0.post1-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: wheels.yml on HarborYuan/dtachwrap

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dtachwrap-0.1.0.post1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for dtachwrap-0.1.0.post1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 e9952dc489f67a1fd94c5e8fdc6e60600ca7945983c67873e95672e40051665d
MD5 2edd644edc32b0b4799a078e9b570ea4
BLAKE2b-256 105d2101ea159c0492baa2ec20a28b8163db6036262e07b1b6cd819b1027e57b

See more details on using hashes here.

Provenance

The following attestation bundles were made for dtachwrap-0.1.0.post1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: wheels.yml on HarborYuan/dtachwrap

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dtachwrap-0.1.0.post1-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for dtachwrap-0.1.0.post1-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e5304510c12f1220b112c8224a0c029e1cf2c02e920164c39eba540c48785a47
MD5 253e33b41240932b7d96ba40344429ff
BLAKE2b-256 a00d72949cdf2bf17769f40d11460db37f560d4f3611870a5f87c7a3c5d745b0

See more details on using hashes here.

Provenance

The following attestation bundles were made for dtachwrap-0.1.0.post1-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: wheels.yml on HarborYuan/dtachwrap

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dtachwrap-0.1.0.post1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for dtachwrap-0.1.0.post1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 14cda037a8bd606fd5be88a386a9e358dd311e3553e5a3e33a19982d5cdfb8c1
MD5 206643062fcfa0dc02ff78542070f978
BLAKE2b-256 01cc3d983839211314d5461d36718bbc19d41ee18ceea5b6a13128df740886c4

See more details on using hashes here.

Provenance

The following attestation bundles were made for dtachwrap-0.1.0.post1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: wheels.yml on HarborYuan/dtachwrap

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dtachwrap-0.1.0.post1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for dtachwrap-0.1.0.post1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8a8112b0eb5670bf68602bb7a93cc66d0b82004de7db1836e2c0cf1c6142d506
MD5 cbee65979658e5622744e28c5685817b
BLAKE2b-256 b8f427da6140726426211b7835a479afa6451310cfccdff149eb60ec0948a1fc

See more details on using hashes here.

Provenance

The following attestation bundles were made for dtachwrap-0.1.0.post1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: wheels.yml on HarborYuan/dtachwrap

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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