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

50 lines
1.6 KiB
Python

"""
This framework allows data to be logged to a given data store i.e :
- disk, cloud (google, dropbox, box, sugarsync or s3) or a queue server
The intent of the framework is to work as a standalone or embedded in code as a logging framework
usage:
dependencies :
data-transport pip install git+https://dev.the-phi.com/git/steve/data-transport.git
"""
import smart.top
import smart.folder
import smart.logger
# from transport import factory
# class logger :
# """
# This class is a basic logger, it will log data regardless of the types of data, We will have subclasses that will implement various data extraction schemas:
# - processes (top),
# """
# def __init__(self,**args):
# """
# :store data store (disk,mongo,couch,google,dropbox)
# :args arguments to pass for the data-store (read transport documentation)
# :notify function that returns true/false for notification
# """
# self.store = factory.instance(type=store,args=args['args'])
# if 'notify' in args :
# self.notify = args
# pass
# def log(self,row):
# """
# This function will log data to a data store
# :row row to be stored
# """
# self.store.write(row=row)
# if(hasattr(self,'notify')):
# if (self.notify(row)) :
# #
# # Let us notify the backend by generating a report and submitting it
# #
# stream = self.get.report()
# pass
# else:
# pass
# def report(self) :