Skip to content

Commit 4e12aff

Browse files
author
App Generator
committed
Update README.md
1 parent ba14f03 commit 4e12aff

File tree

1 file changed

+47
-57
lines changed

1 file changed

+47
-57
lines changed

README.md

+47-57
Original file line numberDiff line numberDiff line change
@@ -1,78 +1,68 @@
1-
# [Flask Learn by coding](https://dev.to/sm0ke/flask-learn-by-coding-1o8o)
1+
# Learn FastAPI by Coding
22

3-
A simple [Flask](http://flask.pocoo.org/) app coded for beginners - Live [Demo](https://flask-learn-by-coding.appseed.us)
3+
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.
4+
5+
> **For support and more [Free Samples](https://appseed.us/admin-dashboards/open-source) join [AppSeed](https://appseed.us).**
46
57
<br />
68

7-
![Flask App - Learn by coding - Intro](https://github.com/app-generator/static/blob/master/flask-learn-by-coding/flask-learn-by-coding-intro.gif)
9+
## Getting Started with FastAPI
810

9-
<br />
11+
> Create a Virtual Environment
1012
11-
## Project Structure
12-
13-
```sh
14-
├── src
15-
│   ├── run.py
16-
│   ├── app
17-
│   │   ├── __init__.py
18-
| |
19-
│   ├── templates
20-
│   │   ├── includes
21-
│   │   │ ├── contact.html
22-
│   │   │ ├── footer.html
23-
│   │   │ ├── header.html
24-
│   │   │ ├── navigation.html
25-
│   │   │ ├── scripts.html
26-
│   │   │ ├── section-top.html
27-
│   │   │ ├── section-features.html
28-
│   │   │ ├── section-team.html
29-
│   │   ├── layouts
30-
│   │   │ ├── default.html
31-
│   │   ├── pages
32-
│   │   ├── index.html
33-
│ │
34-
│   └── static
35-
│   ├── assets
36-
│      ├── css
37-
│      ├── img
38-
│      └── js
39-
└── README.md (this file)
40-
```
13+
```bash
14+
$ # Virtualenv modules installation (Unix-based systems)
15+
$ virtualenv env
16+
$ source env/bin/activate
17+
$
18+
$ # Virtualenv modules installation (Windows-based systems)
19+
$ # virtualenv env
20+
$ # .\env\Scripts\activate
21+
```
4122

4223
<br />
4324

44-
## Quick Start
25+
> Install `Flask`
4526
46-
1. Clone the repo
47-
```
48-
$ git clone https://github.com/app-generator/flask-learn-by-coding.git
49-
$ cd flask-learn-by-coding/src
50-
```
27+
```bash
28+
$ pip install flask
29+
```
30+
31+
<br />
5132

52-
2. Install the dependencies:
53-
```
54-
$ pip install -r requirements.txt
55-
```
33+
> Edit your first Flask app `main.py`
5634
57-
3. Setup the environment:
58-
```
59-
$ export FLASK_APP=run.py
60-
```
35+
```python
36+
from flask import Flask
37+
app = Flask(__name__)
6138

62-
4. Run the app:
63-
```
64-
$ flask run
65-
```
39+
@app.route('/')
40+
def hello_world():
41+
return 'Hello from Flask!'
42+
```
6643

6744
<br />
6845

69-
## Screenshots
46+
> Setup the environment
47+
48+
```bash
49+
$ # Set the FLASK_APP environment variable
50+
$ (Unix/Mac) export FLASK_APP=main.py
51+
$ (Windows) set FLASK_APP=main.py
52+
$ (Powershell) $env:FLASK_APP = ".\main.py"
53+
```
54+
55+
<br />
7056

71-
![Pages](https://raw.githubusercontent.com/app-generator/static/master/flask-learn-by-coding/flask-learn-by-coding-screen-1.jpg)
57+
> Start the app
7258
73-
![Forms](https://raw.githubusercontent.com/app-generator/static/master/flask-learn-by-coding/flask-learn-by-coding-screen-2.jpg)
59+
```bash
60+
$ flask run
61+
$
62+
$ # Access the app in browser: http://127.0.0.1:5000/
63+
```
7464

7565
<br />
7666

77-
---
78-
[Flask Learn by coding](https://dev.to/sm0ke/flask-learn-by-coding-1o8o) - tutorial provided by **AppSeed**
67+
---
68+
Learn Flask by Coding - Provided and actively supported by AppSeed [App Generator](https://appseed.us)

0 commit comments

Comments
 (0)