Bootstrap your project with predefined templates
Project description
flox bootstrap engine
Create your projects in seconds with flox using shared templates.
Installation
$ flox plugin install flox-bootstrap
or
$ pip install flox-bootstrap
Configuration
You can use this plugin without any configuration, but if you like you can add your own custom repository which may contain additional or customised templates.
$ flox config --plugin bootstrap --scope=user
Bootstrap project using templates
$ flox bootstrap python 12:14:05
→ Create library project [y/N]: n
→ Python Version [3.8.12]:
$ ls -la .
drwxr-xr-x 4 me staff 128 Jan 13 11:54 .flox
drwxr-xr-x 13 me staff 416 Jan 13 12:14 .git
-rw-r--r-- 1 me staff 6 Jan 13 12:14 .python-version
-rw-r--r-- 1 me staff 14 Jan 13 11:54 README.md
drwxr-xr-x 3 me staff 96 Jan 13 11:54 flox_project
-rw-r--r-- 1 me staff 454 Jan 13 12:14 pyproject.toml
flox templates may contain extra parameters which can be changed during bootstrap proces.
Template repository structure
You can create your own repository or fork default one https://github.com/getflox/flox-templates Your template repository should be structured like that:
.
├── github-actions
│ ├── hooks.py
│ └── template
├── python
│ ├── template
│ │ ├── <project_name_underscore>
│ │ │ └── __init__.py
│ │ └── pyproject.toml.j2
│ └── variables.py
└── serverless-python
├── template
│ ├── package.json.j2
│ └── serverless.yml.py.j2
└── variables.py
Where:
- first level directory is a name of the template which can be passed as parameter to bootstrap command
variables.pyis a simple python script containing one variable calledVARIABLESwhich should be a list ofParamDefinitionobjects defining parametershooks.pya simple script which may contain two functionspre_installandpost_installwhich will be executed before and after bootstrap template is added to your project. additionallypre_installfunction will get all variables and all features installed for given project with the ability to filter template files which should be installed
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file flox-bootstrap-0.1.3.tar.gz.
File metadata
- Download URL: flox-bootstrap-0.1.3.tar.gz
- Upload date:
- Size: 4.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.0 CPython/3.8.12 Linux/5.11.0-1025-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6d805667f2577ce0ff546ca1a138c1f875c4f34947d6da4aefddb39c48c981a7
|
|
| MD5 |
47e7a12e50d6ee298c912dbaf2872285
|
|
| BLAKE2b-256 |
8f2481bb0b64bc02d0d6639224926197235ee1aa6f6c26d5e446df656dcf0620
|
File details
Details for the file flox_bootstrap-0.1.3-py3-none-any.whl.
File metadata
- Download URL: flox_bootstrap-0.1.3-py3-none-any.whl
- Upload date:
- Size: 5.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.0 CPython/3.8.12 Linux/5.11.0-1025-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9b6f9e1c0935517fd71d899d9f70363e1321aa379f1d513c36309d58c56ed63e
|
|
| MD5 |
b385def58fc0928b1e88c49eaeb4536e
|
|
| BLAKE2b-256 |
621fbd088de637b9a846f8804d44d6e5d938a69a1c42cff1d81a6d6c44bda5d4
|