qualysapi


Namequalysapi JSON
Version 8.1.0 PyPI version JSON
download
home_pagehttps://github.com/paragbaxi/qualysapi
SummaryQualys API Helper
upload_time2023-07-11 13:39:11
maintainer
docs_urlNone
authorParag Baxi
requires_python
licenseBSD-new
keywords qualys qualys api
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI
coveralls test coverage No coveralls.
            qualysapi
=========
[![Build Status](https://travis-ci.com/paragbaxi/qualysapi.svg?branch=master)](https://travis-ci.com/paragbaxi/qualysapi)
[![Coverage Status](https://coveralls.io/repos/github/paragbaxi/qualysapi/badge.svg?branch=master)](https://coveralls.io/github/paragbaxi/qualysapi?branch=master)

Python package, qualysapi, that makes calling any Qualys API very simple. Qualys API versions v1, v2, & WAS & AM (asset management) are all supported.

My focus was making the API super easy to use. The only parameters the user needs to provide is the call, and data (optional). It automates the following:
* Automatically identifies API version through the call requested.
* Automatically identifies url from the above step.
* Automatically identifies http method as POST or GET for the request per Qualys documentation.

Usage
=====

Check out the example scripts in the [/examples directory](https://github.com/paragbaxi/qualysapi/blob/master/examples/).

Connect
-------
There are currenty three methods of connecting to Qualys APIs

* `qualysapi.connect()` will prompt the user for credentials at runtime.
* `qualysapi.connect('/path/to/config.ini')` will parse the config file for credentials (see below).
* `qualysapi.connect(username='username', password='password')` will use the provided credentials.


Example
-------
Detailed example found at [qualysapi-example.py](https://github.com/paragbaxi/qualysapi/blob/master/examples/qualysapi-example.py).

Sample example below.

```python
>>> import qualysapi
>>> a = qualysapi.connect()
QualysGuard Username: my_username
QualysGuard Password:
>>> print a.request('about.php')
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE ABOUT SYSTEM "https://qualysapi.qualys.com/about.dtd">
<ABOUT>
  <API-VERSION MAJOR="1" MINOR="4" />
  <WEB-VERSION>7.10.61-1</WEB-VERSION>
  <SCANNER-VERSION>7.1.10-1</SCANNER-VERSION>
  <VULNSIGS-VERSION>2.2.475-2</VULNSIGS-VERSION>
</ABOUT>
<!-- Generated for username="my_username" date="2013-07-03T10:31:57Z" -->
<!-- CONFIDENTIAL AND PROPRIETARY INFORMATION. Qualys provides the QualysGuard Service "As Is," without any warranty of any kind. Qualys makes no warranty that the information contained in this report is complete or error-free. Copyright 2013, Qualys, Inc. //-->
```

Installation
============

Use pip to install:
```Shell
pip install qualysapi
```

NOTE: If you would like to experiment without installing globally, look into 'virtualenv'.

Requirements
------------

* requests (http://docs.python-requests.org)
* lxml (http://lxml.de/)

Configuration
=============

By default, the package will ask at the command prompt for username and password. By default, the package connects to the Qualys documented host (qualysapi.qualys.com).

You can override these settings and prevent yourself from typing credentials by doing any of the following:

1. By running the following Python, `qualysapi.connect(remember_me=True)`. This automatically generates a .qcrc file in your current working directory, scoping the configuration to that directory.
2. By running the following Python, `qualysapi.connect(remember_me_always=True)`. This automatically generates a .qcrc file in your home directory, scoping the configuratoin to all calls to qualysapi, regardless of the directory.
3. By creating a file called '.qcrc' (for Windows, the default filename is 'config.ini') in your home directory or directory of the Python script.
4. This supports multiple configuration files. Just add the filename in your call to qualysapi.connect('config.txt').

Example config file
-------------------
```INI
; Note, it should be possible to omit any of these entries.

[info]
hostname = qualysapi.serviceprovider.com
username = jerry
password = I<3Elaine

# Set the maximum number of retries each connection should attempt. Note, this applies only to failed connections and timeouts, never to requests where the server returns a response.
max_retries = 10

[proxy]
; This section is optional. Leave it out if you're not using a proxy.
; You can use environmental variables as well: http://www.python-requests.org/en/latest/user/advanced/#proxies

; proxy_protocol set to https, if not specified.
proxy_url = proxy.mycorp.com

; proxy_port will override any port specified in proxy_url
proxy_port = 8080

; proxy authentication
proxy_username = kramer
proxy_password = giddy up!
```


License
=======
Apache License, Version 2.0
http://www.apache.org/licenses/LICENSE-2.0.html

Acknowledgements
================

Special thank you to Colin Bell for qualysconnect.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/paragbaxi/qualysapi",
    "name": "qualysapi",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "Qualys,Qualys API",
    "author": "Parag Baxi",
    "author_email": "parag.baxi@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/af/cf/93702ca08888d1eeec5cebdf1c5d6b8757ca102bf57483934f96cc84badc/qualysapi-8.1.0.tar.gz",
    "platform": null,
    "description": "qualysapi\n=========\n[![Build Status](https://travis-ci.com/paragbaxi/qualysapi.svg?branch=master)](https://travis-ci.com/paragbaxi/qualysapi)\n[![Coverage Status](https://coveralls.io/repos/github/paragbaxi/qualysapi/badge.svg?branch=master)](https://coveralls.io/github/paragbaxi/qualysapi?branch=master)\n\nPython package, qualysapi, that makes calling any Qualys API very simple. Qualys API versions v1, v2, & WAS & AM (asset management) are all supported.\n\nMy focus was making the API super easy to use. The only parameters the user needs to provide is the call, and data (optional). It automates the following:\n* Automatically identifies API version through the call requested.\n* Automatically identifies url from the above step.\n* Automatically identifies http method as POST or GET for the request per Qualys documentation.\n\nUsage\n=====\n\nCheck out the example scripts in the [/examples directory](https://github.com/paragbaxi/qualysapi/blob/master/examples/).\n\nConnect\n-------\nThere are currenty three methods of connecting to Qualys APIs\n\n* `qualysapi.connect()` will prompt the user for credentials at runtime.\n* `qualysapi.connect('/path/to/config.ini')` will parse the config file for credentials (see below).\n* `qualysapi.connect(username='username', password='password')` will use the provided credentials.\n\n\nExample\n-------\nDetailed example found at [qualysapi-example.py](https://github.com/paragbaxi/qualysapi/blob/master/examples/qualysapi-example.py).\n\nSample example below.\n\n```python\n>>> import qualysapi\n>>> a = qualysapi.connect()\nQualysGuard Username: my_username\nQualysGuard Password:\n>>> print a.request('about.php')\n<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<!DOCTYPE ABOUT SYSTEM \"https://qualysapi.qualys.com/about.dtd\">\n<ABOUT>\n  <API-VERSION MAJOR=\"1\" MINOR=\"4\" />\n  <WEB-VERSION>7.10.61-1</WEB-VERSION>\n  <SCANNER-VERSION>7.1.10-1</SCANNER-VERSION>\n  <VULNSIGS-VERSION>2.2.475-2</VULNSIGS-VERSION>\n</ABOUT>\n<!-- Generated for username=\"my_username\" date=\"2013-07-03T10:31:57Z\" -->\n<!-- CONFIDENTIAL AND PROPRIETARY INFORMATION. Qualys provides the QualysGuard Service \"As Is,\" without any warranty of any kind. Qualys makes no warranty that the information contained in this report is complete or error-free. Copyright 2013, Qualys, Inc. //-->\n```\n\nInstallation\n============\n\nUse pip to install:\n```Shell\npip install qualysapi\n```\n\nNOTE: If you would like to experiment without installing globally, look into 'virtualenv'.\n\nRequirements\n------------\n\n* requests (http://docs.python-requests.org)\n* lxml (http://lxml.de/)\n\nConfiguration\n=============\n\nBy default, the package will ask at the command prompt for username and password. By default, the package connects to the Qualys documented host (qualysapi.qualys.com).\n\nYou can override these settings and prevent yourself from typing credentials by doing any of the following:\n\n1. By running the following Python, `qualysapi.connect(remember_me=True)`. This automatically generates a .qcrc file in your current working directory, scoping the configuration to that directory.\n2. By running the following Python, `qualysapi.connect(remember_me_always=True)`. This automatically generates a .qcrc file in your home directory, scoping the configuratoin to all calls to qualysapi, regardless of the directory.\n3. By creating a file called '.qcrc' (for Windows, the default filename is 'config.ini') in your home directory or directory of the Python script.\n4. This supports multiple configuration files. Just add the filename in your call to qualysapi.connect('config.txt').\n\nExample config file\n-------------------\n```INI\n; Note, it should be possible to omit any of these entries.\n\n[info]\nhostname = qualysapi.serviceprovider.com\nusername = jerry\npassword = I<3Elaine\n\n# Set the maximum number of retries each connection should attempt. Note, this applies only to failed connections and timeouts, never to requests where the server returns a response.\nmax_retries = 10\n\n[proxy]\n; This section is optional. Leave it out if you're not using a proxy.\n; You can use environmental variables as well: http://www.python-requests.org/en/latest/user/advanced/#proxies\n\n; proxy_protocol set to https, if not specified.\nproxy_url = proxy.mycorp.com\n\n; proxy_port will override any port specified in proxy_url\nproxy_port = 8080\n\n; proxy authentication\nproxy_username = kramer\nproxy_password = giddy up!\n```\n\n\nLicense\n=======\nApache License, Version 2.0\nhttp://www.apache.org/licenses/LICENSE-2.0.html\n\nAcknowledgements\n================\n\nSpecial thank you to Colin Bell for qualysconnect.\n",
    "bugtrack_url": null,
    "license": "BSD-new",
    "summary": "Qualys API Helper",
    "version": "8.1.0",
    "project_urls": {
        "Bug Tracker": "https://github.com/paragbaxi/qualysapi/issues",
        "Homepage": "https://github.com/paragbaxi/qualysapi",
        "Source Code": "https://github.com/paragbaxi/qualysapi"
    },
    "split_keywords": [
        "qualys",
        "qualys api"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e5ced7ed0e6083209329ff2d803ea8466e7e9054ac127fb03262752616f66a10",
                "md5": "3a4f01ddd5a5601a8149663a10657f34",
                "sha256": "07a3ac26de12f581d5fec31a7329789c05c5bd5925a7bcbf1106353b51cb009c"
            },
            "downloads": -1,
            "filename": "qualysapi-8.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "3a4f01ddd5a5601a8149663a10657f34",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 24461,
            "upload_time": "2023-07-11T13:39:09",
            "upload_time_iso_8601": "2023-07-11T13:39:09.749310Z",
            "url": "https://files.pythonhosted.org/packages/e5/ce/d7ed0e6083209329ff2d803ea8466e7e9054ac127fb03262752616f66a10/qualysapi-8.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "afcf93702ca08888d1eeec5cebdf1c5d6b8757ca102bf57483934f96cc84badc",
                "md5": "5cf7b94cf42a9d3dc71977b7e3b59838",
                "sha256": "d628ef144aecc82150cff47d7c0f3fe1f4044feb40ed8e85338a60279938739f"
            },
            "downloads": -1,
            "filename": "qualysapi-8.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "5cf7b94cf42a9d3dc71977b7e3b59838",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 27679,
            "upload_time": "2023-07-11T13:39:11",
            "upload_time_iso_8601": "2023-07-11T13:39:11.441290Z",
            "url": "https://files.pythonhosted.org/packages/af/cf/93702ca08888d1eeec5cebdf1c5d6b8757ca102bf57483934f96cc84badc/qualysapi-8.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-07-11 13:39:11",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "paragbaxi",
    "github_project": "qualysapi",
    "travis_ci": true,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "qualysapi"
}
        
Elapsed time: 0.09662s