diff options
author | Joerg Steffens <joerg.steffens@bareos.com> | 2020-04-14 11:29:46 +0300 |
---|---|---|
committer | Andreas Rogge <andreas.rogge@bareos.com> | 2020-04-14 14:04:28 +0300 |
commit | ca41c8de2de21a1bb5962b945a8e1b2398ce5c0d (patch) | |
tree | 4a0729bf3463afef76594d3e99d57592ba4b066a /python-bareos | |
parent | 2508c1c1981f4f242e66080da9380efe0636647a (diff) |
python-bareos: adapted to be published at PyPI.
(cherry picked from commit 5475451f5eb819c86db30c5209092d5a43aafba2)
Diffstat (limited to 'python-bareos')
-rw-r--r-- | python-bareos/README.rst | 34 | ||||
-rw-r--r-- | python-bareos/setup.py | 20 |
2 files changed, 31 insertions, 23 deletions
diff --git a/python-bareos/README.rst b/python-bareos/README.rst index cbe75cbe9..35711c97c 100644 --- a/python-bareos/README.rst +++ b/python-bareos/README.rst @@ -1,17 +1,21 @@ python-bareos ============= -Python module to access a http://www.bareos.org backup system. +`python-bareos` is a Python module to access a http://www.bareos.org backup system. -`python-bareos` packages are included in the Bareos core distribution since Bareos >= 17.2. +Packages for `python-bareos` are included in the Bareos core distribution since Bareos >= 17.2. + + +Optional Requirements +===================== TLS-PSK ------- -Since Bareos >= 18.2.4 can secure its connections via TLS-PSK (Transport-Layer-Security Pre-Shared-Key). +Since Bareos >= 18.2.4, Bareos can use TLS-PSK (Transport-Layer-Security Pre-Shared-Key) to secure its network connections. This subset of TLS is currently not supported by the Python SSL module. -To enable this feature in `python-bareos` the Python module 'sslpsk` must be installed: +To enable this feature in `python-bareos` the Python module `sslpsk` must be installed: .. code:: @@ -19,7 +23,8 @@ To enable this feature in `python-bareos` the Python module 'sslpsk` must be ins - +Examples +======== Calling bareos-director user agent commands ------------------------------------------- @@ -27,9 +32,8 @@ Calling bareos-director user agent commands .. code:: python import bareos.bsock - - password=bareos.bsock.Password('secret') - directorconsole=bareos.bsock.DirectorConsole(address='localhost', port=9101, password=password) + password = bareos.bsock.Password('secret') + directorconsole = bareos.bsock.DirectorConsole(address='localhost', port=9101, password=password) print directorconsole.call('help') ... @@ -37,7 +41,7 @@ To connected to a named console instead, use the `name` parameter: .. code:: python - password=bareos.bsock.Password('secret') + password = bareos.bsock.Password('secret') directorconsole=bareos.bsock.DirectorConsole(address='localhost', port=9101, name='user1', password=password) @@ -48,8 +52,8 @@ Simple version of the bconsole in Python .. code:: python import bareos.bsock - password=bareos.bsock.Password('secret') - directorconsole=bareos.bsock.DirectorConsole(address='localhost', port=9101, password=password) + password = bareos.bsock.Password('secret') + directorconsole = bareos.bsock.DirectorConsole(address='localhost', port=9101, password=password) directorconsole.interactive() ... @@ -60,7 +64,7 @@ or use the included bconsole.py script: bconsole.py --debug --name=user1 --password=secret --port 9101 localhost -Use JSON objects of API mode 2 +Use JSON objects of the API mode 2 ---------------------------------- Requires: Bareos >= 15.2 @@ -68,7 +72,7 @@ Requires: Bareos >= 15.2 .. code:: python import bareos.bsock - password=bareos.bsock.Password('secret') - directorconsole=bareos.bsock.DirectorConsoleJson(address='localhost', port=9101, password=password) - directorconsole.call('list pools') + password = bareos.bsock.Password('secret') + directorconsole = bareos.bsock.DirectorConsoleJson(address='localhost', port=9101, password=password) + pools = directorconsole.call('list pools') ... diff --git a/python-bareos/setup.py b/python-bareos/setup.py index e52fa8dd1..824b6668d 100644 --- a/python-bareos/setup.py +++ b/python-bareos/setup.py @@ -9,7 +9,7 @@ def get_version(): try: with open( - os.path.join(base_dir, "python-bareos", "VERSION.txt") + os.path.join(base_dir, "bareos", "VERSION.txt") ) as version_file: __version__ = version_file.read().strip() except IOError: @@ -24,24 +24,28 @@ def get_version(): setup( name="python-bareos", version=get_version(), + license="AGPLv3", author="Bareos Team", author_email="packager@bareos.com", packages=find_packages(), scripts=["bin/bconsole.py", "bin/bconsole-json.py", "bin/bareos-fd-connect.py"], package_data={"bareos": ["VERSION.txt"]}, - url="https://github.com/bareos/python-bareos/", + url="https://github.com/bareos/bareos/", # What does your project relate to? keywords="bareos", - description="Network socket connection to the Bareos backup system.", + description="Client library and tools for Bareos console access.", long_description=open("README.rst").read(), + long_description_content_type='text/x-rst', # Python 2.6 is used by RHEL/Centos 6. # When RHEL/Centos 6 is no longer supported (End of 2020), # Python 2.6 will no longer be supported by python-bareos. python_requires=">=2.6", - install_requires=[ - #'hmac', - #'socket', - "python-dateutil" - ], extras_require={"TLS-PSK": ["sslpsk"]}, + classifiers=[ + "Development Status :: 5 - Production/Stable", + "License :: OSI Approved :: GNU Affero General Public License v3", + "Operating System :: OS Independent", + "Programming Language :: Python", + "Topic :: System :: Archiving :: Backup", + ], ) |