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.32.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 10f37c8389e996dd774e31d480f5105b2895e46b8a478833ebb87859b5074187 |
|
MD5 | e5536665fbe5cc224f4dd26f749f7616 |
|
BLAKE2b-256 | 6e69e20be3263fd63a56bdc1cba229bcdf5dc3f37b8b01d033394182864c3f89 |
Close
Hashes for sqlalchemy_connector-0.1.32-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c8d40eb76b0fee676e443f2114d77721eccb14f8a9a17973caf329fa2a13c11c |
|
MD5 | e396710045d33a8e04bd9c46f7e04b15 |
|
BLAKE2b-256 | cc7490be4897897018334bc9177c49a0b89765d7620fa27f3df6aa973b6af32c |