
# Greenbone Vulnerability Management Python Library <!-- omit in toc -->
[](https://github.com/greenbone/python-gvm/releases)
[](https://pypi.org/project/python-gvm/)
[](https://codecov.io/gh/greenbone/python-gvm)
[](https://github.com/greenbone/python-gvm/actions/workflows/ci-python.yml)
The Greenbone Vulnerability Management Python API library (**python-gvm**) is a
collection of APIs that help with remote controlling Greenbone Community Edition
installations and Greenbone Enterprise Appliances. The library essentially
abstracts accessing the communication protocols Greenbone Management Protocol
(GMP) and Open Scanner Protocol (OSP).
## Table of Contents <!-- omit in toc -->
- [Documentation](#documentation)
- [Installation](#installation)
- [Version](#version)
- [Requirements](#requirements)
- [Install using pip](#install-using-pip)
- [Example](#example)
- [Support](#support)
- [Maintainer](#maintainer)
- [Contributing](#contributing)
- [License](#license)
## Documentation
The documentation for python-gvm can be found at
[https://greenbone.github.io/python-gvm/](https://greenbone.github.io/python-gvm/).
Please always take a look at the documentation for further details. This
**README** just gives you a short overview.
## Installation
### Version
Please consider to always use the **newest** version of `gvm-tools` and `python-gvm`.
We frequently update this projects to add features and keep them free from bugs.
This is why installing `python-gvm` using pip is recommended.
**To use `python-gvm` with an old GMP version (7, 8, 9) you must use a release version**
**that is `<21.05`. In the `21.05` release the support of these versions have been dropped.**
### Requirements
Python 3.7 and later is supported.
### Install using pip
pip 19.0 or later is required.
You can install the latest stable release of python-gvm from the Python Package
Index using [pip](https://pip.pypa.io/):
python3 -m pip install --user python-gvm
## Example
```python3
from gvm.connections import UnixSocketConnection
from gvm.protocols.gmp import Gmp
from gvm.transforms import EtreeTransform
from gvm.xml import pretty_print
connection = UnixSocketConnection()
transform = EtreeTransform()
with Gmp(connection, transform=transform) as gmp:
# Retrieve GMP version supported by the remote daemon
version = gmp.get_version()
# Prints the XML in beautiful form
pretty_print(version)
# Login
gmp.authenticate('foo', 'bar')
# Retrieve all tasks
tasks = gmp.get_tasks()
# Get names of tasks
task_names = tasks.xpath('task/name/text()')
pretty_print(task_names)
```
## Support
For any question on the usage of python-gvm please use the
[Greenbone Community Portal](https://community.greenbone.net/c/gmp). If you
found a problem with the software, please
[create an issue](https://github.com/greenbone/gvm-tools/issues)
on GitHub.
## Maintainer
This project is maintained by [Greenbone Networks GmbH](https://www.greenbone.net/).
## Contributing
Your contributions are highly appreciated. Please
[create a pull request](https://github.com/greenbone/python-gvm/pulls) on GitHub.
For bigger changes, please discuss it first in the
[issues](https://github.com/greenbone/python-gvm/issues).
For development you should use [poetry](https://python-poetry.org)
to keep you python packages separated in different environments. First install
poetry via pip
```shell
python3 -m pip install --user poetry
```
Afterwards run
```shell
poetry install
```
in the checkout directory of python-gvm (the directory containing the
`pyproject.toml` file) to install all dependencies including the packages only
required for development.
The python-gvm repository uses [autohooks](https://github.com/greenbone/autohooks)
to apply linting and auto formatting via git hooks. Please ensure the git hooks
are active.
$ poetry install
$ poetry run autohooks activate --force
## License
Copyright (C) 2017-2022 [Greenbone Networks GmbH](https://www.greenbone.net/)
Licensed under the [GNU General Public License v3.0 or later](LICENSE).
Raw data
{
"_id": null,
"home_page": "https://github.com/greenbone/python-gvm/",
"name": "python-gvm",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.7.0,<4.0.0",
"maintainer_email": "",
"keywords": "",
"author": "Greenbone Networks GmbH",
"author_email": "info@greenbone.net",
"download_url": "https://files.pythonhosted.org/packages/4d/40/8c433ed103465dce088426a847d5a95afa1d0540dcece1adfeb486c57f83/python_gvm-23.2.0.tar.gz",
"platform": null,
"description": "\n\n# Greenbone Vulnerability Management Python Library <!-- omit in toc -->\n\n[](https://github.com/greenbone/python-gvm/releases)\n[](https://pypi.org/project/python-gvm/)\n[](https://codecov.io/gh/greenbone/python-gvm)\n[](https://github.com/greenbone/python-gvm/actions/workflows/ci-python.yml)\n\nThe Greenbone Vulnerability Management Python API library (**python-gvm**) is a\ncollection of APIs that help with remote controlling Greenbone Community Edition\ninstallations and Greenbone Enterprise Appliances. The library essentially\nabstracts accessing the communication protocols Greenbone Management Protocol\n(GMP) and Open Scanner Protocol (OSP).\n\n## Table of Contents <!-- omit in toc -->\n\n- [Documentation](#documentation)\n- [Installation](#installation)\n - [Version](#version)\n - [Requirements](#requirements)\n - [Install using pip](#install-using-pip)\n- [Example](#example)\n- [Support](#support)\n- [Maintainer](#maintainer)\n- [Contributing](#contributing)\n- [License](#license)\n\n## Documentation\n\nThe documentation for python-gvm can be found at\n[https://greenbone.github.io/python-gvm/](https://greenbone.github.io/python-gvm/).\nPlease always take a look at the documentation for further details. This\n**README** just gives you a short overview.\n\n## Installation\n\n### Version\n\nPlease consider to always use the **newest** version of `gvm-tools` and `python-gvm`.\nWe frequently update this projects to add features and keep them free from bugs.\nThis is why installing `python-gvm` using pip is recommended.\n\n**To use `python-gvm` with an old GMP version (7, 8, 9) you must use a release version**\n**that is `<21.05`. In the `21.05` release the support of these versions have been dropped.**\n\n### Requirements\n\nPython 3.7 and later is supported.\n\n### Install using pip\n\npip 19.0 or later is required.\n\nYou can install the latest stable release of python-gvm from the Python Package\nIndex using [pip](https://pip.pypa.io/):\n\n python3 -m pip install --user python-gvm\n\n## Example\n\n```python3\nfrom gvm.connections import UnixSocketConnection\nfrom gvm.protocols.gmp import Gmp\nfrom gvm.transforms import EtreeTransform\nfrom gvm.xml import pretty_print\n\nconnection = UnixSocketConnection()\ntransform = EtreeTransform()\n\nwith Gmp(connection, transform=transform) as gmp:\n # Retrieve GMP version supported by the remote daemon\n version = gmp.get_version()\n\n # Prints the XML in beautiful form\n pretty_print(version)\n\n # Login\n gmp.authenticate('foo', 'bar')\n\n # Retrieve all tasks\n tasks = gmp.get_tasks()\n\n # Get names of tasks\n task_names = tasks.xpath('task/name/text()')\n pretty_print(task_names)\n```\n\n## Support\n\nFor any question on the usage of python-gvm please use the\n[Greenbone Community Portal](https://community.greenbone.net/c/gmp). If you\nfound a problem with the software, please\n[create an issue](https://github.com/greenbone/gvm-tools/issues)\non GitHub.\n\n## Maintainer\n\nThis project is maintained by [Greenbone Networks GmbH](https://www.greenbone.net/).\n\n## Contributing\n\nYour contributions are highly appreciated. Please\n[create a pull request](https://github.com/greenbone/python-gvm/pulls) on GitHub.\nFor bigger changes, please discuss it first in the\n[issues](https://github.com/greenbone/python-gvm/issues).\n\nFor development you should use [poetry](https://python-poetry.org)\nto keep you python packages separated in different environments. First install\npoetry via pip\n\n```shell\npython3 -m pip install --user poetry\n```\n\nAfterwards run\n\n```shell\npoetry install\n```\n\nin the checkout directory of python-gvm (the directory containing the\n`pyproject.toml` file) to install all dependencies including the packages only\nrequired for development.\n\nThe python-gvm repository uses [autohooks](https://github.com/greenbone/autohooks)\nto apply linting and auto formatting via git hooks. Please ensure the git hooks\nare active.\n\n $ poetry install\n $ poetry run autohooks activate --force\n\n## License\n\nCopyright (C) 2017-2022 [Greenbone Networks GmbH](https://www.greenbone.net/)\n\nLicensed under the [GNU General Public License v3.0 or later](LICENSE).\n\n",
"bugtrack_url": null,
"license": "GPL-3.0-or-later",
"summary": "Library to communicate with remote servers over GMP or OSP",
"version": "23.2.0",
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "468c19a250dbd90e325be493ea1df659abe4bdd81a851093d9978cd02046a2f2",
"md5": "737ebfb5e5c79ec127def0dd1ede839f",
"sha256": "cb971d47a7202c18f211a05b3e26f0638ef20453c60a33f220abd8eda576146b"
},
"downloads": -1,
"filename": "python_gvm-23.2.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "737ebfb5e5c79ec127def0dd1ede839f",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7.0,<4.0.0",
"size": 142934,
"upload_time": "2023-02-03T08:07:21",
"upload_time_iso_8601": "2023-02-03T08:07:21.410826Z",
"url": "https://files.pythonhosted.org/packages/46/8c/19a250dbd90e325be493ea1df659abe4bdd81a851093d9978cd02046a2f2/python_gvm-23.2.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "4d408c433ed103465dce088426a847d5a95afa1d0540dcece1adfeb486c57f83",
"md5": "082eb662b1dc641ac1d0edefbf1609a3",
"sha256": "c5035c0a30326f41568b9612def725d1dd1b6fec5fbc5e8e897e1cc6268ba2b4"
},
"downloads": -1,
"filename": "python_gvm-23.2.0.tar.gz",
"has_sig": false,
"md5_digest": "082eb662b1dc641ac1d0edefbf1609a3",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7.0,<4.0.0",
"size": 175169,
"upload_time": "2023-02-03T08:07:22",
"upload_time_iso_8601": "2023-02-03T08:07:22.854851Z",
"url": "https://files.pythonhosted.org/packages/4d/40/8c433ed103465dce088426a847d5a95afa1d0540dcece1adfeb486c57f83/python_gvm-23.2.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-02-03 08:07:22",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "greenbone",
"github_project": "python-gvm",
"travis_ci": false,
"coveralls": true,
"github_actions": true,
"lcname": "python-gvm"
}