codePost API Python SDK
This package provides a Python library to conveniently access the codePost API from any application or script written in the Python language.
You can learn more about codePost, the best tool for educational code feedback, or check out the documentation for powerful, best-in-class REST API that this Python SDK allows you to control.
You can also dive in directly with the codePost API Python SDK cheatsheet.
Quickstart
This section provides a quick overview of how to install the library and getting started, for more complete information, you can reference our First Steps with the codePost API Python SDK.
- This codePost API Python SDK is available on the Python package manager PyPi, and can be installed from all
usual sources, such as with
pip:sudo pipenv install codepost
You can also install the package just for your account (pip install --user codepost) or using a tool such aspipenvwhich will install the library in a virtual environment (pipenv install codepost). - Once you've import the
codepostpackage, you need to configure it with the API key you've obtained from your Settings page (for other means of setting the API key, read here):import codepost codepost.configure_api_key("ddafde24389de98434f8df3ee482389de98432afde24482f3428923491344f8df3eef34892349134")
- You can then directly access the codePost objects:
course = codepost.course.list_available(name="CS101", period="Spring 2020")[0] assignment = course.assignments.by_name("Hello World") submissions = assignment.list_submissions() for submission in submissions: print("{student},{grade}", student="+".join(submission.students), grade=submission.grade)
to print the grades of all submissions of the assignment"Hello World"of the course CS101 in Spring 2020.
Development
The codePost API Python SDK is under active development. At this time, we are welcoming all issues, suggestions and feature requests. Please either post a GitHub issue on this repository, or join our Gitter channel to ask a question.
Running tests
To start developing, install pipenv, then install
all dependencies (including development dependencies, with the flag --dev) for this project:
git clone https://github.com/codepost-io/codepost-python
cd codepost-python
pipenv install --dev
Run all tests on all supported versions of Python which you have locally installed:
make test
Run all tests for a specific Python version (modify -e according to your Python target):
pipenv run tox -e py37
Run all tests in a single file for a specific Python version:
pipenv run tox -e py37 -- tests/util/test_misc.py
Metadata
Release files for codepost 0.3.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 |
|---|---|---|---|---|
| codepost-0.3.2.tar.gz | 37.1 kB | Without provenance | Details for codepost-0.3.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| codepost-0.3.2-py3-none-any.whl | Python 3 | none | any | Details for codepost-0.3.2-py3-none-any.whl |
Total release size: 87.7 kB
Release files / codepost-0.3.2.tar.gz
| Download URL | codepost-0.3.2.tar.gz |
|---|---|
| Size | 37.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
13028c7d7fd654d88442318569dd877ae841e195a4823ba7518dd233bdf5390c
|
|
BLAKE2b-256 checksum How to use checksums |
5999c82f4eb6a66bb8d0910dfde4556c8f8336300ddf2b8aeeb886ece82826bf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.8.18
|
Release files / codepost-0.3.2-py3-none-any.whl
| Download URL | codepost-0.3.2-py3-none-any.whl |
|---|---|
| Size | 50.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8bd1254bd2d94cd3d95fd337b3e60549a26bb5f09d2193c1bf31d80e78822e46
|
|
BLAKE2b-256 checksum How to use checksums |
fac5b0c08808f9ca8ba66e895713323a833ab8e846f717768c732707af32202a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.8.18
|
Security for codepost 0.3.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.