inspera-reader
A tool to parse the output of exams/assignments from Inspera
setup
pip install InsperaReader
usage
Can be used either in python directly or as a command-line tool to create the dataset directly.
in python
from inspera import InsperaReader
reader = InsperaReader('path/fall_exam_2021.json')
for candidate in reader.candidates():
for question in candidate.questions():
# access any desired field and build your data
my_custom_data = [question.id(), question.grading(), question.clean_response()]
# or access the predefined make-row field, intended for further use with pandas
my_custom_data = question.make_row()
peek data:
from inspera import InsperaReader
reader = InsperaReader('path/fall_exam_2021.json')
print(reader.candidates()[0].questions()[0].clean_response())
command line (NOT IMPLEMENTED)
python -m insperareader --file path --outfile path --name name
a default setting that includes the following fields for each candidate's response (through make_row):
- question id
- responses
- parsed responses
- grading
- max score
- duration
classes
InsperaCandidate
- id (candidate id) -> int
- score (total score) -> int
- start_end (date_from - date_to) -> str
- questions (data related to each question in the assignment) -> list[InsperaQuestion]
InsperaQuestion
- question_num -> int
- question_title -> str
- responses (raw data) -> list(str)
- clean_response (parsed data) -> list(str)
- grading (list of grades) -> list(int)
- grader (name of graders) -> list(str)
- max_score -> int
- duration -> int
- make_row -> list of above fields
Also implements a print override, containing simplified information.
TODO:
- implement CLI
- generalize field names in a config file (e.g. yml)
Metadata
Release files for InsperaReader 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| InsperaReader-0.1.2.tar.gz | 4.3 kB | Without provenance | Details for InsperaReader-0.1.2.tar.gz |
Release files / InsperaReader-0.1.2.tar.gz
| Download URL | InsperaReader-0.1.2.tar.gz |
|---|---|
| Size | 4.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4c3ce4bc08ec04cf0caf56d5300f2a04498ba95229abe85eaa5d8d15fb251020
|
|
BLAKE2b-256 checksum How to use checksums |
e85689ce7e31217a564458e7fe95c85116d9f07084f78f8fb2a9b1c47a5c0530
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
|
Security for InsperaReader 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.