Responder Web Framework Mini-course Transcripts
Chapter: Building a RESTful API with Responder
Lecture: Setting up the project
Login or
purchase this course
to watch this video and the rest of the course contents.
0:00
Are you ready to write some code? And build an API, that movie search service with responder? Well, let's get started.
0:06
We're going to over here in our GitHub repo create a folder called movie_svc and I'm going to go into the service and just create a virtual environment
0:14
as we have been all along. So we'll run Python3 -m venv venv and that'll create an virtual environment and activate it.
0:23
Now the next thing to do is install Responder so we'll say pip install responder. There we go it's all installed
0:32
and if we also install a little tool here called pipdeptree you can see how all this stuff fits together. You can just say pipdeptree
0:41
and it shows you all of the moving pieces of Responder so you can see Responder is using aiofiles, API Star graphene, Jinja2, requests
0:51
uvicorn for the async web server and then Starlette we already talked about. So here's all the pieces that we got working.
0:58
Now let's open this up in PyCharm. And now we are going to get started by just having a Pyhton file and I'll call it app.py.
1:08
You can actually call it whatever you want but that's fine. Okay, we make sure everything is working by just saying import responder
1:15
and then we can go ahead and just run this. Okay loads up looks like everything is configured correctly. Now we got to get started with the API
1:24
create some view methods and then run our server. Now before we do run that server though lets do one more thing lets create a requirements file here.
1:35
And here we'll just put responder as well okay great so we got our requrements.txt and we got our starter code
1:42
that we're going to build our app right here.