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. Please see server directory for running your own server.
rr.set_global_endpoint('https://api.example.com/endpoint/path')
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 download 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.1.0.tar.gz
(2.5 kB
view hashes)
Built Distribution
Close
Hashes for result_reporter-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8d1fab2e2acb53463b5729081b768f3acc85f4d800ca80a5ac4a6789e6ba6287 |
|
MD5 | 5a99692f0be9d23a7772de050dc89ce0 |
|
BLAKE2b-256 | 63c68b4781cfcb0a3aeddc0c4af63e64f9757cb609815693596daf08b5558716 |