An open API service indexing awesome lists of open source software.

https://github.com/app-generator/flask-learn-by-coding

Flask Web Framework - Learn by Coding | AppSeed
https://github.com/app-generator/flask-learn-by-coding

appseed-sample flask learn-by-coding

Last synced: about 1 year ago
JSON representation

Flask Web Framework - Learn by Coding | AppSeed

Awesome Lists containing this project

README

          

# Learn Flask by Coding

Open-source project provided by AppSeed to help beginners accommodate faster with Flask. For newcomers, Flask is a lightweight WSGI web application framework. It is designed to make getting started quick and easy, with the ability to scale up to complex applications.


> 🚀 `PROMO`: **[Junior Developers Starter KIT](https://www.creative-tim.com/product/buy/bundle/junior-bundle?AFFILIATE=128200)** `85%OFF`

The package includes a `rock-solid collection of premium assets` (**Kits & Dashboards**) that can be used to build eye-catching portfolios and web apps in no time.

[![Junior Developers Starter KIT](https://user-images.githubusercontent.com/51854817/195055646-e55200cd-0ddd-4bdd-aded-0d4e4479789b.png)](https://www.creative-tim.com/product/buy/bundle/junior-bundle?AFFILIATE=128200)


## Getting Started with Flask

> Create a Virtual Environment

```bash
$ # Virtualenv modules installation (Unix-based systems)
$ virtualenv env
$ source env/bin/activate
$
$ # Virtualenv modules installation (Windows-based systems)
$ # virtualenv env
$ # .\env\Scripts\activate
```


> Install `Flask`

```bash
$ pip install flask
```


> Edit your first Flask app `main.py`

```python
from flask import Flask
app = Flask(__name__)

@app.route('/')
def hello_world():
return 'Hello from Flask!'
```


> Setup the environment

```bash
$ # Set the FLASK_APP environment variable
$ (Unix/Mac) export FLASK_APP=main.py
$ (Windows) set FLASK_APP=main.py
$ (Powershell) $env:FLASK_APP = ".\main.py"
```


> Start the app

```bash
$ flask run
$
$ # Access the app in browser: http://127.0.0.1:5000/
```


---
Learn Flask by Coding - Provided and actively supported by AppSeed [App Generator](https://appseed.us)