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.
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()
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
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.12.tar.gz.
File metadata
- Download URL: pymongo-ssh-0.0.12.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f64b24a823c50b068dfd383864596a4e43e5da5b4f860f299d11ec59039a3ac4
|
|
| MD5 |
7382349fd31d714acca7c68bf93e14dd
|
|
| BLAKE2b-256 |
3c3a7816bb286bfeff75f62774e4159ca5f35d5071c696c34e0ddf6d4a812a0e
|
File details
Details for the file pymongo_ssh-0.0.12-py3-none-any.whl.
File metadata
- Download URL: pymongo_ssh-0.0.12-py3-none-any.whl
- Upload date:
- Size: 4.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
45a6539d5d35991398f037e25fa065ed27390ccbdceff394c0ef85013811e21a
|
|
| MD5 |
30a50e9902955c604111c7e896fa7992
|
|
| BLAKE2b-256 |
a3eb92717aecdef81fbde2b9875bd18cbf0ed58e986f8f294f213361489f7d94
|