Skip to main content

Command-line client and Python helper for ReInfo (reinfo.ro) - submit solutions, check status, scaffold problems, and work with AI/dataset problems from your terminal or notebook.

Project description

reinfo

Command-line client and Python helper for reinfo.ro - submit solutions, check status, scaffold problems, and work with AI/dataset problems from your terminal or notebook.

Install

pip install reinfo-cli

# for the dataset helper (get_dataset / submit_predictions), which needs pandas:
pip install reinfo-cli[dataset]

Usage

reinfo login                          # opens your browser to authorize this machine
reinfo whoami                         # show the logged-in account
reinfo problems                       # list problems
reinfo init two-sum --lang cpp        # scaffold ./two-sum with the statement + a starter file
reinfo submit two-sum solution.cpp --lang cpp
reinfo status                         # your most recent submission
reinfo status <submission-id>         # a specific submission

Every command accepts --json for machine-readable output and --locale ro|en for the output language (Romanian by default). reinfo --help and reinfo <command> --help list all options.

Credentials

reinfo login uses a device-authorization flow: it prints a short code, opens your browser to confirm it on your already-logged-in reinfo.ro session, and stores the issued token in ~/.reinfo/credentials.json (readable only by you). No password ever touches the CLI.

For CI or scripting, skip login entirely and set REINFO_TOKEN - generate a token via the browser flow once, then export it as a secret. REINFO_API_URL overrides the API base URL (useful for pointing at a local dev backend).

Dataset helper

import reinfo

data = reinfo.get_dataset("titanic-survival")  # cached ~/.reinfo/cache/, 6h TTL
data.train, data.test, data.sample_submission  # pandas DataFrames

predictions = data.sample_submission.copy()
predictions["target"] = 0

result = reinfo.submit_predictions("titanic-survival", predictions)
print(result["verdict"], result["score"])

submit_predictions validates the DataFrame's columns and row count against the problem's requirements before uploading, and polls until the submission is judged (raises reinfo.DatasetError on timeout or reinfo.ValidationError on bad input). Uses the same reinfo login credentials as the CLI.

Development

cd cli
uv venv
uv pip install -e ".[dev]"
pytest
ruff check .

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

reinfo_cli-0.1.0.tar.gz (12.1 kB view details)

Uploaded Source

Built Distribution

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

reinfo_cli-0.1.0-py3-none-any.whl (11.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: reinfo_cli-0.1.0.tar.gz
  • Upload date:
  • Size: 12.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for reinfo_cli-0.1.0.tar.gz
Algorithm Hash digest
SHA256 bb00eba93164b77486998791763e998b03da6097dece82ee0cc4c42a5f341818
MD5 ed3cb78caa77f4dd95664a9f7fe1ee4c
BLAKE2b-256 f9172a55322927a3b029128eae93855dfb4b62768a9a5e38be4adc5c046b8bfa

See more details on using hashes here.

File details

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

File metadata

  • Download URL: reinfo_cli-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 11.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for reinfo_cli-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 21436504fd580e927c625e26143636238f04a1a638ae29587541ad7b083a2b21
MD5 75171808931d5ac528a3bd23f8c470b3
BLAKE2b-256 2781fdc65a9e91aa294186af34a56356c36ff74d71fa2170bb32b4368b18ce06

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