Metadata-Version: 2.1
Name: result-reporter
Version: 0.1.1
Summary: A context manager to report results to and endpoint.
License: MIT
Author: Paul Logston
Author-email: paul.logston@gmail.com
Requires-Python: >=3.9
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Requires-Dist: requests (>=2.25.0)
Description-Content-Type: text/markdown

# 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
```

