Skip to main content

A context manager to report results to and endpoint.

Project description

Result Reporter Client

This client will report results of a function execution to an endpoint. This can be especially useful for determining how many students in a class are successfully completing an exercise.

Usage

import rr

# Define endpoint to send results to.
rr.set_global_endpoint('https://result-reporter.com/ingest')
# User-Assignment identification token. This is provided by Result-Reporter.com
rr.set_global_token('f0c3f-1234-abcd-1234-740e2cf8daf8')


def fibonacci(n: int) -> int:
    # Left for your students to implement.
    pass


# Tests provided for your students.
with rr.Wrap(fibonacci) as f:
    assert f(0) == 0
    assert f(1) == 1
    assert f(2) == 1
    assert f(3) == 2
    assert f(4) == 3
    assert f(5) == 5
    assert f(6) == 8

Results will then be available for visualization via the result server.

Installation

$ pip install result-reporter

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

result_reporter-0.2.1.tar.gz (2.9 kB view hashes)

Uploaded Source

Built Distribution

result_reporter-0.2.1-py3-none-any.whl (3.3 kB view hashes)

Uploaded Python 3

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