geny


Namegeny JSON
Version 0.1.3 PyPI version JSON
download
home_pageNone
SummaryAn extendable file generator
upload_time2024-04-22 01:29:45
maintainerNone
docs_urlNone
authorNone
requires_python>=3.6
licenseBSD 3-Clause License Copyright (c) 2024, Leo Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
keywords automation files generators
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # geny
An extendable file generator

![publish](https://github.com/oleoneto/geny/workflows/publish/badge.svg?branch=master)
![PyPI - Package](https://img.shields.io/pypi/v/geny)
![PyPI - Python](https://img.shields.io/pypi/pyversions/geny)
![PyPI - License](https://img.shields.io/pypi/l/geny)
![PyPI - Downloads](https://img.shields.io/pypi/dm/geny)


- [geny](#geny)
  - [Installation](#installation)
    - [Extending the CLI](#extending-the-cli)
  - [Dependencies](#dependencies)
  - [To Do](#to-do)
  - [Pull requests](#pull-requests)
  - [LICENSE](#license)

## Installation
Install via [pip](https://pypi.org/project/geny):
```bash
pip install geny
```

After installation, the CLI will expose the binary with the name:
```
geny
```

## Extending the CLI

Currently, there are two main ways of extending the functionality of the CLI:
1. Adding your own commands/plugins
2. Overriding the provided resource templates

### Including your own commands

If you would like to extend the functionality of this CLI, you can include your own `plugins/commands` by
setting an environment variable: `GENY_PLUGINS`. Simply set this variable to the path where your plugins are.

Plugin commands are auto-discovered if they are placed under the plugins directory,
but please be sure to do the following for this to work:
1. **Name your package and click command the same**. That is, a package called `get`, for example, should define a `get` command.
2. **Place the command definition within the package's `main.py` module**. For example:
```python
# get/main.py
import click


@click.command()
@click.pass_context
def get(ctx):
    pass
```
3. **Sub-commands should be added to the top-most command group in the package's `main.py` module.**
```python
# get/main.py
import click


@click.group() # <- group
@click.pass_context
def get(ctx):
  pass


@click.command()
@click.pass_context
def foo(ctx):
  pass


get.add_command(foo)
```
4. **Access your commands via your top-most command group.**
```
geny get foo
```

**NOTE:** If you would like to skip a plugin/command from being auto-discovered, simply rename the package by either
prepending or appending any number of underscores (`_`). Any code contained within the package will be ignored.

### Overriding the templates

The flag `--templates-dir` can be used to configure an additional path wherein the CLI can look for resource templates.
Alternatively, you can use the environment variable `GENY_TEMPLATES_DIR` for the same purpose.

## Development

### Install from source:
```
git clone https://github.com/oleoneto/geny.git
cd geny
pip install --editable .
```

### Dependencies
Check out [pyproject.toml](pyproject.toml) for all installation dependencies.

## To Do
[Check out our open issues](https://github.com/oleoneto/geny/issues).

## Pull requests
Found a bug? See a typo? Have an idea for new command?
Feel free to submit a pull request with your contributions. They are much welcome and appreciated.

## LICENSE
**geny** is [BSD Licensed](LICENSE).

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "geny",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "Leo Neto <leo@ekletik.com>",
    "keywords": "automation, files, generators",
    "author": null,
    "author_email": "Leo Neto <leo@ekletik.com>",
    "download_url": "https://files.pythonhosted.org/packages/37/6a/b19f89383e7d8508b134ef55507584d3edaff9340c99abecb05ab92f7731/geny-0.1.3.tar.gz",
    "platform": null,
    "description": "# geny\nAn extendable file generator\n\n![publish](https://github.com/oleoneto/geny/workflows/publish/badge.svg?branch=master)\n![PyPI - Package](https://img.shields.io/pypi/v/geny)\n![PyPI - Python](https://img.shields.io/pypi/pyversions/geny)\n![PyPI - License](https://img.shields.io/pypi/l/geny)\n![PyPI - Downloads](https://img.shields.io/pypi/dm/geny)\n\n\n- [geny](#geny)\n  - [Installation](#installation)\n    - [Extending the CLI](#extending-the-cli)\n  - [Dependencies](#dependencies)\n  - [To Do](#to-do)\n  - [Pull requests](#pull-requests)\n  - [LICENSE](#license)\n\n## Installation\nInstall via [pip](https://pypi.org/project/geny):\n```bash\npip install geny\n```\n\nAfter installation, the CLI will expose the binary with the name:\n```\ngeny\n```\n\n## Extending the CLI\n\nCurrently, there are two main ways of extending the functionality of the CLI:\n1. Adding your own commands/plugins\n2. Overriding the provided resource templates\n\n### Including your own commands\n\nIf you would like to extend the functionality of this CLI, you can include your own `plugins/commands` by\nsetting an environment variable: `GENY_PLUGINS`. Simply set this variable to the path where your plugins are.\n\nPlugin commands are auto-discovered if they are placed under the plugins directory,\nbut please be sure to do the following for this to work:\n1. **Name your package and click command the same**. That is, a package called `get`, for example, should define a `get` command.\n2. **Place the command definition within the package's `main.py` module**. For example:\n```python\n# get/main.py\nimport click\n\n\n@click.command()\n@click.pass_context\ndef get(ctx):\n    pass\n```\n3. **Sub-commands should be added to the top-most command group in the package's `main.py` module.**\n```python\n# get/main.py\nimport click\n\n\n@click.group() # <- group\n@click.pass_context\ndef get(ctx):\n  pass\n\n\n@click.command()\n@click.pass_context\ndef foo(ctx):\n  pass\n\n\nget.add_command(foo)\n```\n4. **Access your commands via your top-most command group.**\n```\ngeny get foo\n```\n\n**NOTE:** If you would like to skip a plugin/command from being auto-discovered, simply rename the package by either\nprepending or appending any number of underscores (`_`). Any code contained within the package will be ignored.\n\n### Overriding the templates\n\nThe flag `--templates-dir` can be used to configure an additional path wherein the CLI can look for resource templates.\nAlternatively, you can use the environment variable `GENY_TEMPLATES_DIR` for the same purpose.\n\n## Development\n\n### Install from source:\n```\ngit clone https://github.com/oleoneto/geny.git\ncd geny\npip install --editable .\n```\n\n### Dependencies\nCheck out [pyproject.toml](pyproject.toml) for all installation dependencies.\n\n## To Do\n[Check out our open issues](https://github.com/oleoneto/geny/issues).\n\n## Pull requests\nFound a bug? See a typo? Have an idea for new command?\nFeel free to submit a pull request with your contributions. They are much welcome and appreciated.\n\n## LICENSE\n**geny** is [BSD Licensed](LICENSE).\n",
    "bugtrack_url": null,
    "license": "BSD 3-Clause License  Copyright (c) 2024, Leo  Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ",
    "summary": "An extendable file generator",
    "version": "0.1.3",
    "project_urls": {
        "Homepage": "https://github.com/oleoneto/geny",
        "Issues": "https://github.com/oleoneto/geny/issues"
    },
    "split_keywords": [
        "automation",
        " files",
        " generators"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "72de4570297e48fc76179b359b49d5d7d82fc959c68065efc86de5158ada511b",
                "md5": "6a665ea6cbad5b2e7e8b1d786e172ae9",
                "sha256": "fa4964e3d08bc152d2ef5dd14848e857d21328edd20c5cb1de8921393915847a"
            },
            "downloads": -1,
            "filename": "geny-0.1.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "6a665ea6cbad5b2e7e8b1d786e172ae9",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 20216,
            "upload_time": "2024-04-22T01:29:44",
            "upload_time_iso_8601": "2024-04-22T01:29:44.214055Z",
            "url": "https://files.pythonhosted.org/packages/72/de/4570297e48fc76179b359b49d5d7d82fc959c68065efc86de5158ada511b/geny-0.1.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "376ab19f89383e7d8508b134ef55507584d3edaff9340c99abecb05ab92f7731",
                "md5": "e892c02041b3b2c1c29de79de4343143",
                "sha256": "5ecf1209bb8acb4ccad5a38da13b347b4081ee845a071da188893ff1e57e787a"
            },
            "downloads": -1,
            "filename": "geny-0.1.3.tar.gz",
            "has_sig": false,
            "md5_digest": "e892c02041b3b2c1c29de79de4343143",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 14140,
            "upload_time": "2024-04-22T01:29:45",
            "upload_time_iso_8601": "2024-04-22T01:29:45.977946Z",
            "url": "https://files.pythonhosted.org/packages/37/6a/b19f89383e7d8508b134ef55507584d3edaff9340c99abecb05ab92f7731/geny-0.1.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-22 01:29:45",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "oleoneto",
    "github_project": "geny",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "geny"
}
        
Elapsed time: 0.26345s