Answer the question
In order to leave comments, you need to log in
How to shove a previously created class object into a mongodb element?
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
}
bots_collection.insert(new_bot)
def run_bot(bot_name):
bots_collection = mongo.db.bots
founded_bot = bot_collection.found_one({'bot_name'}:bot_name):
founded_bot['link'].run()
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question