Python library to connect to SQLAlchemy with SSH Tunnel
Project description
py-sqlalchemy-ssh-connector
Python library to connect to SQLAlchemy with SSH Tunnel.
Where to get it
The source code is currently hosted on GitHub at: https://github.com/pualien/py-sqlalchemy-ssh-connector
Binary installers for the latest released version are available at the Python package index
pip install sqlalchemy-connector
Example 1
from alchemy_connector import SQLAlchemySession
session = SQLAlchemySession('db.example.com')
result = session.execute('''select * from ecommerce_transactions limit 1''')
session.stop()
# session.start()
Example 2
{adapter}://{username}:{password}@{host}:{port}/{database}
session = SQLAlchemySession(
host='db.example.com',
uri='mysql+pymysql://user:password@127.0.0.1:3306/db'
)
...
session.stop()
Example 3
session = SQLAlchemySession(
host='db.example.com',
user='myuser',
password='mypassword',
)
...
session.stop()
Example 4
session = SQLAlchemySession(
host='db.example.com',
port='21',
user='myuser',
key='/home/myplace/.ssh/id_rsa2',
to_port='37017',
to_host='0.0.0.0'
)
...
session.stop()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for sqlalchemy-connector-0.1.28.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | cc78ccd86b474142087cfcc19dcd711fa814d52533f304eb250e54f3390713b9 |
|
MD5 | f5d912c0b7ac4a3b1fa6e92b1c47182d |
|
BLAKE2b-256 | 21a7a91e61da708318259268d65a7ed37258d634aecb08a0d1c10b77e796afc7 |
Close
Hashes for sqlalchemy_connector-0.1.28-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2f3f4dd2b95d1b65f04d3bb30993c20886caa30bdaa213b1a224a84d8deb54a0 |
|
MD5 | d0e20bc3e82ceb174d6107655fa7dc02 |
|
BLAKE2b-256 | 722094a9b5f13daaa2c7a4eba2282e91ec6c60ef3cac1af840eb3c236192adb5 |