cputils
Utilities for Competitive Programming.
Features:
- Download samples from kattis, aceptaelreto, adventofcode.
- Test in c, cpp, python, java, rust, ruby, bash, nim.
- Submit to kattis.
- Interactive CLI menu.
Tests only for complete textual match, ignoring leading and trailing whistespaces.
Installation
Assuming you have a Python3 distribution with pip, install the package running:
pip3 install cputils
Usage
Typically you'll want to work on a dedicated repo/folder for your task (solving the problems in a server, preparing problems...). You should first create a configuration file defining how cputils will work on that repo/folder and then use the CLI or the commands to work in it.
cpconfig
To create a config file, run
cpconfig
cpsamples
To download the samples of a problem run
cpsamples <problem>
cptest
To test a solution or set of solutions run
cptest <problem>/<solution(s)>
Pro-tip: you can use glob patterns like problem/code* or problem/*.py.
cpsubmit
To submit a solution (only kattis)
cpsubmit <problem>/<solution(s)>
cpmenu
To run an interactive CLI
cpmenu
Yo can also provide the problem and language with the arguments, or change it in the menu. See help (h) for more info.
Development
Testing
Testing requires installing the test extra. Furthermore, some tests require the languages to be installed and available.
To run all tests:
make test
To run a single test module:
pytest tests/test_<test_name>.py
Metadata
Release files for cputils 0.6.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 |
|---|---|---|---|---|
| cputils-0.6.0.tar.gz | 15.4 kB | Without provenance | Details for cputils-0.6.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| cputils-0.6.0-py3-none-any.whl | Python 3 | none | any | Details for cputils-0.6.0-py3-none-any.whl |
Total release size: 30.3 kB
Release files / cputils-0.6.0.tar.gz
| Download URL | cputils-0.6.0.tar.gz |
|---|---|
| Size | 15.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9690bb0fb617cabd9ad38c1c82436315805fb2c063ef43d436581c34b4a0fd49
|
|
BLAKE2b-256 checksum How to use checksums |
44ecdb5089451032a7a2613ea981b969247a14f4a7b1f65f5664b80c00f29b0a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.25
|
Release files / cputils-0.6.0-py3-none-any.whl
| Download URL | cputils-0.6.0-py3-none-any.whl |
|---|---|
| Size | 14.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2ec14c3121736dcb25cd764193f31b0a7a9f78583490af2778a81b9135a029a8
|
|
BLAKE2b-256 checksum How to use checksums |
1f173c44c35407ee9560fdf9c1292420e7ec036b7ae1c652bd0eba9f8e1e3125
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.25
|
Security for cputils 0.6.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.