CodeGrade API
This library makes it easier to use the CodeGrade API. Its API allows you to automate your usage of CodeGrade. We are currently still busy documenting the entire API, but everything that is possible in the UI of CodeGrade is also possible through the API.
Installation
You can install the library through pypi, simply run
python3 -m pip install codegrade. If you want to get a dev version with support
for the latest features, simply email support@codegrade.com
and we'll provide you with a dev version.
Usage
First, create a client:
import codegrade
# Don't store your password in your code!
with codegrade.login(
username='my-username',
password=os.getenv('CG_PASSWORD'),
tenant='My University',
) as client:
pass
# Or supply information interactively.
with codegrade.login_from_cli() as client:
pass
Now call your endpoint and use your models:
from codegrade.models import PatchCourseData
courses = client.course.get_all()
for course in courses:
client.course.patch(
PatchCourseData(name=course.name + ' (NEW)'),
course_id=course.id,
)
# Or, simply use dictionaries.
for course in courses:
client.course.patch(
{"name": course.name + ' (NEW)'},
course_id=course.id,
)
For the complete documentation go to https://python.api.codegrade.com.
Backwards compatibility
CodeGrade is constantly upgrading its API, but we try to minimize backwards
incompatible changes. We'll announce every backwards incompatible change in the
changelog. A new version of the API
client is released with every release of CodeGrade, which is approximately every
month. To upgrade simply run pip install --upgrade codegrade.
Supported python versions
We support python 3.6 and above, pypy is currently not tested but should work
just fine.
License
The library is licensed under AGPL-3.0-only or BSD-3-Clause-Clear.
Metadata
Release files for codegrade 18.0.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| codegrade-18.0.5.tar.gz | 335.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| codegrade-18.0.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 1.1 MB
Release files / codegrade-18.0.5.tar.gz
| Download URL | codegrade-18.0.5.tar.gz |
|---|---|
| Size | 335.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
77696c536619f56b241dea7efb5e454088f2ac048dea9332c562b8460697f4df
|
|
BLAKE2b-256 checksum How to use checksums |
ed674088cb7a936f6ffb78f6e6f9c4a26c84bbbfe68dc7f42abe9e831cff32dd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 1, 2026.
Transparency logRelease files / codegrade-18.0.5-py3-none-any.whl
| Download URL | codegrade-18.0.5-py3-none-any.whl |
|---|---|
| Size | 781.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
08942d4d9a2e39c11a0f3aef4ae4af1885ba4a1317e9412f229128cbfad4cf41
|
|
BLAKE2b-256 checksum How to use checksums |
e38541a02f7147d8fae2f67b58626d62a42477aebce71105e4173b6bc5e92b37
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 1, 2026.
Transparency log