django-clite


Namedjango-clite JSON
Version 0.19.2 PyPI version JSON
download
home_pageNone
SummaryCLI for creating and managing Django projects
upload_time2024-05-13 22:38:13
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseBSD 3-Clause License Copyright (c) 2019, Leo Neto All rights reserved. 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 django automate cli command line tools rails ember web framework
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # django-clite

A CLI tool that handles creating and managing Django projects

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


- [django-clite](#django-clite)
  - [Installation](#installation)
    - [Extending the CLI](#extending-the-cli)
  - [Dependencies](#dependencies)
  - [Interactive Docs](#interactive-docs)
  - [To Do](#to-do)
  - [Pull requests](#pull-requests)
  - [LICENSE](#license)

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

After installation, the CLI will expose the binary with the name:
```
django-clite
```

## 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: `DJANGO_CLITE_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.**
```
django-clite 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 `DJANGO_CLITE_TEMPLATES_DIR` for the same purpose.

Take a look at the [template files directory](django_clite/cli/template_files) for a reference of what files can be overriden. The
paths of the templates you wish to override need to match the provided template. For example, if you wish to override the
model template, which is defined under [`src/cli/template_files/models/model.tpl`](django_clite/cli/template_files/models/model.tpl),
you should define your own model template under your desired directory, i.e `/path/to/templates/models/model.tpl`.

## Development

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

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

## Interactive Docs
In order to maintain consistency in our documentation of all the different commands and features of the CLI,
 we've decided to move the [README](docs/cli/readme.ipynb) to a series of Jupyter notebooks which you can explore per command under the [docs](docs) directory.

## To Do
[Check out our open issues](https://github.com/oleoneto/django-clite/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
**django-clite** is [BSD Licensed](LICENSE).

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "django-clite",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "Leo Neto <leo@ekletik.com>",
    "keywords": "django, automate, cli, command line tools, rails, ember, web, framework",
    "author": null,
    "author_email": "Leo Neto <leo@ekletik.com>",
    "download_url": "https://files.pythonhosted.org/packages/94/13/9ee86c128ecf0aa8cc4091dd30ef676fa92424972ad96bec1d8207cde1a9/django_clite-0.19.2.tar.gz",
    "platform": null,
    "description": "# django-clite\n\nA CLI tool that handles creating and managing Django projects\n\n![publish](https://github.com/oleoneto/django-clite/workflows/publish/badge.svg?branch=master)\n![PyPI - Package](https://img.shields.io/pypi/v/django-clite)\n![PyPI - Python](https://img.shields.io/pypi/pyversions/django-clite)\n![PyPI - License](https://img.shields.io/pypi/l/django-clite)\n![PyPI - Downloads](https://img.shields.io/pypi/dm/django-clite)\n\n\n- [django-clite](#django-clite)\n  - [Installation](#installation)\n    - [Extending the CLI](#extending-the-cli)\n  - [Dependencies](#dependencies)\n  - [Interactive Docs](#interactive-docs)\n  - [To Do](#to-do)\n  - [Pull requests](#pull-requests)\n  - [LICENSE](#license)\n\n## Installation\nInstall via [pip](https://pypi.org/project/django-clite/):\n```bash\npip install django-clite\n```\n\nAfter installation, the CLI will expose the binary with the name:\n```\ndjango-clite\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: `DJANGO_CLITE_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```\ndjango-clite 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 `DJANGO_CLITE_TEMPLATES_DIR` for the same purpose.\n\nTake a look at the [template files directory](django_clite/cli/template_files) for a reference of what files can be overriden. The\npaths of the templates you wish to override need to match the provided template. For example, if you wish to override the\nmodel template, which is defined under [`src/cli/template_files/models/model.tpl`](django_clite/cli/template_files/models/model.tpl),\nyou should define your own model template under your desired directory, i.e `/path/to/templates/models/model.tpl`.\n\n## Development\n\n### Install from source:\n```\ngit clone https://github.com/oleoneto/django-clite.git\ncd django-clite\npip install --editable .\n```\n\n### Dependencies\nCheck out [pyproject.toml](pyproject.toml) for all installation dependencies.\n\n## Interactive Docs\nIn order to maintain consistency in our documentation of all the different commands and features of the CLI,\n we've decided to move the [README](docs/cli/readme.ipynb) to a series of Jupyter notebooks which you can explore per command under the [docs](docs) directory.\n\n## To Do\n[Check out our open issues](https://github.com/oleoneto/django-clite/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**django-clite** is [BSD Licensed](LICENSE).\n",
    "bugtrack_url": null,
    "license": "BSD 3-Clause License  Copyright (c) 2019, Leo Neto All rights reserved.  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": "CLI for creating and managing Django projects",
    "version": "0.19.2",
    "project_urls": {
        "Homepage": "https://github.com/oleoneto/django-clite",
        "Issues": "https://github.com/oleoneto/django-clite/issues"
    },
    "split_keywords": [
        "django",
        " automate",
        " cli",
        " command line tools",
        " rails",
        " ember",
        " web",
        " framework"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1be0a61e00b206bf0ad19a50ee4f629aeca8d3cd078e7ea385c1a11c74c6a65f",
                "md5": "30525cea66316eb0d8c76d8c84e6323a",
                "sha256": "af20ca1fe7e0fffe407dc7da0433b0127ef69a7e39c4bd5825cbc51e224bd461"
            },
            "downloads": -1,
            "filename": "django_clite-0.19.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "30525cea66316eb0d8c76d8c84e6323a",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 6049,
            "upload_time": "2024-05-13T22:38:10",
            "upload_time_iso_8601": "2024-05-13T22:38:10.911060Z",
            "url": "https://files.pythonhosted.org/packages/1b/e0/a61e00b206bf0ad19a50ee4f629aeca8d3cd078e7ea385c1a11c74c6a65f/django_clite-0.19.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "94139ee86c128ecf0aa8cc4091dd30ef676fa92424972ad96bec1d8207cde1a9",
                "md5": "65ef020180269eb66d444ad44b279c10",
                "sha256": "883e07e524c518b78577c4d4c3b99565dae3579244157962ddc3ab41d31e6500"
            },
            "downloads": -1,
            "filename": "django_clite-0.19.2.tar.gz",
            "has_sig": false,
            "md5_digest": "65ef020180269eb66d444ad44b279c10",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 9497,
            "upload_time": "2024-05-13T22:38:13",
            "upload_time_iso_8601": "2024-05-13T22:38:13.047234Z",
            "url": "https://files.pythonhosted.org/packages/94/13/9ee86c128ecf0aa8cc4091dd30ef676fa92424972ad96bec1d8207cde1a9/django_clite-0.19.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-05-13 22:38:13",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "oleoneto",
    "github_project": "django-clite",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "django-clite"
}
        
Elapsed time: 0.26467s