1Metadata-Version: 2.1 2Name: python-gvm 3Version: 21.10.0 4Summary: Library to communicate with remote servers over GMP or OSP 5Home-page: https://github.com/greenbone/python-gvm 6License: GPL-3.0-or-later 7Author: Greenbone Networks GmbH 8Author-email: info@greenbone.net 9Requires-Python: >=3.7.0,<4.0.0 10Classifier: Development Status :: 5 - Production/Stable 11Classifier: Environment :: Console 12Classifier: Intended Audience :: Developers 13Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+) 14Classifier: Operating System :: OS Independent 15Classifier: Programming Language :: Python :: 3 16Classifier: Programming Language :: Python :: 3.10 17Classifier: Programming Language :: Python :: 3.7 18Classifier: Programming Language :: Python :: 3.8 19Classifier: Programming Language :: Python :: 3.9 20Classifier: Topic :: Software Development :: Libraries :: Python Modules 21Requires-Dist: defusedxml (>=0.6,<0.8) 22Requires-Dist: lxml (>=4.5.0,<5.0.0) 23Requires-Dist: paramiko (>=2.7.1,<3.0.0) 24Project-URL: Documentation, https://python-gvm.readthedocs.io/ 25Project-URL: Repository, https://github.com/greenbone/python-gvm 26Description-Content-Type: text/markdown 27 28![Greenbone Logo](https://www.greenbone.net/wp-content/uploads/gb_logo_resilience_horizontal.png) 29 30# Greenbone Vulnerability Management Python Library <!-- omit in toc --> 31 32[![GitHub releases](https://img.shields.io/github/release-pre/greenbone/python-gvm.svg)](https://github.com/greenbone/python-gvm/releases) 33[![PyPI release](https://img.shields.io/pypi/v/python-gvm.svg)](https://pypi.org/project/python-gvm/) 34[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/greenbone/python-gvm/badges/quality-score.png?b=main)](https://scrutinizer-ci.com/g/greenbone/python-gvm/?branch=main) 35[![code test coverage](https://codecov.io/gh/greenbone/python-gvm/branch/main/graph/badge.svg)](https://codecov.io/gh/greenbone/python-gvm) 36[![Build and test](https://github.com/greenbone/python-gvm/actions/workflows/ci-python.yml/badge.svg)](https://github.com/greenbone/python-gvm/actions/workflows/ci-python.yml) 37 38The Greenbone Vulnerability Management Python API library (**python-gvm**) is a 39collection of APIs that help with remote controlling a Greenbone Security 40Manager (GSM) appliance and its underlying Greenbone Vulnerability Manager 41(GVM). The library essentially abstracts accessing the communication protocols 42Greenbone Management Protocol (GMP) and Open Scanner Protocol (OSP). 43 44## Table of Contents <!-- omit in toc --> 45 46- [Documentation](#documentation) 47- [Installation](#installation) 48 - [Requirements](#requirements) 49 - [Install using pip](#install-using-pip) 50- [Example](#example) 51- [Support](#support) 52- [Maintainer](#maintainer) 53- [Contributing](#contributing) 54- [License](#license) 55 56## Documentation 57 58The documentation for python-gvm can be found at 59[https://python-gvm.readthedocs.io/](https://python-gvm.readthedocs.io/en/latest/). 60Please always take a look at the documentation for further details. This 61**README** just gives you a short overview. 62 63## Installation 64 65### Version 66 67Please consider to always use the **newest** version of `gvm-tools` and `python-gvm`. 68We freqently update this projects to add features and keep them free from bugs. 69This is why installing `python-gvm` using pip is recommended. 70 71**To use `python-gvm` with an old GMP version (7, 8, 9) you must use a release version** 72**that is `<21.05`. In the `21.05` release the support of these versions have been dropped.** 73 74### Requirements 75 76Python 3.7 and later is supported. 77 78### Install using pip 79 80pip 19.0 or later is required. 81 82You can install the latest stable release of python-gvm from the Python Package 83Index using [pip](https://pip.pypa.io/): 84 85 python3 -m pip install --user python-gvm 86 87## Example 88 89```python3 90from gvm.connections import UnixSocketConnection 91from gvm.protocols.gmp import Gmp 92from gvm.transforms import EtreeTransform 93from gvm.xml import pretty_print 94 95connection = UnixSocketConnection() 96transform = EtreeTransform() 97 98with Gmp(connection, transform=transform) as gmp: 99 # Retrieve GMP version supported by the remote daemon 100 version = gmp.get_version() 101 102 # Prints the XML in beautiful form 103 pretty_print(version) 104 105 # Login 106 gmp.authenticate('foo', 'bar') 107 108 # Retrieve all tasks 109 tasks = gmp.get_tasks() 110 111 # Get names of tasks 112 task_names = tasks.xpath('task/name/text()') 113 pretty_print(task_names) 114``` 115 116## Support 117 118For any question on the usage of python-gvm please use the 119[Greenbone Community Portal](https://community.greenbone.net/c/gmp). If you 120found a problem with the software, please 121[create an issue](https://github.com/greenbone/gvm-tools/issues) 122on GitHub. 123 124## Maintainer 125 126This project is maintained by [Greenbone Networks GmbH](https://www.greenbone.net/). 127 128## Contributing 129 130Your contributions are highly appreciated. Please 131[create a pull request](https://github.com/greenbone/python-gvm/pulls) on GitHub. 132For bigger changes, please discuss it first in the 133[issues](https://github.com/greenbone/python-gvm/issues). 134 135For development you should use [poetry](https://python-poetry.org) 136to keep you python packages separated in different environments. First install 137poetry via pip 138 139 python3 -m pip install --user poetry 140 141Afterwards run 142 143 poetry install 144 145in the checkout directory of python-gvm (the directory containing the 146`pyproject.toml` file) to install all dependencies including the packages only 147required for development. 148 149The python-gvm repository uses [autohooks](https://github.com/greenbone/autohooks) 150to apply linting and auto formatting via git hooks. Please ensure the git hooks 151are active. 152 153 $ poetry install 154 $ poetry run autohooks activate --force 155 156## License 157 158Copyright (C) 2017-2021 [Greenbone Networks GmbH](https://www.greenbone.net/) 159 160Licensed under the [GNU General Public License v3.0 or later](LICENSE). 161 162