ssh-pymongo
Python utilities to simplify connection with MongoDB through SSH tunnel. Note: uri parameter is assumed as local, after ssh.
Where to get it
The source code is currently hosted on GitHub at: https://github.com/pualien/pymongo-ssh
Binary installers for the latest released version are available at the Python package index
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()
Metadata
Release files for pymongo-ssh 0.0.11
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pymongo-ssh-0.0.11.tar.gz | 3.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pymongo_ssh-0.0.11-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.5 kB
Release files / pymongo-ssh-0.0.11.tar.gz
| Download URL | pymongo-ssh-0.0.11.tar.gz |
|---|---|
| Size | 3.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
015e522d74e88be8925200cd005e382e9b0b499f32cf9d53b092d73298de727e
|
|
BLAKE2b-256 checksum How to use checksums |
021bdff760f36a72db76ba42705f25b66a15819ae019649974cd3e6b1d58b1b5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.56.2 CPython/3.9.1
|
Release files / pymongo_ssh-0.0.11-py3-none-any.whl
| Download URL | pymongo_ssh-0.0.11-py3-none-any.whl |
|---|---|
| Size | 4.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2c6414809e3505d5d3d69875f52f88ea08f7ee58590a782b39b86b88dbe12380
|
|
BLAKE2b-256 checksum How to use checksums |
7cf0e6babb0d74ddb676bf05bb347b9631f11f847784c30ff54efb8c71aceee0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.56.2 CPython/3.9.1
|