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.33.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | c6520b01905c87de00cbacf8d5ae428f1a48e1e6875923de3ecc0f544923ee7b |
|
MD5 | a6f48bd29701ebfc67b42ddd1cb91735 |
|
BLAKE2b-256 | e8597e5c5d0484f2e01765b7ee706d3d312185b393c6bbf89c1bb983a747b1b7 |
Close
Hashes for sqlalchemy_connector-0.1.33-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 07104f13fb65b843fb4a3d1b176df87b2ff990f290c38381928a8deb8a7f078f |
|
MD5 | c812d14f15c38180b03a797f4c646e99 |
|
BLAKE2b-256 | 3fd1cd18ae8346544dd40c212aaa9ebd1a84f5e8b6b72c200951986898f2f4b1 |