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.40.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | e30bd9cca11afcda9dc40ed6a3fb559f8f93712229ac12df204328d9d66a4cca |
|
MD5 | d8ee36f43d36b22944743c4007c86bee |
|
BLAKE2b-256 | 677d12f45b59963958aadd742584f8e8aeff56eb2dd3767b6cd72f59c5de24d1 |
Close
Hashes for sqlalchemy_connector-0.1.40-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 424943edc6448262cc4a910aab3462c41edb5543a2dc65f03ff555d634b730e6 |
|
MD5 | 4fa4dc65dbabd152df59085de515e8ff |
|
BLAKE2b-256 | 99c5b677132b32caf085e17bd25cdffd8f4dd50ec0d58c506b77f2228ac83f36 |