Skip to main content

Create App logo

Test Workflow Status Linting Workflow Status PyPI Publication Workflow Status Coverage Status PyPI Code style: black

create_app is a tool for creating applications from templates.

When developers start a new project, they perform some repetitive tasks to build the basic project structure before actually start coding features. This basic structure involves things like: Well, the project structure, unit testing, code coverage, containerization, code linting and formatting, GIT hooks, building code documentation, among many others.

create_app is a tool that allows to quickly get your basic project structure ready. It provides a set of templates from which you can get your project started, plus it's super easy to use and encourages the adoption of the best technologies, tools, and practices.

At the moment, there are only Python templates available. But create_app can generate projects of any language, as it uses cookiecutter.

Installation

Just install it with PIP:

python -m pip install create_app

Usage

Learn how to use the create_app command:

python -m create_app --help

You can use the --help option for all subcommands too.

List templates

Use the list subcommand to know which templates you can use:

python -m create_app list

Create your project from a template

Use the create subcommand and specify the TEMPLATE_NAME you wish to use:

create_app create TEMPLATE_NAME

Using the template defaults

If you don't want to configure your project and just want to create it from the template using all the default values, use the --use-defaults flag:

create_app create TEMPLATE_NAME --use-defaults

Using a configuration file

When creating a project, you are asked to type your project configuration in. If you already know which the template settings are and the values you want to use, you can use the --config-file option to specify these values from a JSON file. This option is specially useful for scripting:

create_app create TEMPLATE_NAME --config-file=config.json

Using a custom templates index

You or your organization may need to keep a separate index with your own templates.

If that's the case, you can list the templates in the custom index by running:

create_app list --index="https://www.somewhere.com/templates-index"

And create your project from a template in that index:

create_app create TEMPLATE_NAME --index="https://www.somewhere.com/templates-index"

Using create_app from Python

You can import create_app from Python too, which is great for scripting or creating multiple projects at once:

from create_app.main import create_app

# Create from a template named "python_simple"
create_app("python_simple")

How it works

It uses a great tool named cookiecutter to build your project from a template. The templates are cookiecutters, so you could simply use cookiecutter to build your project from the template repo URL:

python -m cookiecutter https://github.com/application-creators/python_simple

create_app is just an entry point to a set of templates, and I was inspired by create-react-app, which lets you create your project from a template by just specifying a template name.

The main goal though, and what I would like to focus on, is to come up with great project templates. Then people can choose to directly use cookiecutter to build their projects, or could use this tool to discover which templates are available and to create their project.

Index of Available Templates

There's an index of templates, from which you can get your project started:

Template Description
python_simple Python project with unit tests, GIT hooks (pre-commit, black, isort, and flake8), and Docker
python_compose Python project with unit tests, GIT hooks (pre-commit, black, isort, and flake8), and Docker Compose
python_fastapi FastAPI project with unit tests, GIT hooks (pre-commit, black, isort, and flake8), and Docker
python_fastapi_with_database FastAPI project with unit tests, GIT hooks (pre-commit, black, isort, and flake8), Docker Compose, a PostgreSQL database (which can be very easily changed for any other), SQLAlchemy, and Alembic migrations

Contribute

Application Creators is a new GitHub organization I've created to host, debate, and maintain this tool and the project templates. Its goal is to generate state-of-the-art templates useful to everyone. Feel free to express you opinion and contribute!

Metadata

Release files for create-app 0.6.2

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

Source distribution (sdist)

Source distribution for create-app 0.6.2
File Size Uploaded Provenance Actions
create_app-0.6.2.tar.gz 45.1 kB Without provenance Details for create_app-0.6.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for create-app 0.6.2
File Interpreter ABI Platform Actions
create_app-0.6.2-py3-none-any.whl Python 3 none any Details for create_app-0.6.2-py3-none-any.whl

Total release size: 53.9 kB

Release files / create_app-0.6.2.tar.gz

Download URL create_app-0.6.2.tar.gz
Size 45.1 kB
Tags Source
SHA-256 checksum
How to use checksums
c32f2641f1965663b7d200bd952af30f5dab33c56685f2fd4fd794e4e49ecd39
BLAKE2b-256 checksum
How to use checksums
41c3a6288b9e247b0bb84b3ad313932794648998198e81f1a0f85e9f7addcbde
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.11.2

Release files / create_app-0.6.2-py3-none-any.whl

Download URL create_app-0.6.2-py3-none-any.whl
Size 8.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
28b73272100e3a634317ed4b0187d4a344b4de5c313c8457ed286a0890ad2447
BLAKE2b-256 checksum
How to use checksums
4b8fd102aefe79c18d3ea0d11fabaf70a48853b837d66a672e777c74fd7bf75f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.11.2

Security for create-app 0.6.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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