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.34.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | e16acf7be536af46868f3726fa80fe0ab78b8a98b3a41a96ce4d5e0c0c5902e7 |
|
MD5 | d69a20176265cf8f53f3f5b1c34f25e5 |
|
BLAKE2b-256 | f9c99db371a40678dc49f86aa61cbfe08af40b49d2b3db44a3dea35a54dd2458 |
Close
Hashes for sqlalchemy_connector-0.1.34-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3213795010ce9167137c71af0074b47f25a52f60baa77a807982cda6368ae21a |
|
MD5 | db9abe434ad59874464cff2cf89e4e35 |
|
BLAKE2b-256 | 3172bb2e5a65b953049bc335cc5b1a3806c63e16b6b4a0450b0ea64965217868 |