Backup-chan client library
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}")
Metadata
Release files for backupchan-client-lib 1.5.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 | |
|---|---|---|---|
| backupchan_client_lib-1.5.1.tar.gz | 8.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| backupchan_client_lib-1.5.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 16.5 kB
Release files / backupchan_client_lib-1.5.1.tar.gz
| Download URL | backupchan_client_lib-1.5.1.tar.gz |
|---|---|
| Size | 8.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cdcf0c9c7c9e5a7525f88e506e948456aa8d473f8d4d178fed7e26e6a8a1f5be
|
|
BLAKE2b-256 checksum How to use checksums |
c054d54bf33e27c64d51fa0c04dc2edb4e6192464a47b95a4e7d16ef455def68
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.1
|
Release files / backupchan_client_lib-1.5.1-py3-none-any.whl
| Download URL | backupchan_client_lib-1.5.1-py3-none-any.whl |
|---|---|
| Size | 7.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d06e3f0da108178d3a222db37c9b71d8759b5da65c57781df8f4146087980842
|
|
BLAKE2b-256 checksum How to use checksums |
4e603ef3f73ce71d3c535dd4ccc78535af8142dcd6d3ed4149ecbc92bc496e59
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.1
|