Skip to main content

Crunch CLI

PyTest

This Python library is designed for the Crunch Hub, offering convenient access to competition's data and enabling effortless submission. When utilized in the command-line interface (CLI), its goal is to deliver a user experience akin to GitHub, enabling you to seamlessly push the code from your local environment.

Installation

Use pip to install the crunch-cli.

pip install crunch-cli --upgrade

Usage

Setup your environment

Go to any competition's page and click on the 'Submit' section. Then copy and paste the command into your terminal.

Reveal your token (animation)

Write your model

import crunch
crunch_tools = crunch.load_notebook()

# load the data
data = crunch_tools.load_data()

# define your model
def train(): ...
def infer(): ...

# test your model
crunch_tools.test()

Detecting the environment

Being able to detect whether you are running inside the Runner allows you to configure your programme more precisely.

import crunch

if crunch.is_inside_runner:
  print("running inside the runner")
else:
  print("running elsewhere")

  model.enable_debug()
  logger.set_level("TRACE")

Submit with Crunch CLI

Usage: crunch push [OPTIONS]

  Send the new submission of your code.

Options:
  -m, --message TEXT      Specify the change of your code. (like a commit message, limited to 1000 characters)
  --main-file TEXT        Entrypoint of your code.  [default: main.py]       
  --model-directory TEXT  Directory where your model is stored.  [default: resources]
  --no-pip-freeze         Do not do a `pip freeze` to know preferred packages version.
  --dry                   Prepare file but do not really create the submission.

Contributing

Pull requests are always welcome! If you find any issues or have suggestions for improvements, please feel free to submit a pull request or open an issue in the GitHub repository.

License

MIT

Metadata

Release files for crunch-cli 13.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for crunch-cli 13.2.0
File Size Uploaded Provenance Actions
crunch_cli-13.2.0.tar.gz 109.8 kB Without provenance Details for crunch_cli-13.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for crunch-cli 13.2.0
File Interpreter ABI Platform Actions
crunch_cli-13.2.0-py3-none-any.whl Python 3 none any Details for crunch_cli-13.2.0-py3-none-any.whl

Total release size: 252.0 kB

Release files / crunch_cli-13.2.0.tar.gz

Download URL crunch_cli-13.2.0.tar.gz
Size 109.8 kB
Tags Source
SHA-256 checksum
How to use checksums
0c2ea39717e073d12331cf4d9b595013936e0621f76ecd001e4e1f320bee1484
BLAKE2b-256 checksum
How to use checksums
ec45c13f2a8f2fd6339c2d4b20fa1ac2e5414fa9a973e8ab24cf9350a3cf2e8b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / crunch_cli-13.2.0-py3-none-any.whl

Download URL crunch_cli-13.2.0-py3-none-any.whl
Size 142.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
37f3cda316d99e2173b2ba4e4a7c1087e75b4773469c34fa122529a0f0746246
BLAKE2b-256 checksum
How to use checksums
462cfe95e505f11c36a51528a073f5274e0fd58c8719fb60e0638911ba252c70
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Security for crunch-cli 13.2.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.

Release history Release notifications | RSS feed

This release

13.2.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page