Metadata-Version: 1.1
Name: urbackup-server-web-api-wrapper
Version: 0.4
Summary: Python wrapper to access and control an UrBackup server
Home-page: https://github.com/uroni/urbackup-server-python-web-api-wrapper
Author: Martin Raiber
Author-email: martin@urbackup.org
License: Apache License 2.0
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:
        
        ```python
        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:
        
        ```python
        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"] ) )
        ```
        
        
Keywords: urbackup web api client
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
