darca-file-utils is a Python utility library providing robust, reusable helpers for file and directory manipulation. It includes safe wrappers for common operations like reading, writing, copying, moving, renaming, and deleting files and directories, with rich exception handling and structured logging using the darca framework.
Features
✅ File utilities: check, read, write, remove, rename, move, and copy
📁 Directory utilities: create, list, move, rename, remove, and copy
🚨 Structured error handling via DarcaException
🧪 100% test coverage with pytest, coverage, and parallel test execution
🧹 Integrated pre-commit hooks for consistent code quality
📦 Isolated virtual environment and Poetry setup
Installation
Clone the repository and install dependencies using the Makefile:
make install
This will set up Poetry in an isolated virtual environment at /tmp/darca-log-venv.
Quickstart
from darca_file_utils.file_utils import FileUtils
from darca_file_utils.directory_utils import DirectoryUtils
FileUtils.write_file("example.txt", "Hello world!")
print(FileUtils.read_file("example.txt"))
DirectoryUtils.create_directory("test_folder")
Running Tests
make test
Generates full coverage reports in terminal, HTML, and JSON.
Creates a coverage badge (coverage.svg) saved to docs/source/_static.
Check Everything
Run all checks before committing:
make check
This runs formatting, pre-commit, and tests in sequence.
Documentation
To build the Sphinx documentation locally:
make docs
Output is generated in docs/build/html.
Continuous Integration
GitHub Actions uses:
make ci
This target is optimized for CI/CD environments and runs pre-commit, tests, and docs builds.
License
MIT License. See LICENSE for details.
Release files for darca-file-utils 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| darca_file_utils-0.1.1.tar.gz | 5.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| darca_file_utils-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 14.0 kB
Release files / darca_file_utils-0.1.1.tar.gz
| Download URL | darca_file_utils-0.1.1.tar.gz |
|---|---|
| Size | 5.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b24f4fa16cf824a2bc971dff2140cfdd475d204cc15f0c22d91692be0fcd7847
|
|
BLAKE2b-256 checksum How to use checksums |
8bb7cc00730f74c2669ee66391689fb9fff5bdd2b13b10afb5dbfbaad4564781
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
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 31, 2025.
Transparency logRelease files / darca_file_utils-0.1.1-py3-none-any.whl
| Download URL | darca_file_utils-0.1.1-py3-none-any.whl |
|---|---|
| Size | 8.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c01e90dcc1cccb535402971ba5ddf8e56d7d0fc3e2efbbcd0742bc3b10fe1a5a
|
|
BLAKE2b-256 checksum How to use checksums |
1064bf8292e5ae7171db508cd4fbf7988831bad70c0c8356c268425b058e8424
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
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 31, 2025.
Transparency log