Skip to main content

A high level Python wrapper for remotely connecting to SQL databases and querying using pandas dataframes.

Project description

py2edw

A high level Python wrapper for remotely connecting to SQL databases and querying using pandas dataframes.

  • SQL commands can be executed using the SQL operator.
  • All queries input and outout using pandas dataframes.
  • Optional ssh tunnel connection

Connectors:

  • postgresql
  • mysql

Import:

from py2edw import postgresql, mysql

db & ssh parameter format:

db_params = {"database": <db_name>, "user": <username>, "password": <password>, "host": <host>}

ssh_params = {"ssh_ip": <ip_address>, "ssh_port": <port>, "ssh_username": <username>, "ssh_password": <password>, "remote_bind_ip": <local_ip>, "remote_bind_port": <local_port>}

Sample code:

py2edw = mysql.py2edw(db_params, ssh_params=False)

py2edw.import_DataFrame("select * from table_name")

Avaliable operators:

  • sql
  • import
  • insert
  • upsert
  • start connection
  • close connection
  • show tables

py2edw.help() for details

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

py2edw-0.0.92.tar.gz (4.9 kB view hashes)

Uploaded Source

Built Distribution

py2edw-0.0.92-py3-none-any.whl (6.3 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