General purpose CLI
Project description
icli
Development set up
Without Docker
- You need to install poetry
- Run
poetry install - Run
poetry run python src/main.py - Run
poetry run python src/main.py --name=Batman --count=2 - Run
poetry run python src/main.py --help
With Docker
- Prerequisite: being able to run
make - Running
makewill show you all the possible actions
Decisions taken and personal notes
- Origin of the name:
- i(si) + cli
- or the typical iAnything :-)
- Library used: Click
- The examples of code seen look simpler
- Good opinions in several posts with comparisons with Docopts or Argparse
- Looks like a "modern" way of creating a CLI in 2022
- Used by AWS
- Dependencies with poetry
poetry show -vpoetry env list
- The ENTRYPOINT is the execution of the main file.
Resources
- Video tutorial: Building Command Line Applications with Click - 18 minutes
- Click examples
- https://github.com/CodiumTeam/docker-training
- https://jackmckew.dev/packaging-python-packages-with-poetry.html
TO DO
- Rename to isis-cli
- Package it to be installed from PyPI, e.g.
pip install icli - Make possible to run it
- Integrate GitHub action for running tests
- Integrate GitHub action for PyPI publication
- Version it
- Use mypy
- Use black formatter
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
isis-cli-0.1.2.tar.gz
(2.5 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file isis-cli-0.1.2.tar.gz.
File metadata
- Download URL: isis-cli-0.1.2.tar.gz
- Upload date:
- Size: 2.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.12 CPython/3.8.12 Linux/5.13.0-51-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e8f08b627eee34e9322bb69f1ba685c833f78a7ce853549d2a0b20328f002974
|
|
| MD5 |
6869492a61c33a57183f81d03bb238a8
|
|
| BLAKE2b-256 |
355a28890b38247a631e8f433e142a71425462bc22e4336548bea822717d4a7c
|
File details
Details for the file isis_cli-0.1.2-py3-none-any.whl.
File metadata
- Download URL: isis_cli-0.1.2-py3-none-any.whl
- Upload date:
- Size: 2.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.12 CPython/3.8.12 Linux/5.13.0-51-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
34b0dfd27f003bfa83640328711c5c17cf4ec0c9b975e6b98636e93d90e0ed82
|
|
| MD5 |
98477d23d094b06577d1abe7fde83bb0
|
|
| BLAKE2b-256 |
9554ad486aa06770bb76c1d2365dabeb2513b0befd7e0a5c45827b5d5ed27dd8
|