Skip to main content

Python package for generation of python tool/generator

Project description

Generate Python Tool

gen_py_tool is toolset for generation of Python tool.

Developed in python code: 100%.

The README is used to introduce the modules and provide instructions on how to install the modules, any machine dependencies it may have and any other information that should be provided before the modules are installed.

gen_py_tool python checker gen_py_tool package checker GitHub issues open GitHub contributors

Table of Contents

Installation

Used next development environment

debian linux os

gen_py_tool python3 build

Currently there are three ways to install package

  • Install process based on using pip mechanism
  • Install process based on build mechanism
  • Install process based on setup.py mechanism
  • Install process based on docker mechanism
Install using pip

gen_py_tool is located at pypi.org.

You can install by using pip

# python3
pip3 install gen_py_tool
Install using build

Navigate to release page download and extract release archive.

To install gen_py_tool type the following

tar xvzf gen_py_tool-x.y.z.tar.gz
cd gen_py_tool-x.y.z/
# python3
wget https://bootstrap.pypa.io/get-pip.py
python3 get-pip.py 
python3 -m pip install --upgrade setuptools
python3 -m pip install --upgrade pip
python3 -m pip install --upgrade build
pip3 install -r requirements.txt
python3 -m build --no-isolation --wheel
pip3 install ./dist/gen_py_tool-*-py3-none-any.whl
rm -f get-pip.py
chmod 755 /usr/local/lib/python3.10/dist-packages/usr/local/bin/gen_py_tool_run.py
ln -s /usr/local/lib/python3.10/dist-packages/usr/local/bin/gen_py_tool_run.py /usr/local/bin/gen_py_tool_run.py
Install using py setup

Navigate to release page download and extract release archive.

To install gen_py_tool locate and run setup.py with arguments

tar xvzf gen_py_tool-x.y.z.tar.gz
cd gen_py_tool-x.y.z
# python3
pip3 install -r requirements.txt
python3 setup.py install_lib
python3 setup.py install_egg_info
Install using docker

You can use Dockerfile to create image/container.

Dependencies

gen_py_tool requires next modules and libraries

Tool structure

gen_py_tool is based on OOP

Generator structure

Click to expand framework structure
    gen_py_tool/
         ├── application/
            ├── __init__.py
            └── service.py
         ├── domain/
            ├── __init__.py
            ├── models.py
            └── ports/
                ├── __init__.py
                ├── iservice.py
                └── isubprocessor.py
         ├── engine.py
         ├── gen_py_tool_bundle.py
         ├── infrastructure/
            ├── cli.py
            ├── cli_bundle.py
            ├── config/
               ├── gen_py_tool.cfg
               ├── gen_py_tool.logo
               ├── scheme.json
               └── templates.tgz
            ├── create_command.py
            ├── icli.py
            ├── icli_command.py
            ├── __init__.py
            └── subprocessor.py
         ├── __init__.py
         └── py.typed

     6 directories, 22 files

Code coverage

Click to expand code coverage
Name Stmts Miss Cover
gen_py_tool/__init__.py 8 0 100%
gen_py_tool/application/__init__.py 8 0 100%
gen_py_tool/application/service.py 26 0 100%
gen_py_tool/domain/__init__.py 8 0 100%
gen_py_tool/domain/models.py 18 0 100%
gen_py_tool/domain/ports/__init__.py 8 0 100%
gen_py_tool/domain/ports/iservice.py 11 0 100%
gen_py_tool/domain/ports/isubprocessor.py 11 0 100%
gen_py_tool/engine.py 68 0 100%
gen_py_tool/gen_py_tool_bundle.py 41 0 100%
gen_py_tool/infrastructure/__init__.py 8 0 100%
gen_py_tool/infrastructure/cli.py 36 0 100%
gen_py_tool/infrastructure/cli_bundle.py 33 0 100%
gen_py_tool/infrastructure/create_command.py 43 0 100%
gen_py_tool/infrastructure/icli.py 11 0 100%
gen_py_tool/infrastructure/icli_command.py 14 0 100%
gen_py_tool/infrastructure/subprocessor.py 54 0 100%
Total 406 0 100%

Usage

Install package

pip3 install gen_py_tool

Prepare main entry point by downloading main.py or create your own.

wget -O main.py https://raw.githubusercontent.com/vroncevic/gen_py_tool/master/main.py

Running tool for creating new py tool

mkdir -p demo/mytool/
python3 main.py create --name mytool --type tool --output ./demo/mytool/

Running tool for creating new py tool with ats (ats-utilities) support

mkdir -p demo/mytoolwithats/
python3 main.py create --name mytoolwithats --type tool_ats --output ./demo/mytoolwithats/

Running tool for creating new py generator

mkdir -p demo/mygenerator/
python3 main.py create --name mygenerator --type gen --output ./demo/mygenerator/

Running tool for creating new py generator with ats (ats-utilities) support

mkdir -p demo/mygeneratorwithats/
python3 main.py create --name mygeneratorwithats --type gen_ats --output ./demo/mygeneratorwithats/

Docs

Documentation Status

More documentation and info at

Contributing

Contributing to gen_py_tool

Copyright and licence

License: GPL v3 License

Copyright (C) 2017 - 2026 by vroncevic.github.io/gen_py_tool

gen_py_tool is free software; you can redistribute it and/or modify it under the same terms as Python itself, either Python version 3.x or, at your option, any later version of Python 3 you may have available.

Lets help and support PSF.

Python Software Foundation

Donate

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

gen_py_tool-1.4.1.tar.gz (90.2 kB view details)

Uploaded Source

Built Distribution

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

gen_py_tool-1.4.1-py3-none-any.whl (95.4 kB view details)

Uploaded Python 3

File details

Details for the file gen_py_tool-1.4.1.tar.gz.

File metadata

  • Download URL: gen_py_tool-1.4.1.tar.gz
  • Upload date:
  • Size: 90.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.0 CPython/3.12.3

File hashes

Hashes for gen_py_tool-1.4.1.tar.gz
Algorithm Hash digest
SHA256 e05014c46b9225d9672f6cd9374bae0d64c4fb7fc039acc5f8d9e04da60430c6
MD5 fa49d4479ddc39cea5ef12731f8e7e27
BLAKE2b-256 c299c0e844c897e95f818374469db299b21a0990490d73cbaa79435aa9899c79

See more details on using hashes here.

File details

Details for the file gen_py_tool-1.4.1-py3-none-any.whl.

File metadata

  • Download URL: gen_py_tool-1.4.1-py3-none-any.whl
  • Upload date:
  • Size: 95.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.0 CPython/3.12.3

File hashes

Hashes for gen_py_tool-1.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 543736313cdf5fa333282a45b5850cceb6a7905bcdbbb864475816cdc48d39e1
MD5 21d145911bd2096bc9b76f3dc087e4d3
BLAKE2b-256 3d90aae1206c9f501666f55c65500c96085193e167d988c057695f10c85e2b9c

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