Skip to main content

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.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for codegrade 18.0.7
File Size Uploaded
codegrade-18.0.7.tar.gz 336.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for codegrade 18.0.7
File Interpreter ABI Platform
codegrade-18.0.7-py3-none-any.whl Python 3 none any Details

Total release size: 1.1 MB

Release files / codegrade-18.0.7.tar.gz

Download URL codegrade-18.0.7.tar.gz
Size 336.7 kB
Tags Source
SHA-256 checksum
How to use checksums
3d23e75df3eec9684fddbe3c40a98b0c82f97e5f8b053e5ca868b7ff61efaa82
BLAKE2b-256 checksum
How to use checksums
c6f934dd33f13f00a7a45bf67b21cc32144ebf61acde398a2c7aaefc8a2e8639
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 8, 2026.

Transparency log

Release files / codegrade-18.0.7-py3-none-any.whl

Download URL codegrade-18.0.7-py3-none-any.whl
Size 783.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d634c2e90640282b0d4d4f593dccc2a57bd29ce7cb1d0432c85337fef68144bd
BLAKE2b-256 checksum
How to use checksums
d5f3ef096c4e648e5c7bcfb86b618b19f4926d1c8cca94cbcf33cdc52b448d4e
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 8, 2026.

Transparency log

Release history Release notifications | RSS feed

18.0.9

2 release files

18.0.8

2 release files

This release

18.0.7 This release

2 release files

18.0.4

2 release files

18.0.2

2 release files

18.0.1

2 release files

18.0.0

2 release files

17.0.9

2 release files

17.0.8

2 release files

17.0.7

2 release files

17.0.4

2 release files

17.0.3

2 release files

16.1.9

2 release files

16.1.8

2 release files

16.1.6

2 release files

16.1.5

2 release files

16.1.4

2 release files

16.1.2

2 release files

16.1.1

2 release files

16.1.0

2 release files

16.0.0

2 release files

15.1.0

2 release files

15.0.0

2 release files

14.3.0

2 release files

13.2.1

2 release files

13.2.0

2 release files

13.1.3

2 release files

13.1.2

2 release files

13.1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page