OpenProficiency - Python Library
This library provides class objects for managing proficiency across knowledge domains.
Features
- Topic Class: A defined unique area of knowledge composed of subtopics and built upon pretopics (prerequisite topics).
- TopicList Class: A collection of related topics covering one knowledge domain.
Installation
pip install openproficiency
Quick Start
Create a Topic
A Topic is an area of knowledge that a person gains proficiency in. If it has subtopics, the person can alternately gain proficiency in the parent topic by gaining proficiency in the subtopics.
from openproficiency import Topic
# Create a simple topic and what composes it
topic_arithmetic = Topic(
id="arithmetic",
description="Basic operations for numeric calculations",
subtopics=["addition", "subtraction"]
pretopics=['writing']
)
Add a subtopic to an existing topic
# Specific other topics that compose the parent topic
topic_arithmetic.add_subtopic("multiplication")
topic_arithmetic.add_subtopic("division")
Add a pretopic to an existing topic
A Pretopic (prerequisite topic) is a topic that must be understood before a person can begin understanding the parent topic.
# Specify prerequisites to understand first
topic_arithmetic.add_pretopic("integers")
topic_arithmetic.add_pretopic("decimals")
topic_arithmetic.add_pretopic("fractions")
Create a Topic List
A topic list is a collection of topics that describe a specific knowledge domain.
from openproficiency import Topic, TopicList
# Create an empty topic list
topic_list = TopicList(
owner="core-fundamentals",
name="math",
description="Math topics through basic calculus"
)
# Add topics to the list
t_arithmetic = Topic(
id="arithmetic",
description="Basic operations for numeric calculations",
subtopics=[
"addition",
"subtraction",
"multiplication",
"division
]
)
topic_list.add_topic(t_arithmetic)
t_algebra = Topic(
id="algebra",
description="Basic operations for numeric calculations",
subtopics=[
"variables",
"constants",
"single-variable-equations",
"multiple-variable-equations"
],
pretopics=[ "arithmetic" ]
)
Create a Proficiency Score, by name
A Proficiency Score represents a person's level of proficiency in a specific topic.
proficiency_score = ProficiencyScore(
topic_id="addition",
score=ProficiencyScoreName.PROFICIENT
)
Create a Proficiency Score, numerically
All score are internally numeric from 0.0 to 1.0, even if set using the score name (above).
proficiency_score = ProficiencyScore(
topic_id="arithmetic",
score=0.8 # Same as 'ProficiencyScoreName.PROFICIENT'
)
Issue a Transcript Entry
A Transcript Entry associates a proficiency score to a user and is claimed by an issuer.
from openproficiency import TranscriptEntry
# Create a transcript entry
entry = TranscriptEntry(
user_id="john-doe",
topic_id="arithmetic",
score=0.9,
issuer="university-of-example"
)
# Access the transcript entry information
print(entry.user_id) # john-doe
print(entry.proficiency_score.score) # 0.9
print(entry.issuer) # university-of-example
print(entry.timestamp) # datetime object
# Convert to JSON for storage or transmission
entry_json = entry.to_json()
How to Develop
This project is open to pull requests.
Please see the contribution guide to get started.
Metadata
Release files for openproficiency 0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| openproficiency-0.0.3.tar.gz | 17.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| openproficiency-0.0.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 26.3 kB
Release files / openproficiency-0.0.3.tar.gz
| Download URL | openproficiency-0.0.3.tar.gz |
|---|---|
| Size | 17.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6d48697a2bf82ee681ff3dfbe9170ff6fa45c87f32403ba3a8c24e764f30bd27
|
|
BLAKE2b-256 checksum How to use checksums |
ca4f5cfc04f5b0e0ce9556657efc75046e7f54e5f1264c48ff07752824094c14
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.19
|
Release files / openproficiency-0.0.3-py3-none-any.whl
| Download URL | openproficiency-0.0.3-py3-none-any.whl |
|---|---|
| Size | 8.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fb8362d669124d7a094b7e5e4e1cb61c3840d24428cff4c0efc8f013d44ba095
|
|
BLAKE2b-256 checksum How to use checksums |
9b30408e17ceee1efdbf47bc509a9cad7c8a347ae1cf5ec2ea5f8712970b135d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.19
|