Now, you should have a prompt that has (venv) at the beginning, like this (the. # for most Linux and OS X users, you should run: For most Linux and OS X users, you’ll use another command which I’ll list below (for other platforms, there are instructions in the Python docs): # for Windows/PowerShell users, you should run: Since I’m on Windows, I’ll be executing this command in PowerShell, so what I use may be different than you. To enter the virtual environment, you’ll need to run the appropriate initialization script. I’ll use the virtual environment ability built into newer versions of Python, and I’ll call the environment venv: python -m venv venv Change into that directory, and from here on out all files should go in here. We want to create a directory for our Python files, so make one of your own choosing I used simple_flask_api. Setting up the virtual environment and installing Flask If you don’t have it set up, you can find a downloadable installer on the Python web site. I’ll be using Python 3.x, and I’m going to assume you have it all set up and in your path. The branch for this part will be 01-bare-bones. And if you’d like the source code at any time, you can grab it here: /billturner/simple_flask_api. I’ll try and link all these together once I get more up. This should be the first of a few blog posts explaining how to get a simple API up and running with Python, and using the Flask framework.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
March 2023
Categories |