Post twitter using python script

$ pip install --upgrade pip
$ pip install tweepy
import tweepy

def get_api(cfg):
    auth = tweepy.OAuthHandler(cfg['consumer_key'], cfg['consumer_secret'])
    auth.set_access_token(cfg['access_token'], cfg['access_token_secret'])
    return tweepy.API(auth)

def main():
    cfg = {
        "consumer_key"        : "xxxxx",
        "consumer_secret"     : "xxxxx",
        "access_token"        : "xxxxx",
        "access_token_secret" : "xxxxx"
    }

    api = get_api(cfg)
    tweet = "my status here"
    status = api.update_status(status=tweet)

if __name__ == "__main__":
    main()