Skip to main content

Fidap Python Client

This Fidap client connect to our big data warehouses and gives you seamless access to external data.

NOTE: Fidap is currently invite only and requires an api_key to work.

Installation

pip install fidap

Getting Started

from fidap import fidap_client
client = fidap_client(api_key="Paste API_KEY here from fidap dashboard")

you can also provide the database during initializing the client

from fidap import fidap_client
client = fidap_client(source='bq', api_key="Paste API_KEY here from fidap dashboard")

API

.sql

You can run your queries by using this method, it will return a Pandas dataframe containing the results of the query. Result would be None if something goes wrong i.e. incorrect query / not a valid API key.

from fidap import fidap_client
client = fidap_client(api_key="Paste API_KEY here from fidap dashboard")
df = client.sql(sql="paste your QUERY")

NOTE: You can also change the database at this level!

df = client.sql(sql="paste your QUERY", source="sf_gcp")

.send_email

You can send yourself or someone you know the Pandas dataframe as a csv attachment by using this method.

from fidap import fidap_client
client = fidap_client(api_key="Paste API_KEY here from fidap dashboard")
df = client.sql(sql="paste your QUERY")
success = client.send_email(df=df, emails=[]) #'List of Emails')

NOTE: By default, it will share the file containing 1000 rows and 30 columns only

.create_dataset

You can create dataset using this method and it can be seen on Dashboard

fidap.create_dataset(
        name='xxx', 
        description='xxxx', 
        source='bq', project='xxxx', 
        dataset='xxxx', 
        public=False
   )

.datasets

You can list dataset in json format or pandas dataframe by using this method

fidap.datasets(limit=100, json=True)

NOTE: By default, it will return only pandas dataframe of 100 datasets, you can increase the limit and change the output format.

.dataset

This method takes two arguments dataset_id and returns a dict of dataframes contains dataset info and its table.

fidap.dataset(dataset_id, json=False)

NOTE: By default json=False, when json=True it will return json.

.table

This method takes one argument table_id and returns a dict of dataframes contains table info and its fields list

fidap.table(table_id, json=False)

NOTE: By default json=False, when json=True it will return json.

.field

This method takes one argument field_id and returns pandas dataframe contains info about table field.

fidap.field(field_id, json=False)

NOTE: By default json=False, when json=True it will return json.

.update_dataset

This method takes 2 arguments 1st dataset_id 2nd dict of values

fidap.update_dataset(dataset_id=xxx, values=dict(description, name, is_public, additional_data=JSON))

.update_table

This method takes 2 arguments 1st table_id 2nd dict of values

fidap.update_table(table_id=xxx, values=dict(description, display_name, is_public, additional_data=JSON))

.update_field

This method takes 2 arguments 1st field_id 2nd dict of values

fidap.update_field(field_id=xxx, values=dict(description, display_name, additional_data=JSON))

.update_entity

This method takes 3 arguments entity name (dataset, table, field) and 2nd argument is entity's id and 3rd argument is dict, which attribute you want to update.

fidap.update_entity(
      entity='dataset', 
      id=xxx, 
      values=dict(description="This dataset is very fascinating, fidap datasets are awesome")
    )

.load_table_as_dataframe

Load table via delta share, df_type can be 'pandas' or 'spark'

fidap.load_table_as_dataframe(
      share_name='xxx',
      schema_name='xxx',
      table_name='xxx',
      df_type=pandas
    )

Contributing

git clone https://github.com/fidapco/fidap-python-client.git
cd fidap-python-client
pip install --editable .

Change log

[0.0.1] - 2021-01-04

Initial version.

Added

  • fidap.sql() runs a query on the Fidap DB.

Changed

Removed

Metadata

Release files for fidap 0.0.16

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fidap 0.0.16
File Size Uploaded
fidap-0.0.16.tar.gz 6.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for fidap 0.0.16
File Interpreter ABI Platform
fidap-0.0.16-py3-none-any.whl Python 3 none any Details

Total release size: 12.4 kB

Release files / fidap-0.0.16.tar.gz

Download URL fidap-0.0.16.tar.gz
Size 6.0 kB
Tags Source
SHA-256 checksum
How to use checksums
92b9bda2490aa3229a719bc0a2ee6608e16d3fd15b97bcf6a66c6622f88dc644
BLAKE2b-256 checksum
How to use checksums
cb8cce1713b6854eb25fa0f3d49b12866eadf9adc608223fc6605c480e3abe0f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.9.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.3

Release files / fidap-0.0.16-py3-none-any.whl

Download URL fidap-0.0.16-py3-none-any.whl
Size 6.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fa85209a324112e210b6cf76b6c9efb22dfcdd093490d79a861c9b9d31c77071
BLAKE2b-256 checksum
How to use checksums
7f0a0c23b515c5faef3a510378185db1580db0dc4e8e0feecb810830d71ce2ac
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.9.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.3

Release history Release notifications | RSS feed

This release

0.0.16 This release

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page