Package: create-app
create_appis 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_appis 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. Butcreate_appcan generate projects ofany language,
as it usescookiecutter.InstallationJust install it with PIP:python-mpipinstallcreate_appUsageLearn how to use thecreate_appcommand:python-mcreate_app--helpYou can use the--helpoption for all subcommands too.List templatesUse thelistsubcommand to know which templates you can use:python-mcreate_applistCreate your project from a templateUse thecreatesubcommand and specify theTEMPLATE_NAMEyou wish to use:create_appcreateTEMPLATE_NAMEUsing the template defaultsIf 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-defaultsflag:create_appcreateTEMPLATE_NAME--use-defaultsUsing a configuration fileWhen 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-fileoption to specify these values from a JSON
file. This option is specially useful for scripting:create_appcreateTEMPLATE_NAME--config-file=config.jsonUsing a custom templates indexYou 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_applist--index="https://www.somewhere.com/templates-index"And create your project from a template in that index:create_appcreateTEMPLATE_NAME--index="https://www.somewhere.com/templates-index"Using create_app from PythonYou can import create_app from Python too, which is great for scripting or creating multiple projects at once:fromcreate_app.mainimportcreate_app# Create from a template named "python_simple"create_app("python_simple")How it worksIt uses a great tool namedcookiecutterto 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-mcookiecutterhttps://github.com/application-creators/python_simplecreate_appis just an entry point to a set of templates, and I was inspired bycreate-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 TemplatesThere's anindex of templates, from which you can get your project started:TemplateDescriptionpython_simplePython project with unit tests, GIT hooks (pre-commit,black,isort, andflake8), and Dockerpython_composePython project with unit tests, GIT hooks (pre-commit,black,isort, andflake8), and Docker Composepython_fastapiFastAPI project with unit tests, GIT hooks (pre-commit,black,isort, andflake8), and Dockerpython_fastapi_with_databaseFastAPI project with unit tests, GIT hooks (pre-commit,black,isort, andflake8), Docker Compose, aPostgreSQLdatabase (which can be very easily changed for any other),SQLAlchemy, andAlembicmigrationsContributeApplication Creatorsis 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!