A ConnectionFactory for use by psycopg2 to enable SSH Tunneling
Project description
PsycoSSH
A ConnectionFactory for use by psycopg2 to enable SSH Tunneling
Probably should just use create_tunneled_engine
which wraps around it
Example
from psycossh import create_tunneled_engine
from sqlalchemy import MetaData
engine = create_tunneled_engine(
ssh_user="ssh_username",
ssh_pkey=r"C:\Path\To\OpenSSH_Private_Key", # without password
ssh_host=r"ssh_server_host",
ssh_port=22, # default value
database=r"main_db",
pg_host="localhost", # default value
pg_port=5432, # default value
pg_password="pg_password"
)
meta = MetaData()
meta.reflect(bind=engine)
print(meta.tables)
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
psycossh-0.0.1.tar.gz
(2.8 kB
view details)
Built Distribution
File details
Details for the file psycossh-0.0.1.tar.gz
.
File metadata
- Download URL: psycossh-0.0.1.tar.gz
- Upload date:
- Size: 2.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.54.0 CPython/3.9.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 670cdb61c063abfa67abeeee177acb5477bd3a6ab02781a1711baa0cb0cf5dc3 |
|
MD5 | af45a83a72c9b6de2c7b42cf394ffd07 |
|
BLAKE2b-256 | 5116dfff8f5daeec21b5e017a6e4f09f01b419a66cc416d8d1db5e867c56734a |
File details
Details for the file psycossh-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: psycossh-0.0.1-py3-none-any.whl
- Upload date:
- Size: 5.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.54.0 CPython/3.9.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 69bc89c82c1dadd30132662e9bb79ba44eb8168603d8dc2595bcc56ddf9bab43 |
|
MD5 | ceb06e80bcc455fc92c89d8d1e94dcd9 |
|
BLAKE2b-256 | 581a918064cb98ba7a9213507ccb22e8727ffee6261e8dbcf7c75d67a5f515a5 |