Report Bug · Request Feature · Ask Question · Report security bug
codewars-solver is a Python package that allows you to solve Codewars katas from the command line and automatically submit them to the platform. Once the kata is solved, the program will automatically create a new file with the solution in the appropriate directory. It also allows you to upload the solution to your personal GitHub repository to keep track of your progress, share your solutions with the community and store your collection of solved katas.
All the functionalities can be described in the following steps:
-
1. The program will ask you to enter your
Codewars usernameandAPI key. This information will be stored in a configuration file in your system's configuration directory. This information is required to submit the solutions to the platform. -
2. The program will ask you to select the programming language you want to use to solve the kata. The program will then create a new file with the kata's name in the appropriate directory. The file will contain the kata's description and a template with the function to be implemented.
-
3. Once the kata is solved, the program will automatically submit the solution to the platform and create a new file with the solution in the appropriate directory. The program will also ask you if you want to upload the solution to your personal GitHub repository. If you choose to do so, the program will create a new branch with the solution and open a pull request to merge the branch with the main branch.
Table of Contents
Here's a breakdown of the packages needed and their versions:
- platformdirs - 3.10.0
- rich - 13.5.2
- rich-argparse-plus - 0.3.1.4
- tqdm - 4.66.1
Note
The software has been developed and tested using Python 3.11.4. The minimum required version to run the software is Python 3.6. Although the software may work with previous versions, it is not guaranteed.
codewars-solver can be installed easily as a PyPI package. Just run the following command:
pip3 install codewars-solverImportant
For best practices and to avoid potential conflicts with your global Python environment, it is strongly recommended to install this program within a virtual environment. Avoid using the --user option for global installations. We highly recommend using pipx for a safe and isolated installation experience. Therefore, the appropriate command to install codewars-solver would be:
pipx install codewars-solverThe program can now be ran from a terminal with the codewars-solver command.
If you prefer to install the program manually, follow these steps:
Warning
This will install the version from the latest commit, not the latest release.
-
Download the latest version of codewars-solver from this repository:
git clone https://github.com/yisuschrist/codewars-solver cd codewars-solver -
Install the dependencies:
poetry install --only main
-
Run the following commands to install codewars-solver in your
/usr/bin/directory:poetry run codewars-solver
The program can now be ran from a terminal with the codewars-solver command.
If you installed it from PyPI, you can use the following command:
pipx uninstall codewars-solverTo run the codewars-solver script, you can use the following command:
codewars-solver [OPTIONS]where [OPTIONS] are the command line options described below:
Before you participate in our delightful community, please read the code of conduct.
I'm far from being an expert and suspect there are many ways to improve – if you have ideas on how to make the configuration easier to maintain (and faster), don't hesitate to fork and send pull requests!
We also need people to test out pull requests. So take a look through the open issues and help where you can.
See Contributing Guidelines for more details.
codewars-solver is released under the GPL-3.0 License.
This package was partially created with Cookiecutter and adapted from the @cjolowicz's Hypermodern Python Cookiecutter project template.