
* * *

```bash
~$pip install flask
~$pip3 install flask
```

해당 flask 패키지가 설치됐는지 확인하기 위해선 많이 사용하는 3가지의 방법이 존재합니다.

#### <span style="color:#71B091;"># 한개의 패키지 정보 확인</span>

```bash
~$pip show flask
```

#### <span style="color:#71B091;"># Python 코드로 직접 패키지 불러오기</span>

```bash
python -c "import flask"
```

#### <span style="color:#71B091;"># 패키지 리스트중에 있는지 확인하기</span>

```bash
~$pip list | grpe "flask"
```

* * *

## <span style="color:#4B758D;">> Flask 실행하기</span>

Python으로 ``Hello World!``를 출력하는 웹 사이트 소스코드를 만들면 하단의 소스코드처럼 구성됩니다.

```python
from flask import Flask

app = Flask(__name__)

@app.route('/')
def index():
    return 'Hello World!'

app.run(host = '127.0.0.1', port=8080)
```

해당 파이썬 소스코드를 ``app.py`` 파일로 실행할시에

```bash
~$python3 app.py
    * Serving Flask app "app" (lazy loading)
    * Environment: production
      WARNING: This is a development server. Do not use it in a production deployment.
      Use a production WSGI server instead.
    * Debug mode: off
    * Running on http://127.0.0.1:8080/ (Press CTRL+C to quit)
```

이렇게 로컬에 8080 포트로 제작된 웹 서버가 제작된것을 볼 수 있는데

해당 ``127.0.0.1:8080``으로 들어가보면 

```python
@app.route('/')
def index():
    return 'Hello World!'
```

이부분으로 인해 return에 있는 ``Hello World!``가 웹 페이지에 노출되면서 기본적인 웹 사이트가 구성되었습니다.

즉 ``@app.route`` 데코레이터로 index 함수와 연결되면서 해당 함수의 반환값을 웹 페이지에 노출하게 됩니다.

만약 Flask로 개발된 웹 서버를 외부로 배포하고싶다면 Python를 실행시킬 수 있는 서버 또는 리눅스를 호스팅하거나 포트포워딩을 이용하여 외부에 배포할 수 있습니다.

## 마치며

django도 좋은 웹 프레임 워크지만 Flask는 문법이 간결하여 초보자가 공부하기에 좋은 웹 프레임 워크라고 생각한다.For the last time in 2018, time to rate the players.
The New York Red Bulls needed three goals - at least - in the second leg of the 2018 MLS Eastern Conference Final to have any hope of advancing to play for MLS Cup. In the end, they found one - and that only arrived after all hope of winning the series against Atlanta United had expired.
Losing the series meant Atlanta got to celebrate being Eastern Conference Champion on the field at Red Bull Arena, which made RBNY’s 1-0 win feel like a loss. And, of course, it was a loss: Atlanta knew losing by a goal or two was an entirely acceptable result and never had to worry about losing control of the series.
Still, RBNY did beat a very good team, 1-0, and the player ratings can’t be too hard on the players for not getting the goals they needed to get to MLS Cup.
Luis Robles - 7.5: Stifling Josef Martinez in the first minute stopped the game being over for RBNY before it had really started.
Our Captain keeping us in it.
Weak shot? Sure. But Robles positioned himself well, made Martinez work for a goal he was odds-on to get, and won the battle.
And the RBNY captain pulled out another fine stop to keep Julian Gressel from sneaking a goal in for Atlanta. His job was to keep hope alive by keeping Atlanta off the board, and he did it.
Robles with the diving stop!
The clean sheet was Robles’ eighth in the playoffs all-time for RBNY: he has more career post-season shutouts for the club than the rest of the team’s goalkeepers combined.
Connor Lade - 6: Didn’t a lot wrong and got forward regularly to try to add width to the attack. Lade was subbed out early in the second half as Chris Armas tried to increase the team’s attacking options, but that should not be held against him.
Aaron Long - 7.5: A performance worthy of the reigning MLS Defender of the Year - Long shut down a number of Atlanta counter-attacking opportunities that might otherwise have seen RBNY struggle even to achieve the consolation of winning its last home game of the year.
Tim Parker - 8: Put the ball in the net twice - though only one goal counted; back to his better self after a disappointing display in the first leg.
Michael Murillo - 6: A solid performance from Murillo, though not the exceptional one the match required.
Sean Davis - 6: Not great, but not bad either - like most of the team on the day.
Tyler Adams - 5: Very, very nearly gave the game away in the opening minute by playing Josef Martinez in behind the RBNY back line. Adams bounced back, but the closest he got to a game-breaking moment was that first-minute mistake.
Daniel Royer - 5: The Player Ratings were hoping for a big second-leg performance from Danny Royer, but sadly he only had one of those available this season and he used it agains Columbus.
Kaku - 6: Delivered a perfect skimming cross to the six-yard box early in the second half, and that illustrated how much RBNY has been missing its playmaker recently. Why Kaku isn’t on the ball in dangerous positions more often is a question Chris Armas will need to address in pre-season.
Alex Muyl - 5: Seemed like it was his touch that took Kaku’s cross just out of BWP’s reach. Muyl’s two big contributions to this series were being the man offside who got BWP’s goal in the first leg called off, and the guy who killed the play that might have opened up the game for RBNY in the second.
Bradley Wright-Phillips - 6: RBNY’s big idea for most of the game was to punt the ball over the Atlanta back line and hope BWP could run on to it. That he patiently endured this sub-par service is a testament to his professionalism.
Derrick Etienne - 5: He was brought in early in the second half to give RBNY more attacking options. Why Armas believed that Etienne would do this most effectively from left back is difficult to say.
Marc Rzatkowski - 5: He was present.
Andreas Ivan - 5: One of his livelier outings for R