Skip to main content

A CLI tool for solving Kattis problems with python.

Project description


A CLI tool for solving Kattis problems with python.


pip install pykattis


To create a solution for a problem, run:

pykattis create {problem_id}

where problem_id is the Kattis problem ID. This creates the directory problems/{problem_id} in the current working directory with the files, an file, and downloads the sample input-anwer pairs to a samples.json file.

The is where you will be writing the solution to the problem. Inside it is a function solve(input_: str) -> str:, which you will fill out with your program as you see fit. This function is called by the commands kattis run and kattis test.

To simply run the program as a script, run:

pykattis run {problem_id}

and to test it on the sample input-answer pairs defined in samples.json, run:

pykattis test {problem_id}

To upload the solution to Kattis, you can submit the problem's file through Kattis's web form. However, this is a temporary solution. In a future version, you will be able to publish your solution to Kattis directly through pykattis.

If you, for some reason, just want to download a problem's samples, you can run:

pykattis download_samples {problem_id}

It is recommended to use a VCS, like git, to keep track of your solutions.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for pykattis, version 0.0.3
Filename, size File type Python version Upload date Hashes
Filename, size pykattis-0.0.3-py2.py3-none-any.whl (8.2 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size pykattis-0.0.3.tar.gz (5.8 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page