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 hashes)