Skip to main content

This is an idea to further simplify the process of fetching/storing data into structured databases using pandas

Project description

sqlDataframe

SQL To Pandas is a tool you can use to connect with your database, somme of the basic Functionalities are:

  • Can convert your database table into pandas dataframe
  • You can insert a pandas dataframe as a new table into your database

Usage pattern is different for both linux and windows.

Linux

Quickstart

Installing dependencies first:

$ import pandas as pd
$ from sqlDataframe import sqlCred, read_sql, to_sql

Establishing connection and importing data from mssql server into Pandas dataframe:

$ creds = sqlCred(database='database_name', username='username', password='pass', OS='Linux')
$ dataframe = read_sql(creds,'table_name')

Establishing connection and importing data Pandas dataframe into mssql server:

$ creds = to_sql(database='database_name', username='username', password='pass', OS='Linux')
$ to_sql(creds, dataframe, 'table_name')

Once connection is establised, you can use creds for both read_sql and to_sql.

Windows

Quickstart

Installing dependencies first:

$ import pandas as pd
$ from sqltopandas import sqlCred, to_sql, read_sql

Establishing connection and importing data from mssql server into Pandas dataframe:

$ creds = sqlCred('database='database_name', server='server_name', OS='Windows')
$ dataframe = read_sql(creds,'table_name')

Establishing connection and importing data Pandas dataframe into mssql server:

$ creds = sqlCred('database='database_name', server='server_name', OS='Windows')
$ to_sql(creds, dataframe, 'table_name')

Once connection is establised, you can use creds for both read_sql and to_sql. Note: This is only accessible using Microsoft Sql Server windows authentication.

Upcommings

Its a start of our journey and every journey begins with some simple steps. So we have enlisted some more features to be the part of sqltopandas in future updates.

  • Integration with multiple database platforms
  • Load specific data into dataframe from databasse by using custom queries
  • Server name will automatically be fetched from the system (Windows only)
  • Will provide access through sql server authentication (windows only)

Limitations

Yes we do have some limitations and we are working over it:

  • Support with sql server authentication is not available right now (windows only)
  • Only SELECT and INSERT querrying is working at the backend.
  • User's custom queries will be entetained.
  • Sql server instance name have to be provided as a parameter to build connection, in future we will fetch it by ourself.

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

sqlDataframe-1.0.tar.gz (4.0 kB view details)

Uploaded Source

File details

Details for the file sqlDataframe-1.0.tar.gz.

File metadata

  • Download URL: sqlDataframe-1.0.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.44.0 CPython/3.6.9

File hashes

Hashes for sqlDataframe-1.0.tar.gz
Algorithm Hash digest
SHA256 e70d25de990d8a3dd3a69fc7407a62c7cc4e6f8d747873ffe3a8e47763c1d315
MD5 0693b675febe555d6ec58f74d13d80b1
BLAKE2b-256 b2dc551f0854f768f880c81d8a1cfd515bd5b20627b1d8f8dfa75646dec5291a

See more details on using hashes here.

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