Posts

Hit the Ground Running with FastAPI!

      I recently had a job interview with a company that told was building API's in FastAPI, a Python framework for building high performance, fast to code API's. From the research I did, it sounded like a it achieved a lot of the things Flask seeks to do, but faster and with an even simple way to code them. I started learning some FastAPI and coding along with the tutorial on the website found here , and I was amazed at how fast I could set up a simple API. The code I've included below is an entire API, in less than 25 lines of code. I have two get requests and a post request that even handles some data validation.     Since my API is so small, you can easily run it on your machine as well provided you have Python 3.6+ running on your machine. Installing FastAPI is as simple as two pip installs (the tutorial has a way to install both at once but I ran into errors until I installed them both separately): pip install fastapi pip install uvicorn[standard...

IaaS and PaaS with Azure

Image
      Web services are massive, so I've been trying to learn how to use Microsoft Azure. They started me off with $200 in credit for my first month, so I got a VM set up in Azure. I decided to start with a Windows Server VM, which may have caused me some additional headaches but I had worked with some Windows VM's back when I was doing IT for a university. I wanted to try hosting a simple React site I made (remember this post ?), but when that wasn't working out I found out how to change the start page of the virtual machine so that it would display some HTML. It wasn't particularly interesting or useful, but it was interesting to get a VM running on Azure.       The better way to get what I wanted to host up on Azure was by simply using Azure as a platform for hosting. The pipelines were a bit tricky to set up, and making sure you are setting the correct npm commands to run your application is very important, but it didn't take long to get a sim...