Kattis API
A python wrapper for the non-existent Kattis API.
Usage
You can simply install the package using pip
$ pip install kattis
Getting Started
import the kattis module
import kattis
Examples
Some examples to get started.
Authentication
You can authenticate a Kattis user by calling kattis.auth, this will
return a KattisUser object with a few callable methods.
user = kattis.auth('username', 'password')
User Methods
Methods that are callable on a KattisUser object.
user.problems(pages) -> dict: Fetches solved user problems
user.stats() -> dict: Fetches relevant user statistics
user.data() -> dict: Combines problems and statistics
user = kattis.auth('username', 'password')
problems = user.problems(1)
stats = user.stats()
info = user.data()
Problems
You can fetch kattis problems by ID or by full pages
kattis.problem(id) -> dict: Fetches problem information for a single problem
kattis.problems(pages) -> list[dict] Fetches problem information across specified pages
problem = kattis.problem('2048') # Fetches information for problem with ID '2048'
problems = kattis.problems(2) # Fetches all problems on first 2 pages
Metadata
Release files for kattis 1.0.0
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 |
|---|---|---|---|---|
| kattis-1.0.0.tar.gz | 4.9 kB | Without provenance | Details for kattis-1.0.0.tar.gz |
Release files / kattis-1.0.0.tar.gz
| Download URL | kattis-1.0.0.tar.gz |
|---|---|
| Size | 4.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c8e1ecb60fd62af49ca92478c913ce90ac66ee682e1bf0ff8867c352ff8624f9
|
|
BLAKE2b-256 checksum How to use checksums |
a584b30bd7c807c2ab7202286066e3f9c71ff62005a99175a8b445f479f57c16
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.2
|
Security for kattis 1.0.0
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.