Skip to content

Instantly share code, notes, and snippets.

@CreedsCode
Created June 1, 2022 05:55
Show Gist options
  • Save CreedsCode/b71af264aa5bf36f1f3b42962c771307 to your computer and use it in GitHub Desktop.
Save CreedsCode/b71af264aa5bf36f1f3b42962c771307 to your computer and use it in GitHub Desktop.

Revisions

  1. CreedsCode created this gist Jun 1, 2022.
    58 changes: 58 additions & 0 deletions twitter_template.ipynb
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,58 @@
    {
    "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
    }