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.0.tar.gz
(2.9 kB
view hashes)
Built Distribution
Close
Hashes for result_reporter-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5df12c82c08d153839bf63145db2558764c8c532ed6c9e94345fd7240e09ca7a |
|
MD5 | 7f7e11df129a5a591fba4ebe72160738 |
|
BLAKE2b-256 | e14789e0f18a3ef8d8a6e688980961db858a54b652b2141c41790d7f75137d6f |