<jupyter_start><jupyter_text>Import the package tweepy<jupyter_code># Import package
import tweepy<jupyter_output><empty_output><jupyter_text>Pass the parameters consumer_key and consumer_secret to the function tweepy.OAuthHandler().<jupyter_code># Store OAuth authentication credentials in relevant variables
access_token = "<KEY>"
access_token_secret = "<KEY>"
consumer_key = "nZ6EA0FxZ293SxGNg8g8aP0HM"
consumer_secret = "<KEY>"<jupyter_output><empty_output><jupyter_text>Complete the passing of OAuth credentials to the OAuth handler auth by applying to it the method set_access_token(), along with arguments access_token and access_token_secret<jupyter_code># Pass OAuth details to tweepy's OAuth handler
auth = tweepy.OAuthHandler(consumer_key, consumer_secret)
auth.set_access_token(access_token,access_token_secret)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.07502930832356389, 'fraction_numerical': 0.009378663540445486, 'mean_word_length': 10.386666666666667, 'pattern_counts': {'":': 0, '<': 16, '<?xml version=': 0, '>': 16, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '600226', 'license': 'MIT', 'n_tokens_mistral': 282, 'n_tokens_neox': 273, 'n_words': 66, 'path': 'import data in python part 2/3.1 API Authentication.ipynb', 'repo_name': 'nazmusshakib121/Importing-Cleaning-Data-with-Python', 'size': '983'}