Skip to main content

atomistic-cookbook-utils

Small shared utilities used by the recipes in the Atomistic Cookbook.

The goal is to keep recipe code focused on the science: any boilerplate that would otherwise be copy-pasted across many recipes lives here.

Installation

pip install atomistic-cookbook-utils

For a recipe's environment.yml, add it under pip: with a semantic version range, e.g.

- atomistic-cookbook-utils >=0.1,<0.2

Contents

download_with_retry

Download a file with automatic retries on transient HTTP errors (429, 500, 502, 503, 504). Skips the download if the file already exists, creates parent directories as needed.

from atomistic_cookbook_utils import download_with_retry

download_with_retry(
    "https://zenodo.org/records/10566825/files/gaas_training.xyz",
    "data/gaas_training.xyz",
)

run_command

Run a shell-like command string without invoking a shell. The string is split with shlex.split, so quoting works as expected; pipes, redirection and globs do not — for those, use subprocess directly.

By default the child inherits the parent's stdout and stderr. Pass print_output=True to capture the command's combined output and re-emit it via print() — this makes the output visible in sphinx-gallery rendered cells (which capture sys.stdout but not raw file-descriptor writes from child processes).

from atomistic_cookbook_utils import run_command

run_command("mtt train options.yaml")
run_command("ls -la", cwd="data", print_output=True)

Source

This package is developed inside the cookbook repository at src/atomistic-cookbook-utils/. See CONTRIBUTING.rst at the repo root for development workflow.

Metadata

Release files for atomistic-cookbook-utils 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for atomistic-cookbook-utils 0.1.0
File Size Uploaded
atomistic_cookbook_utils-0.1.0.tar.gz 5.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for atomistic-cookbook-utils 0.1.0
File Interpreter ABI Platform
atomistic_cookbook_utils-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 10.8 kB

Release files / atomistic_cookbook_utils-0.1.0.tar.gz

Download URL atomistic_cookbook_utils-0.1.0.tar.gz
Size 5.7 kB
Tags Source
SHA-256 checksum
How to use checksums
65d6aa94d75cfeefd395e2c78e46ad9384268d0386f26ff17e191e81015d1036
BLAKE2b-256 checksum
How to use checksums
13523e758957345601747d498f87468505b3c6cb65464b78597815f4ac21a6af
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 16, 2026.

Transparency log

Release files / atomistic_cookbook_utils-0.1.0-py3-none-any.whl

Download URL atomistic_cookbook_utils-0.1.0-py3-none-any.whl
Size 5.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
56603cfa35f77935f3e19623a6157940603b70a2d4ac08abea0f12f11aa0c66d
BLAKE2b-256 checksum
How to use checksums
2e7fb707df1fd45d772815b2d4c6e600c3b0ab05381a75441a6d777c23f511ff
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 16, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page