This release is a pre-release and may not be stable for production use.
storage-kernel-provider-sftp
SFTP provider for Storage Kernel.
This provider maps StorageLocation.directory to a remote root directory and
StorageLocation.prefix to a namespace below that root.
Install
uv add storage-kernel-contracts storage-kernel-provider-sftp
Usage
from storage_kernel.contracts import StorageClientOptions, StorageLocation, StoragePath
from storage_kernel.provider_sftp import SftpStorageProviderOptions, create_sftp_storage_client
storage = create_sftp_storage_client(
StorageClientOptions(location=StorageLocation(directory="/upload", prefix="prod")),
SftpStorageProviderOptions(
host="sftp.example.com",
username="storage",
password="secret",
known_hosts_path="/etc/ssh/storage_known_hosts",
),
)
await storage.send_content(StoragePath("docs/readme.txt"), "Hello")
Signed URLs are not supported by SFTP and raise a normalized capability error.
Provider Options
| Option | Purpose |
|---|---|
host |
SFTP server host |
port |
SFTP server port, defaulting to 22 |
username |
Username for authentication |
password |
Password authentication or private-key passphrase companion |
private_key |
Private key content as str or bytes |
private_key_path |
Path to a private key file |
passphrase |
Private key passphrase |
known_hosts_path |
OpenSSH known_hosts verification file |
host_key_sha256 |
OpenSSH SHA256:<base64> host fingerprint |
host_verifier |
Custom host-key verification callable |
dangerously_disable_host_key_verification |
Explicit unsafe bypass |
root_directory |
Fallback root when StorageLocation.directory is absent |
public_base_url |
Enables get_public_url for externally served files |
client |
Optional caller-owned SFTP transport |
Capabilities
- full binary and text reads/writes
- remote read streams and writable upload streams
- recursive directory reads and deletes
- same-provider native copy through the transport
- password, private-key and passphrase-protected private-key authentication
- explicit known-host, fingerprint or custom host-key verification
- public URLs when
public_base_urlis configured
Exactly one host identity policy is required when the provider creates the
Paramiko transport. An injected transport owns its connection policy. Set
dangerously_disable_host_key_verification=True only for controlled
environments where host identity verification is intentionally bypassed, such
as disposable local integration servers.
When private_key is provided, invalid key content or a wrong passphrase fails
as a configuration error; the provider does not silently discard the key and
fall back to another credential source.
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 storage_kernel_provider_sftp-0.1.0a1.tar.gz.
File metadata
- Download URL: storage_kernel_provider_sftp-0.1.0a1.tar.gz
- Upload date:
- Size: 9.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
821cb8e48b53fdc7642bdae87faaf637a1f22f914121b385674653e395ff6644
|
|
| MD5 |
60fa0ce749f16717d8f17ab383c6aba4
|
|
| BLAKE2b-256 |
a7b149ac67d0bcdc535c741227c8827fe5297bcdb08e77dc35eef26968d799ec
|
File details
Details for the file storage_kernel_provider_sftp-0.1.0a1-py3-none-any.whl.
File metadata
- Download URL: storage_kernel_provider_sftp-0.1.0a1-py3-none-any.whl
- Upload date:
- Size: 13.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eb8f5655c7007f3188cee6968e389ca92974b8fbef1bfe50d0882195b337a44b
|
|
| MD5 |
41c54b5af1528349011aca6a48dc116e
|
|
| BLAKE2b-256 |
29e58ac036c94f422119a389289a0092084776bba1eb94323e4d896f308fde24
|