Skip to main content

A CLI for competitors in any Code Battles event!

Project description

Code Battles CLI

A CLI for competitors in any Code Battles event!

🏃 Getting Started  ·  💡 Features  ·  🚗 Roadmap

Getting Started

  • Install the library by running pip install code-battles-cli.
  • Make sure you have the Python scripts folder in your path by running code-battles --help.
  • If that fails, run py -m code_battles_cli --help.

The first time you run any command you will be asked for your URL, username and password, and they'll be saved in a code-battles.json file for successive calls.

Features

Downloading the bots

You can download all of the bots your team has by running code-battles download.

Uploading a bot

You can update a bot in the website by running code-battles upload bots/example.py (in this case the bot's name will be example).

If you want to choose a custom bot name, you can run code-battles upload bots/example.py -n myamazingbot.

Usage in Scripts

You can import the code_battles_cli.api module and utilize its Client class to hack Code Battles for your needs!

Example:

from code_battles_cli.api import Client

client = Client()

print(client.get_bots())

Roadmap

  • Download bots.
  • Upload bots.
  • Run no-UI simulations locally.
  • Be usable in scripts.

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

code_battles_cli-0.1.1.tar.gz (5.6 kB view details)

Uploaded Source

Built Distribution

code_battles_cli-0.1.1-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

Details for the file code_battles_cli-0.1.1.tar.gz.

File metadata

  • Download URL: code_battles_cli-0.1.1.tar.gz
  • Upload date:
  • Size: 5.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.2

File hashes

Hashes for code_battles_cli-0.1.1.tar.gz
Algorithm Hash digest
SHA256 a8419a4f0fa44f7615e746d8a3954368eef1b73f2c12a5ad4b3260a3929edbc7
MD5 af4455e479be5b19371a454c3064b223
BLAKE2b-256 84298e96c66eee27e7ddd818bc1a208d5589998420a070af393ee07f2d77d78d

See more details on using hashes here.

File details

Details for the file code_battles_cli-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for code_battles_cli-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 82b0ee988bb5a7269aea1d6e105aba87b6caf04d42cf2756cdd1377bfab1a910
MD5 93247c1279030acbb6ca1f3124518471
BLAKE2b-256 efc96ddd060f4b0da2bcf33472a3314a25860e4fdbea3ae92167e360563d4384

See more details on using hashes here.

Supported by

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