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.38b1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | f692d697ed13231c1275207d11d6d390530ac186cb0384bb650ceaf2af4f10c1 |
|
MD5 | f39b088552674575f51b2046d7b95f1f |
|
BLAKE2b-256 | 2c71aa55b2af2d0e93f4310fdfecafca1931b9655529a506eb9f98a0e1c91bbf |
Close
Hashes for sqlalchemy_connector-0.1.38b1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8468597b061f11c4e2825d9d199774ab7d766058df624b580508e385a8227c7e |
|
MD5 | f40c368814d8b893814b51c4de1b36eb |
|
BLAKE2b-256 | 3e766651f67eea17b63414daa12c0ecd5421569607d5de3049ffc6d90813295e |