Giter Club home page Giter Club logo

aws-blog-dynamodb-analysis's Introduction

aws-blog-dynamodb-analysis

This package can pull random public tweets from Twitter (tweets-streaming.py) or generates simulated tweets (tweets-simulated.py). The result will be stored into a DynamoDB table.

tweets-streaming.py

This script pulls random tweets from the Twitter API and stores them in Amazon DynamoDB. There are two modules needed to execute the script:

A Twitter account is needed to access Twitter API. Go to https://www.twitter.com/ and sign up for a free account, if you don't already have one. Once your account is up, go to https://apps.twitter.com/ and on the main landing page, click the grey "Create New App" button. After you give it a name, you can go to the "Keys and Access Tokens" to get your credentials to use the Twitter API. You will need to generate Customer Tokens/Secret and Access Token/Secret. All four keys will be used to authenticate your request.

In the script, update the following lines with the real security credentials:

# Twitter security credentials 
ACCESS_TOKEN    = "...01234..."
ACCESS_SECRET   = "...i7RkW..."
CONSUMER_KEY    = "...be4Ma..."
CONSUMER_SECRET = "...btcar..."

This section can be customized according to your preference. Use your own table name and TTL value as desired:

# Global variables.
dynamodb_table     = "TwitterAnalysis"
expires_after_days = 30

tweets-simulated.py

This script generates simulated tweets and stores them in Amazon DynamoDB. There are three modules needed to execute the script:

In the script, update the following lines with the real security credentials:

# Twitter security credentials 
ACCESS_TOKEN    = "...01234..."
ACCESS_SECRET   = "...i7RkW..."
CONSUMER_KEY    = "...be4Ma..."
CONSUMER_SECRET = "...btcar..."

This section can be customized according to your preference. Use your own table name and TTL value as desired:

# Global variables
dynamodb_table  = "TwitterAnalysis"
provisioned_wcu = 1

aws-blog-dynamodb-analysis's People

Contributors

hyandell avatar jpeddicord avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.