Skip to main content

Python ul py tool

Project description

ul-py-tool

This library allows to bootstrap Python UnicLab project from scratch. It provides a set of useful CMD commands mapping in main.py file.

def main() -> None:
    Cmd.main({
        'code_stats': 'ul_py_tool.commands.cmd_stats:CmdStats',
        'minor': 'ul_py_tool.commands.cmd_version:CmdVersionMinor',
        'major': 'ul_py_tool.commands.cmd_version:CmdVersionMajor',
        'patch': 'ul_py_tool.commands.cmd_version:CmdVersionPatch',
        'lint': 'ul_py_tool.commands.cmd_lint:CmdLint',
        'install': 'ul_py_tool.commands.cmd_install:CmdInstall',
        'test': 'ul_py_tool.commands.cmd_test:CmdTest',
        'fmt': 'ul_py_tool.commands.cmd_fmt:CmdFmt',
        'release': 'ul_py_tool.commands.cmd_release:CmdRelease',
        'test_secrets': 'ul_py_tool.commands.cmd_test_secrets.py:CmdTestSecrets',
        'build-images': 'ul_py_tool.commands.cmd_build_images:CmdBuildImages',
        'outdated': 'ul_py_tool.commands.cmp_outdated:CmdOutdated',
        'cleanup': 'ul_py_tool.commands.cmd_cleanup:CmdCleanup',
        'fix_own': 'ul_py_tool.commands.cmd_fix_own:CmdFixOwn',
    })

This maps the code of the CMD command to its name. After mapping, we can use a command like this:

python -m FOLDER_NAME_WHERE_MAIN_PY_LOCATED command_name
python -m src run_some_script  # main.py located in src/ root
Command Desription
Cmd Base class. Each command should inherit from it and provide method run().
CmdStats Command that provides us statistics about service, lines of code written, etc.
CmdVersion Command that applies a versioning to setup.py (major, minor, patch).
CmdTest Command that runs tests.
CmdRelease Command for making a release.
CmdLint Command to run lint (different steps).
CmdFmt Command to apply formatting (black, isort (to be implemented)).
CmdBuildImages Command that helps to build & push to the registry Docker images.
CmdInstall Generates project files, configs, pre-commits, etc.

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

ul_py_tool-3.0.2.dev1.tar.gz (40.5 kB view details)

Uploaded Source

Built Distribution

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

ul_py_tool-3.0.2.dev1-py3-none-any.whl (56.0 kB view details)

Uploaded Python 3

File details

Details for the file ul_py_tool-3.0.2.dev1.tar.gz.

File metadata

  • Download URL: ul_py_tool-3.0.2.dev1.tar.gz
  • Upload date:
  • Size: 40.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for ul_py_tool-3.0.2.dev1.tar.gz
Algorithm Hash digest
SHA256 6b299f94db47092a7b82a03de5527cd79e320e67f5dd92ee57636254887a7a93
MD5 c63d8ba282d0f81f047003e694955d9c
BLAKE2b-256 0076ca6538b4011a4348de2765501fb386d74acc35212bb5a2cdab4f837cb3b1

See more details on using hashes here.

File details

Details for the file ul_py_tool-3.0.2.dev1-py3-none-any.whl.

File metadata

File hashes

Hashes for ul_py_tool-3.0.2.dev1-py3-none-any.whl
Algorithm Hash digest
SHA256 276b09b0fa49c913966b62357edc3acea4d0dd582050ac80b6be53997f853140
MD5 12b4e4a20b88afd8bb3401084fdd3393
BLAKE2b-256 8ddecd173338221192b77e1cb4d8dd3710f33105b15a72d1e979b842a55154a6

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