Python API for Kvasir
Project description
Python API to communicate with Kvasir.
At this time only the JSONRPC API is supported. RESTful API is in progress.
Features
Allows for third-party tools to communicate with multiple Kvasir instances
Builds content which can be used for reporting
Extend python scripts to access or update Kvasir data
Installation
Install using PIP:
$ pip install KvasirAPI
Or use the bleeding edge from github:
$ git clone https://github.com/KvasirSecurity/kvasirapi-python $ cd kvasirapi-python $ python setup.py install
Usage
Create a YAML configuration file:
customer: id: 11-ACME-01 full-name: ACME Widgets, Inc. short-name: ACME possessive: ACME Widget, Inc's short-capital: ACME possessive-capital: ACME's instances: test: url: "http://test:test@localhost:8000/kvasir/" name: Test Network test_type: internal start: May 2, 2011 end: May 6, 2011Load the API module:
$ python >>> import KvasirAPI >>> kvasir = KvasirAPI.API('config.yml')Access the API functions:
>>> kvasir.configuration.customer_info() {'short-name': 'ACME', 'possessive': "ACME Widget, Inc's", 'full-name': 'ACME Widgets, Inc.', 'short-capital': 'ACME', 'id': '11-ACME-01', 'possessive-capital': "ACME's"} >>> kvasir.configuration.instances() {'test': {'end': 'May 6, 2011', 'name': 'Test Network', 'url': 'http://test:test@localhost:8000/kvasir/', 'test_type': 'internal', 'hostfilter': {}, 'start': 'May 2, 2011'}} >>> kvasir.call.test.hosts.list()
Contributing
Fork the repository on Github
Make a branch off of master and commit your changes to it.
Ensure that your name is added to the end of the AUTHORS file using the format Name <email@domain.com> (url), where the (url) portion is optional.
Submit a Pull Request to the master branch on GitHub.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file KvasirAPI-1.0.0.tar.gz.
File metadata
- Download URL: KvasirAPI-1.0.0.tar.gz
- Upload date:
- Size: 10.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
928f5b8f26561a26c27a2c9a4144cf08a7592b3ee80de0f6649134033c6ef95e
|
|
| MD5 |
97c1f98faa8090bb8905a15a43f4a6eb
|
|
| BLAKE2b-256 |
7b400d896f8fe9e054f8fe3a22a143c24770a7fdc5f71a587a79427a0ae8e943
|