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.42.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 42e7fc5953067b6189fe62aeeb298d0cc00f8c990e14d0c2314191aa40993f58 |
|
MD5 | 1eb031372a9e3cdc90e2cd34801a1882 |
|
BLAKE2b-256 | 2fc343e345adefcb3c80762af5de12039ae11407b597101c71bccffe203cf4d3 |
Close
Hashes for sqlalchemy_connector-0.1.42-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8cfb2ac38b6dd9b681d680554c64d00ca69d677bc85863af0ae7de3b4180a11b |
|
MD5 | 1459a13b237c5bc0bf164bcb77cd455a |
|
BLAKE2b-256 | 877ca69e1cb6945899de059e7a9c4b65a0f200c8a2d4691c6e9143a90068a103 |