Skip to main content

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 details)

Uploaded Source

Built Distribution

petlja_api-0.3.0-py3-none-any.whl (9.0 kB view details)

Uploaded Python 3

File details

Details for the file petlja_api-0.3.0.tar.gz.

File metadata

  • Download URL: petlja_api-0.3.0.tar.gz
  • Upload date:
  • Size: 14.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.20

File hashes

Hashes for petlja_api-0.3.0.tar.gz
Algorithm Hash digest
SHA256 f28c6c613d84b0c6c8202c9958ccdcaab15fe029ce340584d8cea38924070421
MD5 26dfaef4463ddb53826af01dc42f7ae0
BLAKE2b-256 4d0ac37a107938fc31ae4dd3224de3d353be1ea62b644a5e293fe0f25ec5609c

See more details on using hashes here.

File details

Details for the file petlja_api-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: petlja_api-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 9.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.20

File hashes

Hashes for petlja_api-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e274f4df7c48fd827466300dcb5e71e56617a796c5e84117811faaf0723d42da
MD5 0d76912e7a52faffbcd380ab37382d36
BLAKE2b-256 4620337c474df7b48422b80f6da84675775f27375cf9f044ed6c28524b7919dc

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page