genmax


Namegenmax JSON
Version 0.1.9 PyPI version JSON
download
home_pagehttps://https://github.com/razaibi/genmax/
SummaryA simple code generation tool.
upload_time2024-08-10 05:57:25
maintainerNone
docs_urlNone
authorRaza Balbale
requires_pythonNone
licenseApache 2.0
keywords cli code generator automation
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ### Genmax

Genmax is a simple code generation tool.

#### Key Components

- Workflows

Genmax projects have workflows to group together multiple files to be generated. Flows are in **yaml.j2** format.

- Data

You can pass data to templates and workflows that help generate data. For example, you can dynamically pass the name of attributes if you are generating a class file.

- Templates

These templates form the basis of the code to be generated. Genmax uses the Jinja2 engine for code generation.

- Output

Once the data is passed to a template, Genmax generates an output file with the generated code. For nested output locations, you can use **>** as a separator.

#### Commands

| Command | Description |
|:---|:---|
|gmx init | Initialize genmax in the current folder.|
|gmx run \<workflow-name> | Run a workflow.|

#### Extensions supported in templates

The following methods are supported in the template:

| Description | Method |
|:---|:---|
|Lower case first char| lcase(your_string)|
|Lower case| lowercase(your_string)|
|Upper case| uppercase(your_string)|
|Pluralize| pluralize(your_string)|
|Join With Commas| joinify(name_of_element, element_list)|
|Switch to Camel case| camel(your_string)|
|Switch to Kebab case| kebab(your_string)|
|Switch to Pascale case| pascale(your_string)|
|Switch to Dot case| dot(your_string)|
|Switch to Title case| title(your_string)|
|Switch to Snake case| snake(your_string)|
|Switch to Path format| path(your_string)|
|Generate UUID| uuid()|
|Generate secret in 16 bit - hexadecimal| secret()|
|Generate secret in 64 bit - hexadecimal| secret_complex()|
|Read config from .env file.| env(file_name, config_name)|

#### Quick Start

Create a sample project.

```bash
gmx init
```

Run the sample workflow.

```bash
gmx run sample
```

#### Workflow Item Types

Add these to your workflow YAML file as needed.

| Item | Description |
|:---|:---|
| Generate ||
| data | Data to pass to the template. |
| action | The name of the generate action. |
| template | Template to use for code generation (j2 supported). |
| output | Name and extension of the output file. |
|||
| Write to File ||
| action | The name of the write_to_file action. |
| template | Template to write to file. |
| output | Name and extension of the output file. |
|||

            

Raw data

            {
    "_id": null,
    "home_page": "https://https://github.com/razaibi/genmax/",
    "name": "genmax",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "cli code generator automation",
    "author": "Raza Balbale",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/15/b2/7dc8a712a847b49dfffe5dc3529d1a75b2020bf6303e646bc5be3ad8ec37/genmax-0.1.9.tar.gz",
    "platform": null,
    "description": "### Genmax\n\nGenmax is a simple code generation tool.\n\n#### Key Components\n\n- Workflows\n\nGenmax projects have workflows to group together multiple files to be generated. Flows are in **yaml.j2** format.\n\n- Data\n\nYou can pass data to templates and workflows that help generate data. For example, you can dynamically pass the name of attributes if you are generating a class file.\n\n- Templates\n\nThese templates form the basis of the code to be generated. Genmax uses the Jinja2 engine for code generation.\n\n- Output\n\nOnce the data is passed to a template, Genmax generates an output file with the generated code. For nested output locations, you can use **>** as a separator.\n\n#### Commands\n\n| Command | Description |\n|:---|:---|\n|gmx init | Initialize genmax in the current folder.|\n|gmx run \\<workflow-name> | Run a workflow.|\n\n#### Extensions supported in templates\n\nThe following methods are supported in the template:\n\n| Description | Method |\n|:---|:---|\n|Lower case first char| lcase(your_string)|\n|Lower case| lowercase(your_string)|\n|Upper case| uppercase(your_string)|\n|Pluralize| pluralize(your_string)|\n|Join With Commas| joinify(name_of_element, element_list)|\n|Switch to Camel case| camel(your_string)|\n|Switch to Kebab case| kebab(your_string)|\n|Switch to Pascale case| pascale(your_string)|\n|Switch to Dot case| dot(your_string)|\n|Switch to Title case| title(your_string)|\n|Switch to Snake case| snake(your_string)|\n|Switch to Path format| path(your_string)|\n|Generate UUID| uuid()|\n|Generate secret in 16 bit - hexadecimal| secret()|\n|Generate secret in 64 bit - hexadecimal| secret_complex()|\n|Read config from .env file.| env(file_name, config_name)|\n\n#### Quick Start\n\nCreate a sample project.\n\n```bash\ngmx init\n```\n\nRun the sample workflow.\n\n```bash\ngmx run sample\n```\n\n#### Workflow Item Types\n\nAdd these to your workflow YAML file as needed.\n\n| Item | Description |\n|:---|:---|\n| Generate ||\n| data | Data to pass to the template. |\n| action | The name of the generate action. |\n| template | Template to use for code generation (j2 supported). |\n| output | Name and extension of the output file. |\n|||\n| Write to File ||\n| action | The name of the write_to_file action. |\n| template | Template to write to file. |\n| output | Name and extension of the output file. |\n|||\n",
    "bugtrack_url": null,
    "license": "Apache 2.0",
    "summary": "A simple code generation tool.",
    "version": "0.1.9",
    "project_urls": {
        "Documentation": "https://github.com/razaibi/genmax/README.md",
        "Homepage": "https://https://github.com/razaibi/genmax/",
        "Source": "https://github.com/razaibi/genmax",
        "Tracker": "https://github.com/razaibi/genmax/"
    },
    "split_keywords": [
        "cli",
        "code",
        "generator",
        "automation"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ceead0b4a164d0dbed320093b82a245448b5c54efdef650254f93f8013f44049",
                "md5": "099be0b008e63fa7d7ea81d56fab113d",
                "sha256": "729e001d8fdb2be508555a90240872b01f2b16b07d90d0aa8a3510317ce2b35a"
            },
            "downloads": -1,
            "filename": "genmax-0.1.9-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "099be0b008e63fa7d7ea81d56fab113d",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 18025,
            "upload_time": "2024-08-10T05:57:24",
            "upload_time_iso_8601": "2024-08-10T05:57:24.357250Z",
            "url": "https://files.pythonhosted.org/packages/ce/ea/d0b4a164d0dbed320093b82a245448b5c54efdef650254f93f8013f44049/genmax-0.1.9-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "15b27dc8a712a847b49dfffe5dc3529d1a75b2020bf6303e646bc5be3ad8ec37",
                "md5": "30a44e35151f9ec7efe6656a4789f6f8",
                "sha256": "c00c099d691b297796ca838eaf1df5f0af3916db2c9770d010542cbd4919f713"
            },
            "downloads": -1,
            "filename": "genmax-0.1.9.tar.gz",
            "has_sig": false,
            "md5_digest": "30a44e35151f9ec7efe6656a4789f6f8",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 11630,
            "upload_time": "2024-08-10T05:57:25",
            "upload_time_iso_8601": "2024-08-10T05:57:25.382893Z",
            "url": "https://files.pythonhosted.org/packages/15/b2/7dc8a712a847b49dfffe5dc3529d1a75b2020bf6303e646bc5be3ad8ec37/genmax-0.1.9.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-10 05:57:25",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "razaibi",
    "github_project": "genmax",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "genmax"
}
        
Elapsed time: 0.74300s