---
title: "Discussion on \"Streaming tweets using Twitter V2 API | Tweepy\" | Hashnode"
description: "Discussion on \"Streaming tweets using Twitter V2 API | Tweepy\". Get live tweets using Twitter V2 API and store them in a database."
url: "https://hashnode.com/posts/streaming-tweets-using-twitter-v2-api-tweepy/62fc74574900bfdc627653ce"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Streaming tweets using Twitter V2 API | Tweepy](https://dipankarmedhi.hashnode.dev/streaming-tweets-using-twitter-v2-api-tweepy?utm_source=hashnode&utm_medium=feed)

Get live tweets using Twitter V2 API and store them in a database.

Aug 17, 2022 · 5 min read · dipankarmedhi.hashnode.dev  
Updated Aug 20, 2022  
Read the article

-   [#apis](https://hashnode.com/tag/apis)
-   [#python](https://hashnode.com/tag/python)
-   [#data-science](https://hashnode.com/tag/data-science)
-   [#databases](https://hashnode.com/tag/databases)
-   [#twitter](https://hashnode.com/tag/twitter)

## Written by

[Dipankar Medhi](https://hashnode.com/@dipankarmedhi)

@dipankarmedhi · India

  
[View profile](https://hashnode.com/@dipankarmedhi)

Sharing data & ML solutions for engineering problems.

Write blogs about software and data.

## Responses 1

Markdown supported · ⌘↵ to post

[Filip Niko](https://hashnode.com/@FilipNiko)

[Sep 30, 2022](https://hashnode.com/posts/streaming-tweets-using-twitter-v2-api-tweepy/62fc74574900bfdc627653ce/comment/6337802ee594fa4ba3b8f176)

Hi, how do you ensure that `on_includes` will run always after `on_tweet` so the `self.new_tweet["tweet"]` will not be empty upon insertion into database?

[Dipankar Medhi](https://hashnode.com/@dipankarmedhi)

[Oct 2, 2022](https://hashnode.com/posts/streaming-tweets-using-twitter-v2-api-tweepy/62fc74574900bfdc627653ce/comment/6337802ee594fa4ba3b8f176#reply-63391022e594fa4ba3b90ba4)

Hi Filip,

Yes, even I had the same doubt while working on this project. Later, after debugging the code, I got that the methods run sequentially, so on\_includes always run after on\_tweet. And for more control over the queries, you can put conditons on the methods to get your data accordingly.

Hope, I answerd your question.
