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.3.0.tar.gz
(14.1 kB
view hashes)
Built Distribution
Close
Hashes for petlja_api-0.3.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e274f4df7c48fd827466300dcb5e71e56617a796c5e84117811faaf0723d42da |
|
MD5 | 0d76912e7a52faffbcd380ab37382d36 |
|
BLAKE2b-256 | 4620337c474df7b48422b80f6da84675775f27375cf9f044ed6c28524b7919dc |