Skip to main content

Flood.io client for Python 2 and 3

Project description

A Flood.io client for Python 2 and 3.

Installation

$ pip install floodio-python

Usage

Instantiate a client with your Flood API key:

from floodio.client import Client

client = Client('YOURAPIKEY')

Flood API

client.floods is iterable:

for flood in client.floods:
    print(flood)

or you can get a flood by its uuid:

flood = client.floods['SOMEUUID']

A flood has stop, repeat, and refresh methods.

flood.stop()
# keyword arguments are optional.
flood.repeat(grid='SOMEGRIDUUID', region='AWSREGION')
flood.refresh()  # pulls the latest state of this flood

Accessing flood.status performs an implicit refresh.

flood.status
>>> 'queued'
flood.status
>>> 'running'
flood.status
>>> 'finished'

Condensed results are available with flood.report.

flood.report.summary
flood.report.mean_response_time
flood.report.mean_concurrency
flood.report.mean_throughput
flood.report.mean_error_rate
flood.report.mean_apdex

and the detailed results are available with flood.results, directly loading the JSON-response.

Any times returned by Flood API V2 are parsed into native Python datetime objects.

eg. flood.started and flood.ended.

You can create a new flood with client.floods.create. Test files are a list of two-tuples with a filename, and either a file-like object or a string.

flood = client.floods.create(
    'jmeter-2.13',
    [('test.jmx', your_test_data)],
    name='client-test',
    duration=300,
    threads=200,
    rampup=300,
    grids='SOMEGRIDUUID',
)

Grid API

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

floodio-python-0.3.tar.gz (3.9 kB view details)

Uploaded Source

File details

Details for the file floodio-python-0.3.tar.gz.

File metadata

File hashes

Hashes for floodio-python-0.3.tar.gz
Algorithm Hash digest
SHA256 41ddb80f21486a8b7f4f6a9e447e90227713cb2f4de56eac1e6b4cf47d2d7146
MD5 31850872923b7dca2d23baa239072f84
BLAKE2b-256 f63cbd41d4b8aa3c6e83059c74d31e7dbcb03bcb3008b565f54a4e2013b46090

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page