diff options
| author | alex <alex@pdp7.net> | 2022-04-22 20:54:51 +0200 |
|---|---|---|
| committer | alex <alex@pdp7.net> | 2022-04-22 20:54:51 +0200 |
| commit | 07da00665affbebd903236d7f4656e1745dad6c7 (patch) | |
| tree | 4b4d576c9ff4d56323202a7c16a83e9f9766b8ad /programming | |
| parent | 726d9df1fd5a2a66816ee4ae4e9c301d2f3023b2 (diff) | |
Add notes about using third-party libraries
Diffstat (limited to 'programming')
| -rw-r--r-- | programming/python/creating_nice_python_cli_tools.md | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/programming/python/creating_nice_python_cli_tools.md b/programming/python/creating_nice_python_cli_tools.md index 6f466389..50939ee3 100644 --- a/programming/python/creating_nice_python_cli_tools.md +++ b/programming/python/creating_nice_python_cli_tools.md @@ -4,7 +4,10 @@ * As you are using [poetry](https://python-poetry.org/), following the indications above: * Use [Poetry's support for specifying scripts](https://python-poetry.org/docs/pyproject/#scripts), so when installing your tool via pipx or other means, your scripts are added to the user's path. * Dependencies you define will be installed automatically along with your application. + This reduces the effort users need to use your application if you need third-party libraries. + However, I would still advise to avoid unnecessary dependencies (for simple HTTP requests you can use the base library. If you do complex requests, then using a third-party library might be much simpler). As you are using pipx, those dependencies will be installed to a isolated virtualenv, so they will not interfere with anything on your system. + * As your application is properly packaged, you can split your code into different Python files and use imports without issues. * If your application requires secrets, such as credentials or others, consider using: * The standard [getpass](https://docs.python.org/3/library/getpass.html) module. This prompts for a string on the command line, hiding what the user types. |
