Skip to main content

Library for idempotent writing to files.

Project description

python3-cyberfusion-file-support

Library for idempotent writing to files.

Install

PyPI

Run the following command to install the package from PyPI:

pip3 install python3-cyberfusion-file-support

Debian

Run the following commands to build a Debian package:

mk-build-deps -i -t 'apt -o Debug::pkgProblemResolver=yes --no-install-recommends -y'
dpkg-buildpackage -us -uc

Configure

No configuration is supported.

Usage

Example

from cyberfusion.QueueSupport import Queue
from cyberfusion.FileSupport import DestinationFileReplacement

queue = Queue()

tmp_file = DestinationFileReplacement(
    queue,
    contents="foobar",
    destination_file_path="/tmp/foobar.txt",
    default_comment_character=None,
    command=["true"],
)

print(tmp_file.differences)

tmp_file.add_copy_to_queue()

queue.process(preview=...)

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

python3_cyberfusion_file_support-1.2.tar.gz (3.9 kB view hashes)

Uploaded Source

Built Distribution

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page