Skip to main content

Library for interfacing with Backup-chan.

Project description

Backup-chan client library

PyPI - License PyPI - Python Version PyPI - Version

This is the Python library for interfacing with a Backup-chan server.

Installing

# The easy way
pip install backupchan-client-lib

# Install from source
git clone https://github.com/Backupchan/client-lib.git backupchan-client-lib
cd backupchan-client-lib
pip install .

For instructions on setting up the server, refer to Backup-chan server's README.

Testing

pytest

Example

from backupchan import *

# Connect to a server
api = API("http://192.168.1.43", 5000, "your api key")

# Print every target
targets = api.list_targets()
for target in targets:
    print(target)

# Create a new target
target_id = api.new_target(
    "the waifu collection", # name
    BackupType.MULTI,
    BackupRecycleCriteria.AGE,
    10, # recycle value
    BackupRecycleAction.RECYCLE,
    "/var/backups/waifu", # location
    "wf-$I_$D", # name template
    False, # deduplicate
    None # alias
)
target = api.get_target(target_id)
print(f"Created new target: {target}")

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

backupchan_client_lib-1.5.1.tar.gz (8.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

backupchan_client_lib-1.5.1-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

Details for the file backupchan_client_lib-1.5.1.tar.gz.

File metadata

  • Download URL: backupchan_client_lib-1.5.1.tar.gz
  • Upload date:
  • Size: 8.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.1

File hashes

Hashes for backupchan_client_lib-1.5.1.tar.gz
Algorithm Hash digest
SHA256 cdcf0c9c7c9e5a7525f88e506e948456aa8d473f8d4d178fed7e26e6a8a1f5be
MD5 0549402c7a87d0f6649d74d7f8bad114
BLAKE2b-256 c054d54bf33e27c64d51fa0c04dc2edb4e6192464a47b95a4e7d16ef455def68

See more details on using hashes here.

File details

Details for the file backupchan_client_lib-1.5.1-py3-none-any.whl.

File metadata

File hashes

Hashes for backupchan_client_lib-1.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d06e3f0da108178d3a222db37c9b71d8759b5da65c57781df8f4146087980842
MD5 bd06b08e23670d35055acb8bf13e1d3d
BLAKE2b-256 4e603ef3f73ce71d3c535dd4ccc78535af8142dcd6d3ed4149ecbc92bc496e59

See more details on using hashes here.

Supported by

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