Python wrapper to access and control an UrBackup server
Project description
urbackup-server-web-api-wrapper
Python wrapper to access and control an UrBackup server
Installation
Install with:
pip3 install urbackup-server-web-api-wrapper
Usage
Start a full file backup:
import urbackup_api
server = urbackup_api.urbackup_server("http://127.0.0.1:55414/x", "admin", "foo")
server.start_full_file_backup("testclient0")
List clients with no file backup in the last three days:
import urbackup_api
import time
import datetime
server = urbackup_api.urbackup_server("http://127.0.0.1:55414/x", "admin", "foo")
clients = server.get_status()
diff_time = 3*24*60*60 # 3 days
for client in clients:
if client["lastbackup"]=="-" or client["lastbackup"] < time.time() - diff_time:
if client["lastbackup"]=="-" or client["lastbackup"]==0:
lastbackup = "Never"
else:
lastbackup = datetime.datetime.fromtimestamp(client["lastbackup"]).strftime("%x %X")
print("Last file backup at {lastbackup} of client {clientname} is older than three days".format(
lastbackup=lastbackup, clientname=client["name"] ) )
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file urbackup-server-web-api-wrapper-0.11.tar.gz.
File metadata
- Download URL: urbackup-server-web-api-wrapper-0.11.tar.gz
- Upload date:
- Size: 5.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
350b10c2515a002eea7396aac25b6f49042e2ce144361562f2fad3903af59730
|
|
| MD5 |
10b94d3671862baae20edf23dfe25842
|
|
| BLAKE2b-256 |
efa38ba2dc80e1f3ef194b5fe0b1b6604a0f543a15af06dd8a8de8b822b01a9a
|
File details
Details for the file urbackup_server_web_api_wrapper-0.11-py3-none-any.whl.
File metadata
- Download URL: urbackup_server_web_api_wrapper-0.11-py3-none-any.whl
- Upload date:
- Size: 21.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0f0e8744847f0596c990671f7e924d0f285c55ae8ad77c53c1c18bbd3c0bf8e0
|
|
| MD5 |
fd38d01ae4ce783879bb2d8090f56a07
|
|
| BLAKE2b-256 |
9e1d24149c8a0c2c6755c73d4a51c8c44c96756b7886bab170477aceab6e534b
|
Provenance
The following attestation bundles were made for urbackup_server_web_api_wrapper-0.11-py3-none-any.whl:
Publisher:
publish.yml on uroni/urbackup-server-python-web-api-wrapper
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
urbackup_server_web_api_wrapper-0.11-py3-none-any.whl -
Subject digest:
0f0e8744847f0596c990671f7e924d0f285c55ae8ad77c53c1c18bbd3c0bf8e0 - Sigstore transparency entry: 1199128504
- Sigstore integration time:
-
Permalink:
uroni/urbackup-server-python-web-api-wrapper@a1fe1cd2c1945c656f61009fa56b18b9fa3871d2 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/uroni
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a1fe1cd2c1945c656f61009fa56b18b9fa3871d2 -
Trigger Event:
push
-
Statement type: