Install & Compatibility
Where this runs
tested against v0.0.7 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.910 runs
installs and imports cleanly · install 0.0s · import 0.000s · 19.2MB
glibcpy 3.10–3.910 runs
installs and imports cleanly · install 2.4s · import 0.000s · 20MB
17MB installed
● package 17MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
read_file
✓ from dacktool.files import read_file
✗ from dacktool import read_file
Functions like 'read_file' are nested within submodules like 'files'.
convert_json_to_dict
✓ from dacktool.convert import convert_json_to_dict
✗ from dacktool import convert_json_to_dict
Functions are imported directly from their respective submodules.
hash_password
✓ from dacktool.security import hash_password
✗ import dacktool.security; dacktool.security.hash_password()
Prefer direct import of the function for clarity over submodule access.
This quickstart demonstrates how to use the `convert_json_to_dict` function for JSON string conversion and `write_file`/`read_file` for basic file operations. It creates a temporary file and cleans it up afterwards.
from dacktool.convert import convert_json_to_dict
json_data_string = '{"name": "Alice", "age": 30, "city": "New York"}'
python_dict = convert_json_to_dict(json_data_string)
print(f"JSON String: {json_data_string}")
print(f"Python Dictionary: {python_dict}")
print(f"Type of result: {type(python_dict)}")
# Example using files module (requires creating a dummy file)
from dacktool.files import write_file, read_file
import os
file_path = 'my_temp_file.txt'
content = 'Hello from dacktool!'
write_file(file_path, content)
read_content = read_file(file_path)
print(f"\nContent written to '{file_path}': {content}")
print(f"Content read from '{file_path}': {read_content}")
os.remove(file_path) # Clean up the dummy file
dacktool --version
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'dacktool'
The dacktool library is not installed in the current Python environment.
fixInstall the library using pip: `pip install dacktool`
AttributeError: module 'dacktool' has no attribute 'read_file'
Attempting to import a function (like `read_file`) directly from the top-level `dacktool` package when it resides in a submodule (e.g., `dacktool.files`).
fixImport the function from its specific submodule: `from dacktool.files import read_file`.
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
The input string provided to `convert_json_to_dict` is not valid JSON.
fixEnsure the input string is a correctly formatted JSON string, e.g., `'{"key": "value"}'`. FileNotFoundError: [Errno 2] No such file or directory: 'non_existent_file.txt'
The file path specified for `read_file` or `write_file` does not exist or is incorrect, and the operation requires the file to be present (e.g., `read_file`) or the directory to exist.
fixVerify the file path is correct and accessible. If reading, ensure the file exists. If writing, ensure the parent directory exists or create it first.
Upgrade
Version history
0.0.7latest on PyPI · released Aug 2, 2020
Audit
Dependencies
No dependency data recorded yet.
Resources
No resource links recorded.