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
File details
Details for the file sqlalchemy-connector-0.1.43.tar.gz
.
File metadata
- Download URL: sqlalchemy-connector-0.1.43.tar.gz
- Upload date:
- Size: 4.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cfed91e57d6116043b36be5ccebcb35e0b23bf801cc16897c98d000f27564b4f |
|
MD5 | e72621d2ff8f8779f7c3008bfff697a5 |
|
BLAKE2b-256 | 0e97597fb4ce3f114e3e74838e3529cd47af0dbb957fb8b46070bfa0601570a3 |
File details
Details for the file sqlalchemy_connector-0.1.43-py3-none-any.whl
.
File metadata
- Download URL: sqlalchemy_connector-0.1.43-py3-none-any.whl
- Upload date:
- Size: 5.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 53c28350d2a070490c52b59826bbeb93657b88309426508fd1273cdf272fe8ee |
|
MD5 | 2af728a9978406f632544c03085abb7a |
|
BLAKE2b-256 | 98c1b9ad5ac99fe18c5e1a731ce69e3794409507e90b6da0d0c9438ab6a843c3 |