Skip to main content

A sample CLI project build with Poetry.

Project description

A small repo dedicated to desigining a CLI tool with Python via Click and built by the Poetry. For details, see:

Instructions

  1. pip install poetry | pip install click - install poetry module

  2. poetry install - install project dependencies

  3. poetry run sf-helper "hello world" - test the cli

  4. poetry build - build the /dist folder

  5. pip install dist/sf_helper-0.0.1.tar.gz - install the cli locally

  6. Open a new terminal window and try the cli: sf-helper --help

  7. Open a new terminal window. Run the following command(s):

    Command Description
    sf-helper return_pokemon --pokemon charizard Returns data or details about the Pokémon named "charizard".
    sf-helper greet --name ian Prints a greeting message for the name "ian".

Testing

To run the test files in /tests, from the root directory execute the following command:

poetry run pytest
  • Todo: possible to use runner.py to test cli commands more effectively?

Tagging

To add a tag to a branch, use git tag v0.0.1.

To trigger a test build, add a tag matching the v0.0.0 naming convention:

git checkout main
git tag v0.0.1
git push origin refs/tags/v0.0.1

Optionally:

git tag -f v0.0.1 HEAD

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

sf_helper-0.0.1.tar.gz (2.1 kB view details)

Uploaded Source

Built Distribution

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

sf_helper-0.0.1-py3-none-any.whl (3.0 kB view details)

Uploaded Python 3

File details

Details for the file sf_helper-0.0.1.tar.gz.

File metadata

  • Download URL: sf_helper-0.0.1.tar.gz
  • Upload date:
  • Size: 2.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.5

File hashes

Hashes for sf_helper-0.0.1.tar.gz
Algorithm Hash digest
SHA256 93d324be7abc191f13c402305b904c330b96a1c5a45581cc2188acae4c82a186
MD5 f4e51978bc52b7b3720398be91bb2a6f
BLAKE2b-256 854d67d02d34b159c59282e8866a94b696412ace3245d22cafffe287700b6ddf

See more details on using hashes here.

File details

Details for the file sf_helper-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: sf_helper-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 3.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.5

File hashes

Hashes for sf_helper-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7771ae2859ac7dd90d97e7a328b5e2fccf11351b052c559731842cef6b61f575
MD5 bb763167d4d2c940938329b7a689b90d
BLAKE2b-256 55dfe8d8201cb015491dd6ba4876fc2bb22d22fb19193247ec6b2563aab30f51

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