Welcome to autotweet’s documentation!

Contents:

autotweet — Library for machine learning your tweet

autotweet.command — CLI interface

This module provides command line interface.

autotweet.database — Database structure

This module provides methods to get session, get answer, etc.

class autotweet.database.Base(**kwargs)

The most base type

autotweet.database.get_session(url)

Get db session.

Parameters:url (str) – URL for connect with DB
Returns:A sqlalchemy db session
Return type:sqlalchemy.orm.Session

autotweet.twitter — Twitter utilities

This module contains Twitter API key and some useful methods.

autotweet.twitter.CONSUMER_KEY = u'62yWrV2RhpGgWOKlqvJPNQ'

Consumer key for autoweet.

autotweet.twitter.CONSUMER_SECRET = u'Je6NLI7AN3c1BJP9kHaq1p8GBkMyKs5GhX954dWJ6I'

Consumer secret key for autotweet.

autotweet.twitter.authorize()

Authorize to twitter.

Use PIN authentification.

Returns:Token for authentificate with Twitter.
Return type:autotweet.twitter.OAuthToken
autotweet.twitter.strip_tweet(text, remove_url=True)

Strip tweet message.

This method removes mentions strings and urls(optional).

Parameters:
  • text (str) – tweet message
  • remove_url (boolean) – Remove urls. default True.
Returns:

Striped tweet message

Return type:

str

Indices and tables