Skip to main content

A python cli tool for cannjudge

Project description

CannJudge CLI

CLI tool for the CannJudge coding platform — pull problems, submit solutions, and check results from the terminal.

Install

uv tool install cannjudge

Usage

# login (cookies cached by typer.get_app_dir)
cannjudge login

# pull a problem template
cannjudge pull addcmul

# edit source files, then submit (reads cannjudge.toml)
cd addcmul
cannjudge submit

# submit with auto-polling
cannjudge submit --watch

# refresh template files in current project
cannjudge pull

# check latest result
cannjudge result --watch

Commands

Command Description
login Login and cache credentials locally
logout Clear cached credentials
whoami Show current user
problems [-c CONTEST] List available problems
pull [problem] [-c CONTEST] [-o DIR] Pull / refresh template, create cannjudge.toml
submit [DIR] [--watch] [-i SEC] Submit code (reads cannjudge.toml)
result [id] [--watch] [-i SEC] View / poll submission result

Workspace

After pull, the output directory contains:

addcmul/
├── cannjudge.toml        # [contest], [problem], [[files]]
├── operator.md           # problem description
├── CMakeLists.txt
├── op_host/
│   └── addcmul.cpp
└── op_kernel/
    ├── addcmul.cpp
    └── ...

Development

git clone <repo> && cd cannjudge
uv sync
uv run pytest                  # 32 tests
uv run cannjudge --help

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

cannjudge-0.1.0.tar.gz (28.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cannjudge-0.1.0-py3-none-any.whl (8.7 kB view details)

Uploaded Python 3

File details

Details for the file cannjudge-0.1.0.tar.gz.

File metadata

  • Download URL: cannjudge-0.1.0.tar.gz
  • Upload date:
  • Size: 28.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.6

File hashes

Hashes for cannjudge-0.1.0.tar.gz
Algorithm Hash digest
SHA256 3a985286e4aa729f3556b98c443d0939459612b19bb93c4da2f948b11bc8cb8c
MD5 3ce390f94d1ce8289055cab3033a0796
BLAKE2b-256 52fdf0a6aa450ffa129b7b859b8aad48ff994bd36cb3b2e9b29ae35039ead0f0

See more details on using hashes here.

File details

Details for the file cannjudge-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: cannjudge-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 8.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.6

File hashes

Hashes for cannjudge-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bd47c14230fa290b3b8efa04c369934cec9aad60336ff811308d74b9dfe4a4ca
MD5 77d965821f87b14d186abc5c9f2874d1
BLAKE2b-256 cb6016c893c245f9839f1db49f0e5cee8c891791edab7cce25f5f38dc22d04d0

See more details on using hashes here.

Supported by

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