Skip to content

A End to End no-code Twitter Bot Api built on top of tweepy and fastapi

License

Notifications You must be signed in to change notification settings

unownone/Tweety.py

Repository files navigation

Tweety.py

A End to End no-code Twitter Bot Api

Ever wanted to automate marketing with twitter? Well, now you can!

Using Tweety.py's Fast API Now you can do that and much more !

Demo

Tweety.Py

Features Currently:

  • comment on tweets with a specific hashtag/ keyword
  • comment on tweets for free!
  • comment on tweets that match a certain sentiment [Coming soon]
  • comment on tweets that match a certain location [Coming soon]
  • comment on tweets that match a certain language [Coming soon]
  • Run campaigns on twitter that are scheduled! [Coming soon]

API ENDPOINTS:

Want Better Documentation ?
Use FastAPI's Swagger UI :docs

/auth : Signup/Login to the tweety.py

/signup : [POST]
    body: {
        "name":"",
        "email": "",
        "password": ""
    }
/login : [POST]
    body: {
        "email": "",
        "password": ""
    }
    returns : {
        "access_token":"",
        "refresh_token":""
    }
/user : [GET] Get current user

/bot : Use the Bot

/twitter: [GET] Connect twitter account to tweetypy account.

returns : Twitter URL to connect to
/twitter-callback-url: [GET] Twitter Callback url to finish Oauth `DANCE`.

/commentbot: [POST] Comment Bot to comment on posts
body: {
    {
    "tags": [
        "string"  // stores hashtags and keywords
    ],
    "scripts": [
        "string" // stores list of strings to
                //be sent as comment randomly
    ],
    "nums": 0   // count of comments to be sent in total.
    }
}

Running on Local / forking.

  • clone the repo

  • cd into the folder

  • first create a virtualenv and activate it. example :

      virtualenv venv
    

    then activate it

      ./venv/bin/activate
    
  • Install requirements.

      pip install -r requirements.txt
    
  • run server using:

      uvicorn app:app --reload --port 8000
    

Your App will be running on LocalHost.

ENV DETAILS :

have a .env file in root that will contain these values:

  • CONSUMER_KEY : twitter Consumer Key
  • CONSUMER_SECRET : twitter Consumer Secret
  • JWT_SECRET : For jwt token generation
  • MONGO_DB : Mongo database name
  • MONGO_HOST : Mongo host name
  • MONGO_PORT : Mongo port number
  • MONGO_USER : Mongo user name
  • MONGO_PASSWORD : Mongo password

Built using FastAPI , MongoDB , Heroku

About

A End to End no-code Twitter Bot Api built on top of tweepy and fastapi

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published