Skip to main content

REFRACT-IO: To read and write dataframe from different connectors.

Project description

Installation:

without any dependencies:

pip install refractio

With all dependencies:

pip install refractio[all]

With snowflake:

pip install refractio[snowflake]

With s3:

pip install refractio[s3]

With azureblob:

pip install refractio[azureblob]

With local:

pip install refractio[local]

With sftp:

pip install refractio[sftp]

With mysql:

pip install refractio[mysql]

With hive:

pip install refractio[hive]

Source code is available at: https://git.lti-aiq.in/refract-sdk/refract-sdk.git

Usage:

To read dataframe with dataset name only -

from refractio import get_dataframe
get_dataframe("dataset_name")

To read dataframe with filename from local storage -

from refracio import get_local_dataframe
get_local_dataframe("local_file_name_with_absolute_path")

To use snowflake related operations -

from refractio import snowflake

# To read a specific dataset published from snowflake connection
snowflake.get_dataframe("dataset_name", row_count=3)

# To get snowflake connection object with a specific connection name
snowflake.get_connection(connection_name="snowflake_con_name")

# To get snowflake connection object with default snowflake connection created by the user
snowflake.get_connection()

# To execute a user specific query in snowflake
snowflake.execute_query(query="user_query", database="db_name", schema="schema", connection_name="connection_name")

Note: Usage documentation will be updated in upcoming releases.

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

refractio-2.0.0.tar.gz (8.4 kB view hashes)

Uploaded Source

Built Distribution

refractio-2.0.0-py3-none-any.whl (11.9 kB view hashes)

Uploaded Python 3

Supported by

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