Hopara Python Library
Project description
Pyhopara
Pyhopara is the Hopara Python SDK. It's main purpose is to ingest data when using Hopara internal database.
Install
pip install hopara
Before using Pyhopara you should setup your environment. This is achieved by installing the Hopara CLI and sign-in or sign-up:
npm install -g hopara
hopara signup
Basic usage:
import hopara as hp
table = hp.Table('table_name')
table.add_column('column1', hp.ColumnType.INTEGER)
table.add_column('column2', hp.ColumnType.STRING)
hopara = hp.Hopara('your-organization.com')
hopara.create_table(table)
rows = [{'column1': 1, 'column2': 'a'},
{'column1': 2, 'column2': 'b'},
{'column1': 3, 'column2': 'c'}]
hopara.insert_rows(table, rows)
With pandas DataFrame:
import hopara as hp
import hopara.from_pandas as hpd
import pandas as pd
df = pd.DataFrame({
'column1': [1, 2, 3],
'column2': ['a', 'b', 'c']
})
table = hpd.get_table('table_name', df)
hopara = hp.Hopara('your-organization.com')
hopara.create_table(table)
hopara.insert_rows(table, hpd.get_rows(df))
Please check the Hopara
and Table
sections for additional options.
Complete documentation: https://docs.hopara.app/docs/pyhopara.html
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
hopara-1.1.1.tar.gz
(7.1 kB
view hashes)
Built Distribution
hopara-1.1.1-py3-none-any.whl
(8.2 kB
view hashes)