Hasura GDC agent based on pandas.
Project description
pandas_gdc_agent
This project explores the Hasura Graphql Data Connectors (GDC) using pandas Dataframe as backend.
To quickly get started, please go through a sample app in app.py
.
GDCAgent
The GDCAgent
constructor takes a list of tuples, where the first element
is the table name and the second element is the DataFrame
which corresponds
to the table name. To setup a GDCAgent
, run the following:
# setting up GDC Agent
agent = GDCAgent([("table1",df1),("table2", df2)])
Please note that the dataframe must have the primary key as index.
After setting up the GDCAgent
, start the GDCAgent server by running the
following:
# starting the GDC Agent
agent.run_agent()
When you run the GDCAgent
, it starts a flask server and exposes the required
endpoints explained here.
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
Built Distribution
Hashes for pandas_gdc_agent-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d4c3ecc14f44dd7d9770d1bbe7763a5ac4e7db3d377ae89641bf874d039abdee |
|
MD5 | 8e9b8666133901848774deb917e6c64a |
|
BLAKE2b-256 | 02d8b57b9f45b0a3cab0afb7a1cd482a0c03001aa0bd0c8bfdfcbbf585bf2007 |