Setup
Requirements
Hyperflask simplifies development environments by standardizing everything around containers.
VS Code is also the recommended editor (and currently the only one with syntax highlighting for Jinjapy files).
What you will need:
- A UNIX like system (Linux, MacOS or WSL on Windows)
- Docker
- VS Code
Python is not needed on your machine, everything will be executed inside containers.
Installation using Hyperflask-Start
We will use Hyperflask-Start to create our project.
Info
Although it is not mandatory, Hyperflask-Start is the officially recommended experience.
Launch the following command to create your project:
curl -L https://raw.githubusercontent.com/hyperflask/hyperflask-start/main/start.sh | bash
This will prompt you for some options and create the project in a new folder.
Open your project folder in VS Code. It should prompt you to "re-open workspace in development container" which you should accept. VS Code will create and start the development container and re-launch itself.
You are now developping from the container inside which you will find Python 3.11, Node & npm and hyperflask installed.
Installation without Hyperflask-Start
- Create your project directory:
mkdir example-project && cd example-project
- Create and activate a virtualenv:
python -m venv .venv && source .venv/bin/activate
pip install hyperflask
- Create a pages directory:
mkdir pages
- Create your index page:
echo "hello world" > pages/index.html
- Start a development server using
hyperflask dev