Skip to main content

Get financial data easily.

Project description

Fidap Python Client

This Fidap client interacts with our big data servers and gives you access to Financial data analytics.

NOTE: You can get api_key from the Dashboard. Please contact ashishsingal1@gmail.com for the invite code.

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 by using this method

fidap.datasets(limit=100)

NOTE: By default, it will only 100 datasets you can increase the limit

.dataset

This method takes one argument dataset_id and returns a dict contains dataset info and related tables list

fidap.dataset(dataset_id)

.table

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

fidap.table(table_id)

.field

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

fidap.field(field_id)

.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='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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fidap-0.0.12.tar.gz (5.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fidap-0.0.12-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

Details for the file fidap-0.0.12.tar.gz.

File metadata

  • Download URL: fidap-0.0.12.tar.gz
  • Upload date:
  • Size: 5.7 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for fidap-0.0.12.tar.gz
Algorithm Hash digest
SHA256 c4db9e30b917e7379e9eb0f0150d7f9f06d955d05f7141710361dea38895ec97
MD5 e0122453c82102ae9b8dfa501a01f687
BLAKE2b-256 fed713a180f0a8676e41c714eb49701ad81e8a652784e47fe71dff1da6d71c62

See more details on using hashes here.

File details

Details for the file fidap-0.0.12-py3-none-any.whl.

File metadata

  • Download URL: fidap-0.0.12-py3-none-any.whl
  • Upload date:
  • Size: 6.0 kB
  • Tags: Python 3
  • Uploaded using 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

File hashes

Hashes for fidap-0.0.12-py3-none-any.whl
Algorithm Hash digest
SHA256 829553d4da387b8b62d7f023f21a01bc7432a805faec63f27af2356814e92e72
MD5 052096949ab277dd6130f5261cf9dd03
BLAKE2b-256 600ef7e5249871d9ab341838916bf56772fc3ea94646ff76259bd1a713b17fb6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page