Skip to main content

Python CLI for Everybody Codes

Project description

python-ecd logo

✨ A Python CLI tool for managing Everybody Codes puzzles ✨

Code Quality Release PyPI Latest Release PyPI Downloads versions


💛 Acknowledgements

This tool relies on the Everybody Codes Data library. Shout out to @wimglenn!

📋 Features

  • Initialize workspace for Everybody Codes puzzles
  • Download puzzle inputs automatically
  • Manage session tokens securely
  • Run solutions with both test and real input data
  • Submit solutions and check if they are correct

📦 Installation

The package can be installed using uv, which is recommended for better dependency management and faster installations:

# Install it as a system tool
uv tool install python-ecd

# Otherwise use:
uvx python-ecd

The tool will be available as both 'python-ecd' and 'ecd'

💻 Usage

Initialize a Workspace

Create a new workspace for your puzzles solutions:

It can be done in the current directory:

ecd init

Or in a specified path:

ecd init everybody-codes-solutions

Note that if the directory does not exist, it will be created.

Options:

  • --force, -f: Overwrite existing files

Set Session Token

Configure your session token for accessing puzzle inputs:

ecd set-token <TOKEN>

Note that is not necessary if you set it during initialization.

Download Puzzle Input

Download the input for all available part

ecd pull <QUEST_NUMBER> [OPTIONS]

Options:

  • --year, -y: Event year (default: actual)
  • --force, -f: Overwrite existing files

This command will create the necessary dirs and files if they do not exist.

Test Solutions

Run your solution using test data:

ecd test <QUEST_NUMBER> [OPTIONS]

Options:

  • --year: Event year (default: actual)
  • --part: Part number to test (default: 1)

Run Solutions

Execute your solution for a specific puzzle:

ecd run <QUEST_NUMBER> [OPTIONS]

Options:

  • --year: Event year (default: actual)
  • --part: Part number to execute (default: 1)

Submit Solutions

Submit your solution for a specific puzzle:

ecd push <QUEST_NUMBER> [OPTIONS]

Options:

  • --year: Event year (default: actual)
  • --part: Part number to test (default: 1)

Note that next available part (if exists) will be pulled automatically if the result is correct.

Display Version

Show the current version of the tool:

ecd --version

©️ License

This project is licensed under the terms of the MIT license.

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

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

python_ecd-0.2.2.tar.gz (6.7 kB view details)

Uploaded Source

Built Distribution

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

python_ecd-0.2.2-py3-none-any.whl (9.3 kB view details)

Uploaded Python 3

File details

Details for the file python_ecd-0.2.2.tar.gz.

File metadata

  • Download URL: python_ecd-0.2.2.tar.gz
  • Upload date:
  • Size: 6.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.8

File hashes

Hashes for python_ecd-0.2.2.tar.gz
Algorithm Hash digest
SHA256 c1d40f004e19346d125a021ef93823250b7db0b1a8869a4f0f01b6e3931e3139
MD5 6cb6d664d8dd0613a1819a280b6dac7f
BLAKE2b-256 14d47334e8c3f50e32851d39ce4fe5abbbf3a9a238c288349d61dfaaf96646f4

See more details on using hashes here.

File details

Details for the file python_ecd-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: python_ecd-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 9.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.8

File hashes

Hashes for python_ecd-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e2f880f4dc84b7ac231336b5de63a4bb4b4fcd6d0b8436c486e4e2bf693cde89
MD5 a5e1615bff7f393271fd2a5c11fbe928
BLAKE2b-256 9d9c40412d85936905ce4abd329ed34c6a38d6f4987a1204dd1224f810aaed4b

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