/PyModuleGenerator

Générateur de module python

Primary LanguagePythonMIT LicenseMIT

PyModuleGenerator

Module to generate a python module

Installation

pip install PyModuleGenerator

Prerequisites

Folders

  • Module folder
    • src
      • __init__.py
      • MyModule.py
      • README.md
      • LICENSE
      • .gitignore

__init__.py

"""
pyexample.

An example python library.
"""

__version__ = "1.0.0"
__author__ = 'Your Name'
__credits__ = '###'

{{Rest of the file}}

Utilisation

import PyModuleGenerator

config: PyModuleGenerator.PyModuleGeneratorConfig = PyModuleGenerator.PyModuleGeneratorConfig(
    pythonCommand="python",    # Python command to use (python or python3 or py)

    modulePath="C:/.../MyModuleFolder/src",
    buildFolder="C:/.../MyModuleFolder/build",
    moduleName="MyModule",
    moduleVersion="1.0.0",
    moduleDescription="My module description",
    moduleLongDescription="My module long description displayed on pypi", # You can read file from README.md
    moduleLongDescriptionType="text/markdown",

    githubURL="",
    moduleAuthor="My name",
    moduleAuthorEmail="",
    moduleLicense="MIT",

    moduleDependencies=[],
    moduleTags=[], # https://pypi.org/classifiers/
)


PyModuleGenerator.PyModuleGenerator(
    config=config,
    clearBuildFolder=False,      # Erase the build folder after the build
    publishToPypi=False          # Publish the module to pypi
)