Package: kcliutils
kcliutilsDescriptionPython cli utils for faster developmentInstallpipinstallkcliutils# orpip3installkcliutilsHow to use1. Package relatednpp/new_python_packageRun in an empty folder with git checked outCreates a new empty package, with default files, such as .gitignore, README.md, setup.py, demo.py, LICENSE, etc.# cd to desired folder with .git in itnpppackage_name# ornew_python_packagepackage_namenpp test_package_namewill generateupp/upgrade_python_packageRun in an already existing project folderUpdates setup.py with dependencies, bumps version numberUpdates install_dependencies.sh and requirements.txtUpdates readme with dependencies, copies the contents of 'demo.py' to the usage section of the reeadmeNOTE: to make this work properly, the packege had to be created with npp.# cd to desired folder with .git in itupp# orupgrade_python_packageppp/publish_python_packageCalls upp, publishes to pypi and installs the new version# cd to desired folder with .git in itppp"Optional commit message"# orpublish_python_package"Optional commit message"prpipush/upgrade_push_installSame as ppp, but without publishing on pypi (for private, github-hosted packages)# cd to desired folder with .git in itprpipush"Optional commit message"# orupgrade_push_install"Optional commit message"2. Formattingcl/clean_linesCleans the ending useless spaces from every line# cd to desired foldercl# orclean_linesmigrate_comment_line_lenUpdates the lengh of each separator comment line generated with the file generators from this package.# cd to desired foldermigrate_comment_line_lenOptional_length_which_defaults_to_your_settings3. Gitpsh/pushstages/commits everything and pushes to github# cd to desired folderpsh"Optional commit message"# orpush"Optional commit message"ftch/fetchgit fetch# cd to desired folderftch# orfetchpll/pullgit pull# cd to desired folderpll# orpull4. Pippipu/pip_uninstallpip uninstallpipuPACKAGE_NAME# orpip_uninstallPACKAGE_NAMEpipi/pipiu/pip_installpip install -UpipiPACKAGE_NAME# orpipiuPACKAGE_NAME# orpip_installPACKAGE_NAMEpipir/pip_reinstallpip uninstall && pip installpipirPACKAGE_NAME# orpip_reinstallPACKAGE_NAME5. New filespyreqs/python_requirementscreates a requirements.txt file with all the used dependenciespyreqs# creates 'requirements.txt'# orpython_requirementspif/create_python_install_filecreates an install_dependencies.sh file with all the used dependenciespif# creates 'install_dependencies.sh'# orcreate_python_install_filenpc/new_python_classcreates a python file with a class-like formattingnpcfile_name# creates 'file_name.py' class 'FileName' in it# also accepts relative path 'relative/path/to/file_name'# ornew_python_classfile_namegenerated file contents# ------------------------------------------- Imports ------------------------------------------ ## System# Pip# Local# ---------------------------------------------------------------------------------------------- ## -------------------------------------- class: TestClass -------------------------------------- #classTestClass:# ---------------------------------------- Init ---------------------------------------- #def__init__(self):return# ---------------------------------- Public properties --------------------------------- ## ----------------------------------- Public methods ----------------------------------- ## --------------------------------- Private properties --------------------------------- ## ----------------------------------- Private methods ---------------------------------- ## ---------------------------------------------------------------------------------------------- #npa/new_python_apicreates a python file with a api-like formatting (conformingksimpleapi)npafile_name# creates 'file_name.py' class 'FileName' in it# also accepts relative path 'relative/path/to/file_name'# ornew_python_apifile_namegenerated file contents# ------------------------------------------- Imports ------------------------------------------ ## SystemfromtypingimportOptional,Dict# PipfromksimpleapiimportApi# Local# ---------------------------------------------------------------------------------------------- ## --------------------------------------- class: FileName -------------------------------------- #classFileName(Api):# -------------------------------------- Overrides ------------------------------------- #@classmethoddefextra_headers(cls)->Optional[Dict[str,any]]:return{}# ---------------------------------- Public properties --------------------------------- ## ----------------------------------- Public methods ----------------------------------- ## --------------------------------- Private properties --------------------------------- ## ----------------------------------- Private methods ---------------------------------- ## ---------------------------------------------------------------------------------------------- #npe/new_python_enumcreates a python file with a enum-like formattingnpefile_name# creates 'file_name.py' enum 'FileName' in it# also accepts relative path 'relative/path/to/file_name'# ornew_python_enumfile_namegenerated file contents# ------------------------------------------- Imports ------------------------------------------ ## SystemfromenumimportEnum# ---------------------------------------------------------------------------------------------- ## --------------------------------------- enum: FileName --------------------------------------- #classFileName(Enum):Template=0# ---------------------------------------------------------------------------------------------- #npf/new_python_filecreates a python file with a default file formattingnpffile_name# creates 'file_name.py'# also accepts relative path 'relative/path/to/file_name'# ornew_python_filefile_namegenerated file contents# ------------------------------------------- Imports ------------------------------------------ ## System# Pip# Local# ---------------------------------------------------------------------------------------------- ## ----------------------------------------- Public vars ---------------------------------------- ## ---------------------------------------- Private vars ---------------------------------------- ## ---------------------------------------- Private vars ---------------------------------------- ## ---------------------------------------- Private vars ---------------------------------------- ## ---------------------------------------------------------------------------------------------- #npfl/new_python_flowcreates a python file with a flow-like formatting (check example)npflfile_name# creates 'file_name.py'# also accepts relative path 'relative/path/to/file_name'# ornew_python_flowfile_namegenerated file contents# ------------------------------------------- Imports ------------------------------------------ ## System# Pip# Local# ---------------------------------------------------------------------------------------------- ## ------------------------------------------- Methods ------------------------------------------ ## -------------------------------------------- Paths ------------------------------------------- ## -------------------------------------------- Vars -------------------------------------------- ## -------------------------------------------- Flow -------------------------------------------- ## ---------------------------------------------------------------------------------------------- #nps/new_python_subpackagecreates a new subpackage at the desired relative pathnpsSUB_PACKAGE_NAME_OR_RELATIVE_PATH# ornew_python_subpackageSUB_PACKAGE_NAME_OR_RELATIVE_PATHnps test_subpackagewill generateDependenciesbullet,jsoncodable,kcu,kdependencies