As an element in mongodb to put a previously created object of a class?

You need something like this:

from tweepy_bot import TwitterBot
def create_bot():
 bot_obj = Twitter()
 bots_collection = mongo.db.bots 
 new_bot = {
 'bot_name': 'bot1bot1',
 'link': bot_obj

def run_bot(bot_name):
 bots_collection = mongo.db.bots 
 founded_bot = bot_collection.found_one({'bot_name'}:bot_name):
June 3rd 19 at 19:13
1 answer
June 3rd 19 at 19:15
Or functions run bot every time to create the bot object and then initialize it with data from a database?

Find more questions by tags PythonMongoDB