Created
June 1, 2022 05:55
-
-
Save CreedsCode/b71af264aa5bf36f1f3b42962c771307 to your computer and use it in GitHub Desktop.
My Twitter jupyter template.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"cells": [ | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"# TITLE" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 1, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"%load_ext dotenv\n", | |
"%dotenv\n", | |
"\n", | |
"import tweepy\n", | |
"import os\n", | |
"\n", | |
"auth = tweepy.OAuth1UserHandler(\n", | |
" os.getenv(\"CONSUMER_API_KEY\"), \n", | |
" os.getenv(\"CONSUMER_API_SECRET\"), \n", | |
" os.getenv(\"ACCESS_TOKEN\"), \n", | |
" os.getenv(\"ACCESS_TOKEN_SECRET\")\n", | |
")\n", | |
"\n", | |
"api = tweepy.API(auth)" | |
] | |
} | |
], | |
"metadata": { | |
"interpreter": { | |
"hash": "31f2aee4e71d21fbe5cf8b01ff0e069b9275f58929596ceb00d14d90e3e16cd6" | |
}, | |
"kernelspec": { | |
"display_name": "Python 3.9.2 64-bit", | |
"language": "python", | |
"name": "python3" | |
}, | |
"language_info": { | |
"codemirror_mode": { | |
"name": "ipython", | |
"version": 3 | |
}, | |
"file_extension": ".py", | |
"mimetype": "text/x-python", | |
"name": "python", | |
"nbconvert_exporter": "python", | |
"pygments_lexer": "ipython3", | |
"version": "3.9.2" | |
}, | |
"orig_nbformat": 4 | |
}, | |
"nbformat": 4, | |
"nbformat_minor": 2 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment