SFTP¶
Accessing a SFTP drive.
Installation¶
Use extras sftp to install all required packages.
$ pip install mara-storage[sftp]
Configuration examples¶
import mara_storage.storages
mara_storage.config.storages = lambda: {
'data': mara_storage.storages.SftpStorage(
host="<your_sftp_host>",
user="<your_login_user>",
password="<your_secure_user_password>",
# optional:
insecure = True # allow insegure SSL connections and transfers
}
import mara_storage.storages
mara_storage.config.storages = lambda: {
'data': mara_storage.storages.SftpStorage(
host="<your_sftp_host>",
user="<your_login_user>",
identity_file="~/.ssh/id_rsa", # path to your private key file
public_identity_file="~/.ssh/id_rsa.pub", # path to your public key file
# optional:
insecure = True # allow insegure SSL connections and transfers
}
API reference¶
This section contains database specific API in the module.
Configuration¶
- class mara_storage.storages.SftpStorage(host: str, port: Optional[int] = None, user: Optional[str] = None, password: Optional[str] = None, insecure: bool = False, identity_file: Optional[str] = None, public_identity_file: Optional[str] = None)¶
- __init__(host: str, port: Optional[int] = None, user: Optional[str] = None, password: Optional[str] = None, insecure: bool = False, identity_file: Optional[str] = None, public_identity_file: Optional[str] = None)¶
Connection information for a SFTP server
- Parameters
host – host name
port – tcp port
user – username
password – password
insecure – if True, the known_hosts file will not be checked
identity_file – path to a private key file to be used for private/public key authentication
public_identity_file – path to a public key file to be used for private/public key authentication