python-gvm


Namepython-gvm JSON
Version 24.3.0 PyPI version JSON
download
home_pagehttps://github.com/greenbone/python-gvm/
SummaryLibrary to communicate with remote servers over GMP or OSP
upload_time2024-03-15 07:41:44
maintainer
docs_urlNone
authorGreenbone AG
requires_python>=3.9,<4.0
licenseGPL-3.0-or-later
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ![Greenbone Logo](https://www.greenbone.net/wp-content/uploads/gb_new-logo_horizontal_rgb_small.png)

# Greenbone Vulnerability Management Python Library <!-- omit in toc -->

[![GitHub releases](https://img.shields.io/github/release-pre/greenbone/python-gvm.svg)](https://github.com/greenbone/python-gvm/releases)
[![PyPI release](https://img.shields.io/pypi/v/python-gvm.svg)](https://pypi.org/project/python-gvm/)
[![code test coverage](https://codecov.io/gh/greenbone/python-gvm/branch/main/graph/badge.svg)](https://codecov.io/gh/greenbone/python-gvm)
[![Build and test](https://github.com/greenbone/python-gvm/actions/workflows/ci.yml/badge.svg)](https://github.com/greenbone/python-gvm/actions/workflows/ci.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.9 and later is supported.

### Install using pip

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 Forum](https://forum.greenbone.net/c/building-from-source-under-the-hood/gmp/11). If you
found a problem with the software, please
[create an issue](https://github.com/greenbone/python-gvm/issues)
on GitHub.

## Maintainer

This project is maintained by [Greenbone AG](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-2024 [Greenbone AG](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.9,<4.0",
    "maintainer_email": "",
    "keywords": "",
    "author": "Greenbone AG",
    "author_email": "info@greenbone.net",
    "download_url": "https://files.pythonhosted.org/packages/29/0d/e4d6456163351389cac9d2600a0889f23027627250c72c2de7a63248ede4/python_gvm-24.3.0.tar.gz",
    "platform": null,
    "description": "![Greenbone Logo](https://www.greenbone.net/wp-content/uploads/gb_new-logo_horizontal_rgb_small.png)\n\n# Greenbone Vulnerability Management Python Library <!-- omit in toc -->\n\n[![GitHub releases](https://img.shields.io/github/release-pre/greenbone/python-gvm.svg)](https://github.com/greenbone/python-gvm/releases)\n[![PyPI release](https://img.shields.io/pypi/v/python-gvm.svg)](https://pypi.org/project/python-gvm/)\n[![code test coverage](https://codecov.io/gh/greenbone/python-gvm/branch/main/graph/badge.svg)](https://codecov.io/gh/greenbone/python-gvm)\n[![Build and test](https://github.com/greenbone/python-gvm/actions/workflows/ci.yml/badge.svg)](https://github.com/greenbone/python-gvm/actions/workflows/ci.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.9 and later is supported.\n\n### Install using pip\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 Forum](https://forum.greenbone.net/c/building-from-source-under-the-hood/gmp/11). If you\nfound a problem with the software, please\n[create an issue](https://github.com/greenbone/python-gvm/issues)\non GitHub.\n\n## Maintainer\n\nThis project is maintained by [Greenbone AG](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-2024 [Greenbone AG](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": "24.3.0",
    "project_urls": {
        "Documentation": "https://greenbone.github.io/python-gvm/",
        "Homepage": "https://github.com/greenbone/python-gvm/",
        "Repository": "https://github.com/greenbone/python-gvm/"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7f640da7196b51e1d7ff9039d89c2134cbd1321d3bc02c1f8a8be233d245c64e",
                "md5": "94fb4af725ce812e3dfd47fc758306c5",
                "sha256": "4ba68f8a13aa6925bdcb81258214a5545f79100a08d521709ac4de9d008ffce2"
            },
            "downloads": -1,
            "filename": "python_gvm-24.3.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "94fb4af725ce812e3dfd47fc758306c5",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9,<4.0",
            "size": 121520,
            "upload_time": "2024-03-15T07:41:42",
            "upload_time_iso_8601": "2024-03-15T07:41:42.696879Z",
            "url": "https://files.pythonhosted.org/packages/7f/64/0da7196b51e1d7ff9039d89c2134cbd1321d3bc02c1f8a8be233d245c64e/python_gvm-24.3.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "290de4d6456163351389cac9d2600a0889f23027627250c72c2de7a63248ede4",
                "md5": "3cabcc319e982f6d2377e336e0065409",
                "sha256": "22e21c20ff2b9f48efec2a2ad97132676f88226131f1abfe87a758a087a0ce2b"
            },
            "downloads": -1,
            "filename": "python_gvm-24.3.0.tar.gz",
            "has_sig": false,
            "md5_digest": "3cabcc319e982f6d2377e336e0065409",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9,<4.0",
            "size": 184595,
            "upload_time": "2024-03-15T07:41:44",
            "upload_time_iso_8601": "2024-03-15T07:41:44.987728Z",
            "url": "https://files.pythonhosted.org/packages/29/0d/e4d6456163351389cac9d2600a0889f23027627250c72c2de7a63248ede4/python_gvm-24.3.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-15 07:41:44",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "greenbone",
    "github_project": "python-gvm",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "python-gvm"
}
        
Elapsed time: 0.23328s