Skip to main content

Create project layout from jinja2 templates.

Project description


Create project layout from jinja2 templates.


$ pip install make


$ pip install --user make


In general:

$ python -m make project source-path

Where source-path can be a local path:

$ python -m make project examples/ini_features

A local zip file:

$ python -m make project examples/

Zip file over http or https:

$ python -m make project -p simple-master

Short url for Github:

$ python -m make project gh:fholmer/simple

And Gitlab:

$ python -m make project gl:fholmer/simple

Sub dirs is also supported for Gitlab:

$ python -m make project gl:fholmer/templates/proj1

Simple cookiecutter templates is also supported.

We will use a popular cookiecutter template in this example:

$ python -m make project gh:kragniz/cookiecutter-pypackage-minimal

How to make your own project template

The source-path have to contain a file named project.conf or project.json. Choose the format you prefer.

Format of project.conf:

name = <s>App</s>
package = <s>{{' ','_').replace('-', '_')}}</s>
include_tests = <s>json::["none", "pytest"]</s>
include_docs = <s>json::["none", "sphinx", "mkdocs"]</s>

# this is a comment.
# section or keys starting with _ is non-interactive variables

_test_dir = <s>{{ 'tests' if project.include_tests != 'none' else '' }}</s>

    {%%- if project.include_docs =<s>= 'sphinx' -%%}</s>
    {%%- elif project.include_docs =<s>= 'mkdocs' -%%}</s>
    {%%- else -%%}
    {%%- endif -%%}

The ini-format allows for multi line values, but % have to be escaped. Comments is allowed. Use the special prefix json:: to serialize subsequent text as json.

Format of project.json:

    "project": {

        "name": "App",
        "package": "{{' ','_').replace('-', '_')}}",
        "include_tests": ["none", "pytest"],
        "include_docs": ["none", "sphinx", "mkdocs"],
        "_test_dir": "{{ 'tests' if project.include_tests != 'none' else '' }}"
    "_docs": {
        "dir": "{%- if project.include_docs == 'sphinx' -%}\ndocs\n{%- elif project.include_docs == 'mkdocs' -%}\ndocz\n{%- else -%}\n{%- endif -%}"

The json-format do not have multi line but you can use multiple \n in one line.

The source directory could be something like this:


{{}}/ may look something like this:

from setuptools import setup, find_packages
from {{ project.package }} import __version__ as app_version

    name="{{ }}",
    packages=find_packages(include=['{{ project.package }}*']),

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Built Distribution

make-0.1.6.post2-py3-none-any.whl (14.2 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page