pyTweetBot.db.obj package

Submodules

pyTweetBot.db.obj.Action module

class pyTweetBot.db.obj.Action.Action(**kwargs)

Bases: sqlalchemy.ext.declarative.api.Base

action_date
action_id
action_order
action_tweet_id
action_tweet_text
action_type
execute()

Execute the action :return:

pyTweetBot.db.obj.Base module

pyTweetBot.db.obj.Follower module

class pyTweetBot.db.obj.Follower.Follower(**kwargs)

Bases: sqlalchemy.ext.declarative.api.Base

Friend

follower_friend
follower_id
follower_last_update
friend

pyTweetBot.db.obj.Following module

class pyTweetBot.db.obj.Following.Following(**kwargs)

Bases: sqlalchemy.ext.declarative.api.Base

follower_followed_date
following_friend
following_id
following_last_update
friend

pyTweetBot.db.obj.Friend module

class pyTweetBot.db.obj.Friend.Friend(**kwargs)

Bases: sqlalchemy.ext.declarative.api.Base

Friend (follower/following) in the database

follower

Is the friend a follower? :return: True if follower, False otherwise

following

Is the friend a following :return: True if following, False otherwise

friend_contacted
friend_description
friend_follower
friend_follower_date
friend_followers_count
friend_following
friend_following_date
friend_friends_count
friend_id
friend_last_update
friend_location
friend_screen_name
friend_special
friend_statuses_count
static get_friend(name_or_id)

Get a friend by it’s screen name :param name_or_id: :return:

pyTweetBot.db.obj.ImpactStatistics module

class pyTweetBot.db.obj.ImpactStatistics.ImpactStatistic(**kwargs)

Bases: sqlalchemy.ext.declarative.api.Base

Bot’s impact statistics

static exists(week_day, hour)

Impact statistics exists? :param week_day: :param hour: :return:

impact_statistic_count
impact_statistic_hour
impact_statistic_id
impact_statistic_week_day
static update(week_day, hour, count)

Update :param week_day: :param hour: :param count: :return:

pyTweetBot.db.obj.Model module

class pyTweetBot.db.obj.Model.Model(**kwargs)

Bases: sqlalchemy.ext.declarative.api.Base

Model description

static exists(name)

Does a model exists? :param name: Model’s name :return: True or False

static get_by_name(name)

Get a model by its name :param name: Model’s name :return: Model DB object

model_id
model_last_update
model_n_classes
model_name

pyTweetBot.db.obj.ModelTokens module

class pyTweetBot.db.obj.ModelTokens.ModelToken(**kwargs)

Bases: sqlalchemy.ext.declarative.api.Base

Model’s tokens

static get_tokens(model, c=None)

Get token probs for a model :param model: Model’s name :param c: Class :return:

model
token_class
token_count
token_id
token_model
token_text
token_total

pyTweetBot.db.obj.Statistic module

class pyTweetBot.db.obj.Statistic.Statistic(**kwargs)

Bases: sqlalchemy.ext.declarative.api.Base

Bot’s statistics

statistic_date
statistic_followers_count
statistic_friends_count
statistic_id
statistic_statuses_count

pyTweetBot.db.obj.Tweeted module

class pyTweetBot.db.obj.Tweeted.Tweeted(**kwargs)

Bases: sqlalchemy.ext.declarative.api.Base

Tweet

static exists(tweet)

Tweet exists :param tweet: :return:

static insert_retweet(tweet_id, tweet_text)

Insert a new retweeted :param tweet_id: Tweet’s ID :param tweet_text: Tweet’s text

static insert_tweet(tweet_text)

Insert a new tweeted :param tweet_text: Tweet’s text :return:

tweet_date
tweet_id
tweet_tweet_id
tweet_tweet_text

Module contents