How to use the pixiedust.utils.storage.Storage function in pixiedust

To help you get started, we’ve selected a few pixiedust examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github pixiedust / pixiegateway / pixiegateway / chartsManager.py View on Github external
pass
    @abstractmethod
    def get_chart(self, chart_id):
        "returns chart model"
        pass
    @abstractmethod
    def delete_chart(self, chart_id):
        pass
    @abstractmethod
    def list_charts(self):
        pass
    @abstractmethod
    def get_charts(self, page_num=0, page_size=10):
        pass

class SQLLiteChartStorage(ChartStorage, Storage):
    "Chart storage class for SQLLite PixieDust DB (default)"
    CHARTS_TBL_NAME="CHARTS"
    def __init__(self):
        self._initTable( SQLLiteChartStorage.CHARTS_TBL_NAME,
        '''
            CHARTID        TEXT  NOT NULL PRIMARY KEY,
            AUTHOR         TEXT  NOT NULL,
            DATE           DATETIME  NOT NULL,
            DESCRIPTION    TEXT,
            CONTENT        BLOB,
            RENDERERID     TEXT,
            THUMBNAIL      BLOB
        ''')

    def store_chart(self, payload):
        chart_id = str(uuid.uuid4())