Skip to main content

logo

CLI utility for code generation based on a TOML configuration file.


Installation

pip install gadcodegenerator

Usage

gadcodegenerator --file {config.toml} --context "{}"

General Structure

workdir = "myproject"

folders = []

exclude = []

[[files]]
path = "{{name}}.py"
content = """
def hello():
    print("Hello", {{name}})

if __name__ == '__main__':
    hello()
"""

[[scripts]]
command = "isort {{workdir}}"
check = true

Sections Overview

Section Format Description
workdir "" Uses the current directory
"myproject" Uses the current directory + /myproject
"/home/myproject" Uses an absolute path
exclude ["src/static/__init__.py"] Uses a relative path to workdir. Excludes file creation.
folders ["src/", "src/static"] Uses a relative path to workdir. Describes directories to be created.
[[files]] Defines file creation rules
mode = "a" File writing mode: "a" (append), "w" (overwrite)
path = "src/__init__.py" Relative to workdir, specifies file location.
""" ... """ / path / url Raw content, local file path, or URL for remote content.
[[scripts]] Defines commands to be executed after generation.
command = "isort {{workdir}}" Command to execute, supports dynamic variables.
check = True\False" If true, raises an error if the command fails, otherwise logs output.

Metadata

Release files for gadcodegenerator 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gadcodegenerator 0.0.1
File Size Uploaded
gadcodegenerator-0.0.1.tar.gz 7.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for gadcodegenerator 0.0.1
File Interpreter ABI Platform
gadcodegenerator-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 19.0 kB

Release files / gadcodegenerator-0.0.1.tar.gz

Download URL gadcodegenerator-0.0.1.tar.gz
Size 7.9 kB
Tags Source
SHA-256 checksum
How to use checksums
a91c702b10ada819effaf7dfc3f8bc4720b9a8f3df274bfdc467661f9d5f9ba6
BLAKE2b-256 checksum
How to use checksums
ca2f8567e9d27a3f6f578833f1eadea0cf3ff8d1030547219cd25e44a1959b77
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.3

Release files / gadcodegenerator-0.0.1-py3-none-any.whl

Download URL gadcodegenerator-0.0.1-py3-none-any.whl
Size 11.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2840f1051fd622f6b77604e3204ac9359409541441abc5264a8556d3e3de1f9f
BLAKE2b-256 checksum
How to use checksums
506619c2ec291af573507c6cbfda49de96ef37ca5584c0827ad34c12433b629e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.3

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page