Skip to main content

Python library to connect to SQLAlchemy with SSH Tunnel

Project description

sqlalchemy-connector

py-sqlalchemy-ssh-connector

PyPI Latest Release PyPI Build PyPI - Downloads) PyPI - Python Version)

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sqlalchemy-connector-0.1.38b1.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sqlalchemy_connector-0.1.38b1-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file sqlalchemy-connector-0.1.38b1.tar.gz.

File metadata

  • Download URL: sqlalchemy-connector-0.1.38b1.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for sqlalchemy-connector-0.1.38b1.tar.gz
Algorithm Hash digest
SHA256 f692d697ed13231c1275207d11d6d390530ac186cb0384bb650ceaf2af4f10c1
MD5 f39b088552674575f51b2046d7b95f1f
BLAKE2b-256 2c71aa55b2af2d0e93f4310fdfecafca1931b9655529a506eb9f98a0e1c91bbf

See more details on using hashes here.

File details

Details for the file sqlalchemy_connector-0.1.38b1-py3-none-any.whl.

File metadata

File hashes

Hashes for sqlalchemy_connector-0.1.38b1-py3-none-any.whl
Algorithm Hash digest
SHA256 8468597b061f11c4e2825d9d199774ab7d766058df624b580508e385a8227c7e
MD5 f40c368814d8b893814b51c4de1b36eb
BLAKE2b-256 3e766651f67eea17b63414daa12c0ecd5421569607d5de3049ffc6d90813295e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page