https://github.com/pualien/py-sqlalchemy-ssh-connector
Python library to connect to SQLAlchemy with SSH Tunnel
https://github.com/pualien/py-sqlalchemy-ssh-connector
Last synced: 3 months ago
JSON representation
Python library to connect to SQLAlchemy with SSH Tunnel
- Host: GitHub
- URL: https://github.com/pualien/py-sqlalchemy-ssh-connector
- Owner: pualien
- Created: 2020-01-30T07:50:35.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-11-15T11:29:06.000Z (over 1 year ago)
- Last Synced: 2025-02-09T12:46:49.112Z (4 months ago)
- Language: Python
- Size: 3.99 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README

# py-sqlalchemy-ssh-connector
[](https://pypi.org/project/sqlalchemy-connector/)
[](https://github.com/pualien/py-sqlalchemy-ssh-connector/actions)
[](https://pypi.org/project/sqlalchemy-connector/))
[](https://pypi.org/project/sqlalchemy-connector/))Python library to connect to SQLAlchemy with SSH Tunnel.
## Where to get it
The source code is currently hosted on GitHub at:
Binary installers for the latest released version are available at the
[Python package index](https://pypi.org/project/sqlalchemy-connector/)```sh
pip install sqlalchemy-connector
```### Example 1
```python
from alchemy_connector import SQLAlchemySessionsession = 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}
```python
session = SQLAlchemySession(
host='db.example.com',
uri='mysql+pymysql://user:[email protected]:3306/db'
)
...
session.stop()
```### Example 3
```python
session = SQLAlchemySession(
host='db.example.com',
user='myuser',
password='mypassword',
)
...
session.stop()
```### Example 4
```python
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()
```