Skip to content

cupiddb/pycupiddb

Repository files navigation

CupidDB Python Client

Run an instance of CupidDB

docker run --rm -p 5995:5995 cupiddb/cupiddb:v1.0.0

Installation

pip install pycupiddb

Basic Usage

from pycupiddb import CupidClient, RowFilter
import pandas as pd

df = pd.DataFrame({'a': [1, 2, 3], 'b': [4, 5, 6]})

cupid = CupidClient(host='localhost', port=5995)

cupid.set(key='key', value=df)

df = cupid.get_dataframe(key='key')

filters = [
    RowFilter(column='b', logic='gte', value=5, data_type='int'),
]
df = cupid.get_dataframe(
    key='key',
    columns=['a'],
    filters=filters,
)

Releases

No releases published

Packages

No packages published

Languages