Setting Up - Building an API in Python with Flask
Tags: python, webdev, beginners, twitch
Published: 2020-01-17 14:27:13

---
title: Setting Up - Building an API in Python with Flask
published: true
description: Live stream recap notes from Twitch with Cecil Phillip and Brian Clark on January 15, 2020
tags: python,webdev,beginners,twitch
cover_image: https://user-images.githubusercontent.com/6265396/72580074-e7a17200-38a8-11ea-9884-6272bb29b5d5.png
canonical_url: https://www.clarkio.com/stream/python/2020-01-15
---

In this session, Cecil, Brian and chat set up our development environment for building an API in Python with Flask. They use Visual Studio Online as their remote development environment and collaborate over Visual Studio Live Share

The following are notes and details recapping a past live stream where we live code together. The idea behind these streams is that they provide real-world examples of running into problems and solving them or working towards solving them live. Enjoy this latest one on Python 🙂👍

# Wednesday - January 15, 2019

- [Twitch](https://www.twitch.tv/videos/536404551?t=00h05m13s)
- [YouTube](https://youtu.be/WdY7tZY2jcshttps://www.twitch.tv/videos/536404551?t=313)

## Next Steps

- Add features to the API

## Resources

- [Project Code Repository](https://github.com/cecilphillip/python-flask-stream)
- [GitIgnore Website](https://www.gitignore.io/)
- [Flask](https://flask.palletsprojects.com/en/1.1.x/)
- [GitHub CLI Tool](https://github.com/github/hub)
- [Configuring Visual Studio Online](https://docs.microsoft.com/en-us/visualstudio/online/reference/configuring?WT.mc_id=devto-blog-cxa)
- [pyenv](https://github.com/pyenv/pyenv)
- [pyenv installer](https://github.com/pyenv/pyenv-installer)
- [Determining if you're running in a container](https://stackoverflow.com/questions/23513045/how-to-check-if-a-process-is-running-inside-docker-container)
- [Azure Pricing Calculator](https://azure.microsoft.com/en-us/pricing/calculator?WT.mc_id=devto-blog-cxa)
- [Visual Studio Online](online.visualstudio.com)
- [TalkPython Podcast: Practices of the Python Pro](https://talkpython.fm/episodes/show/246/practices-of-the-python-pro)
- [Python Cheat Sheet](https://www.pythoncheatsheet.org/)
- [Microsoft Developer's Python for Beginners](https://www.youtube.com/watch?v=jFCNu1-Xdsw&list=PLlrxD0HtieHhS8VzuMCfQD4uJ9yne1mE6)

## VS Code Extensions Shown/Used

- [VS Live Share](https://marketplace.visualstudio.com/items?itemName=MS-vsliveshare.vsliveshare-pack&WT.mc_id=devto-blog-cxa)
- [Visual Studio Online VS Code Extension](https://marketplace.visualstudio.com/items?itemName=ms-vsonline.vsonline&WT.mc_id=devto-blog-cxa)
- [Python](https://marketplace.visualstudio.com/items?itemName=ms-python.python&WT.mc_id=devto-blog-cxa)

## Clips

Clips are a feature on Twitch that let you cut and capture segments of the live stream in the moment (up to 60 seconds). See [how to use clips on Twitch](https://help.twitch.tv/s/article/how-to-use-clips) for more details. The following are some fun moments captured from this stream:

- [A Python API with Flask running in VS Online via VS Live Share!](https://clips.twitch.tv/PeppyInspiringWolfCurseLit)
- [Adding pyenv tool to the PATH](https://clips.twitch.tv/ArtisticAmazingKleeKreygasm)

## Segments

> Links not working on Twitch? It's most likely because Twitch will only save my stream recordings for about 60 days. Use the YouTube link at the top of this page instead.

This table helps point out different segments of the stream (highlighted in bold) or moments we learned something (not bold). The timestamps link to the video on Twitch at that point in the recording. If you'd like the YouTube link above will have similar timestamps and link to those same points in the recording as well.

| Timestamp                | Topic       |
| ------------------------ | ----------- |
| [00:05:13](https://www.twitch.tv/videos/536404551?t=00h05m13s) | **Kick it off** |
| [00:14:51](https://www.twitch.tv/videos/536404551?t=00h14m51s) | **Plan for the future of the Python streams** |
| [00:31:15](https://www.twitch.tv/videos/536404551?t=00h31m15s) | **Begin setting up visual studio online** |
| [00:35:01](https://www.twitch.tv/videos/536404551?t=00h35m01s) | **Calculating cost of vso based on estimated usage** |
| [01:16:33](https://www.twitch.tv/videos/536404551?t=01h16m33s) | **Actively using Visual Studio Live share in the Visual Studio Online environment** |
| [01:29:09](https://www.twitch.tv/videos/536404551?t=01h29m09s) | **Back from break** |
| [01:29:35](https://www.twitch.tv/videos/536404551?t=01h29m35s) | **Start setting up the vso environment for python and share Cecil's via vs live share** |
| [01:36:05](https://www.twitch.tv/videos/536404551?t=01h36m05s) | **Installing a new version of python in vs online** |
| [01:56:26](https://www.twitch.tv/videos/536404551?t=01h56m26s) | **Now really installing a new version of python with pyenv** |
| [02:01:27](https://www.twitch.tv/videos/536404551?t=02h01m27s) | **Why is an older version of Python being used still?** |
| [02:14:39](https://www.twitch.tv/videos/536404551?t=02h14m39s) | **Checking out github cli (not git)** |
| [02:38:07](https://www.twitch.tv/videos/536404551?t=02h38m07s) | **We wrote a thing! built an API with Flask in Python!** |
| [02:48:21](https://www.twitch.tv/videos/536404551?t=02h48m21s) | **Exploring the commands for github cli to create our repository** |

## YouTube Video

{% youtube WdY7tZY2jcs %}

## Get connected with Cecil Phillip

- [Twitter](https://twitter.com/cecilphillip)
- [Twitch](https://twitch.tv/cecilphillip)
- [Instagram](https://instagram.com/cecilphillip)
- [GitHub](https://github.com/cecilphillip)
- [Website](https://cecilphillip.com/)

## Get connected with Brian Clark

- [Twitter](https://twitter.com/_clarkio)
- [Twitch](https://twitch.tv/clarkio)
- [Instagram](https://instagram.com/_clarkio)
- [YouTube](https://youtube.com/clarkio)
- [GitHub](https://github.com/clarkio)
- [Website](https://www.clarkio.com)

-----

Thanks for reading this article. If you're interested in finding more content from Microsoft Cloud Advocates check out this monthly curated newsletter: [Developer Community Newsletter](https://azure.microsoft.com/en-us/resources/join-the-azure-developer-community/?WT.mc_id=pythonfromscratch-devto-cxa)