A client library for accessing CodeGrade
Project description
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file codegrade-16.1.74.tar.gz
.
File metadata
- Download URL: codegrade-16.1.74.tar.gz
- Upload date:
- Size: 255.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d74bedfdfbfa993504a74102ea9188bb32cb8a99f11f6b9a0da6a3e030ff191c |
|
MD5 | d48aed81c446812c7d9602f030eaa25c |
|
BLAKE2b-256 | a1d7f8eda4aabfd06037f4c84531a5aacbedd476bd7fd0c767203fd710e89ba2 |
Provenance
The following attestation bundles were made for codegrade-16.1.74.tar.gz
:
Publisher:
production_build.yml
on CodeGra-de/CodeGra.de
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
codegrade-16.1.74.tar.gz
- Subject digest:
d74bedfdfbfa993504a74102ea9188bb32cb8a99f11f6b9a0da6a3e030ff191c
- Sigstore transparency entry: 152811574
- Sigstore integration time:
- Predicate type:
File details
Details for the file codegrade-16.1.74-py3-none-any.whl
.
File metadata
- Download URL: codegrade-16.1.74-py3-none-any.whl
- Upload date:
- Size: 654.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 51b5d93259cd841e91a75cacab62ea0aefb2b1b29c793072c6a3e104909bb441 |
|
MD5 | 14f0daadbe6e3460e7944630fc446692 |
|
BLAKE2b-256 | 1609c23a15c129cc86a1fcce35ec12e6731ec71cf3c2237904b1bfc9ff14d660 |
Provenance
The following attestation bundles were made for codegrade-16.1.74-py3-none-any.whl
:
Publisher:
production_build.yml
on CodeGra-de/CodeGra.de
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
codegrade-16.1.74-py3-none-any.whl
- Subject digest:
51b5d93259cd841e91a75cacab62ea0aefb2b1b29c793072c6a3e104909bb441
- Sigstore transparency entry: 152811581
- Sigstore integration time:
- Predicate type: