Skip to content

Backupchan/presets

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Backup-chan presets

This is a library for creating presets for backups. A preset allows to define the destination target and what file on the system to upload, under a unique name.

Installing

# The easy way
pip install backupchan-presets

# Installing from source
git clone https://github.com/Backupchan/presets.git backupchan-presets
cd backupchan-presets
pip install .

Testing

pytest

Example usage

from backupchan_presets import Presets
from backupchan import API

api = API("host", 8000, "api-key")

# Create a new preset.
presets = Presets()
presets.add("myPreset", "00000000-0000-0000-0000-000000", "/home/me/Documents/stuff")
presets.save() # Save it into the configuration file.
presets["myPreset"].upload(api, False)

# Or load existing presets from a file.
presets.load()
presets["anotherPreset"].upload(api, False)

About

Presets library for Backup-chan.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages