Simple shortcut for PyMongo over ssh.
Project description
ssh-pymongo
Just for convenience. Note: uri parameter is assumed as local, after ssh.
pip install ssh-pymongo
Example 1
from ssh_pymongo import MongoSession
session = MongoSession('db.example.com')
db = session.connection['db-name']
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
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ssh-pymongo-1.0.4.tar.gz
(2.2 kB
view details)
File details
Details for the file ssh-pymongo-1.0.4.tar.gz
.
File metadata
- Download URL: ssh-pymongo-1.0.4.tar.gz
- Upload date:
- Size: 2.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: Python-urllib/3.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ce6186fd012972e57cd9f10895d7aa6d4427c7fd7d452cb9a89814d6e38a0168 |
|
MD5 | 6ff529b8b7f105d3b3b087d08ba5b9e3 |
|
BLAKE2b-256 | a0f14a93705b21fa53e1fc41ab54c9325b1c6044de411d54e0f022f5c79158ea |