A python library for interacting with the petlja.org API
Project description
petlja_api
A python library for interacting with the petlja.org API.
Installation
pip install petlja-api
Basic usage
import petlja_api as petlja
session = petlja.login()
# Create problem
prob_id = petlja.create_problem(session, name="My Problem", alias="my-prob")
petlja.upload_testcases(session, prob_id, "my-prob/testcases.zip")
petlja.upload_statement(session, prob_id, "my-prob/statement.md")
# Create competition
comp_id = petlja.create_competition(session, name="My Competition", alias="my-comp")
petlja.add_problem(session, comp_id, prob_id)
# Upload solution
score = petlja.submit(session, prob_id, "my-prob/sol.cpp", comp_id)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
petlja_api-0.4.0.tar.gz
(14.6 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file petlja_api-0.4.0.tar.gz.
File metadata
- Download URL: petlja_api-0.4.0.tar.gz
- Upload date:
- Size: 14.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.25
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
16c219c1a892d70bccee11280ac106d671d13a252eafdc4c241e602ac029056a
|
|
| MD5 |
75455bd08dd765fc48e41b4d5b993fbb
|
|
| BLAKE2b-256 |
3596e6389d50baa15e2c035376095d25960e1e771ead23273f393d4745dea985
|
File details
Details for the file petlja_api-0.4.0-py3-none-any.whl.
File metadata
- Download URL: petlja_api-0.4.0-py3-none-any.whl
- Upload date:
- Size: 9.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.25
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e22afdd16f5a47e2d73e5fdaf0b116ee7a23c6a21214a10c114b9fabbb06462d
|
|
| MD5 |
5ea02438256186ec91547a60a1281cef
|
|
| BLAKE2b-256 |
058e00d9865e20030e519d854a3357f9697a2d9813ff7643a6113ec0b603a668
|