You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
smart-top/smart/__init__.py

188 lines
5.6 KiB
Python

12 months ago
#!/usr/bin/env python
"""
Store data in a given location
"""
_path = os.sep.join([smart.info.__home__,'config.json'])
f = open (_path)
_config = json.loads(f.read())
f.close()
_store = _config['store']
if _store['provider'] in ['mongodb','mongo','couch','couchdb'] :
_store['collection'] = _table
else:
_store['table'] = _table
writer = transport.factory.instance(**_store)
writer.write(_df)
if hasattr(writer,'close') :
writer.close()
if __name__ == '__main__' :
_cli()
# # Let us notify the backend by generating a report and submitting it
# #
# stream = self.get.report()
# pass
# else:
# pass
# def report(self) :