Python utilities to simplify connection with MongoDB through SSH tunnel
Project description
ssh-pymongo
Python utilities to simplify connection with MongoDB through SSH tunnel. Note: uri parameter is assumed as local, after ssh.
pip install pymongo-ssh
Example 1
from pymongo_ssh import MongoSession
session = MongoSession('db.example.com')
db = session.connection['db-name']
session.stop()
# session.start()
Example 2
session = MongoSession(
host='db.example.com',
uri='mongodb://user:password@127.0.0.1/?authSource=admin&authMechanism=SCRAM-SHA-256'
)
...
session.stop()
Example 3
session = MongoSession(
host='db.example.com',
user='myuser',
password='mypassword',
)
...
session.stop()
Example 4
session = MongoSession(
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
pymongo-ssh-0.0.2.tar.gz
(2.8 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pymongo-ssh-0.0.2.tar.gz.
File metadata
- Download URL: pymongo-ssh-0.0.2.tar.gz
- Upload date:
- Size: 2.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/51.1.2 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
393841d8a55f56a35f694f55e8e398808f8ae27a6a5fca9e7eacd337028b2066
|
|
| MD5 |
ffe18ab50ebd5787ecadf18565e94dbf
|
|
| BLAKE2b-256 |
bad73a6ef0bb7acba9f02b6c9cf71671a1d92e5280a4961ed3f830d5c1cb62e6
|
File details
Details for the file pymongo_ssh-0.0.2-py3-none-any.whl.
File metadata
- Download URL: pymongo_ssh-0.0.2-py3-none-any.whl
- Upload date:
- Size: 3.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/51.1.2 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fecd92262d7943962f8ba008c28000b0625b2d6d4d95b8a30e2f341067640ede
|
|
| MD5 |
293f4360e8aacfdef9d8dd1fa9461adc
|
|
| BLAKE2b-256 |
e21a6452ed555fe7b6eba4d4fec9e4b2f3ea217956125f5b1a937c39b55c8cab
|