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.36b1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2a1de341f37bd8e76b8a3b4590e817c9dfa3298e53ea8cabadd6941e98ad54ee |
|
MD5 | f061d21feec54cafec1824b172f9c968 |
|
BLAKE2b-256 | 5b74553aa177c1c10d7d2ad52dc11b8ff1fb6187b3e94ab8cb557b74418e8f7c |
Close
Hashes for sqlalchemy_connector-0.1.36b1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a8736752c087d23604758ce2dd852f798f15e8b4bd5c7a99abdb809b16f83ca8 |
|
MD5 | 97245ec6467da4ee56414f375985bb3b |
|
BLAKE2b-256 | 6f20e5ae92153b62753c4643899cd4760e2ff7fa52d35ea5aae8b69174950e2e |