#115: Working With Twitter Lists in Tweepy
Lists are a helpful Twitter feature that allows us to keep up with interesting accounts. Let's look at how we can use Tweepy to work with those lists.
Lists are a helpful Twitter feature that allows us to keep up with interesting accounts. Let's look at how we can use Tweepy to work with those lists.
Tweepy is very good at abstracting the Twitter API. But what can we do if Tweepy stops working from one day to another?
With the user access tokens stored, we can now explore the Twitter API. A good starting point is to look at the accounts you follow and on who follows you.
So far we acquired the user authentication token in the command line. This works at development time, but our users need a more friendly way to hand over their tokens. Let's look what we need to do to use Tweepy in a Flask application and how we can get the user token from Twitter.
When you explore the Twitter API, you will get a lot of 401 errors. Let's look how we need to set the permissions for our App so that we can explore the Twitter API without interruptions.
At Python Friday #100 I asked for topics to cover in this blog series. The request from kiquenet to cover Twitter offers interesting challenges that we will explore over the next weeks. Today we start with the basics and post our first tweet.
Whenever I need to find values that are part of one list but not another one, I like to work with set operations. I find them more elegant than looping through the lists. Let’s look what Python to solve this problem.
When you write scripts you often need to ask the user for an input. Let's look how we can do that in Python.
As last week's post showed, our application gets its own copy of the environment variables when we start it. Would it not be great if we could extend that specific copy to include sensitive configuration values like API keys? We can achieve this with a .env file and this post shows you how to do that.
Environment variables are a useful way to store computer specific configuration values, like the home directory of the user or the temp folder. Let's look how we can access the environment variables from our Python code.