Async remote file ops over SSH (scp) with robust defaults and Python bindings
Project description
async_server_ops 1.0.0 (scp-only, robust)
- Remote operations via OpenSSH scp (no rsync dependency)
- Non-interactive defaults (BatchMode, ConnectTimeout, keepalives) to prevent hangs
- Correct flags:
ssh -p,scp -P - Optional password via
sshpass -e(setpassword), but keys are recommended - Builds abi3 wheel for Python 3.8+
Build for Python (wheel/dev)
pip install -U maturin
maturin develop -F python --release
# or build wheel: maturin build -F python --release
Python usage
import asyncio
from async_server_ops import ServerManagerPy as ServerManager, PyRemoteConfig as RemoteConfig
async def main():
cfg = RemoteConfig(
host="192.168.222.61",
user="administrator",
key_path="~/.ssh/id_ed25519",
port=22,
prefer_rsync=False, # scp-only build; flag kept for API compatibility
ssh_extra_args=[
"-o","IdentitiesOnly=yes",
"-o","BatchMode=yes",
"-o","ConnectTimeout=8",
"-o","ServerAliveInterval=5","-o","ServerAliveCountMax=2",
],
# password=None, # optional: requires sshpass installed on client
)
m = ServerManager.remote(cfg)
print("preflight:", await m.preflight())
rem = "/home/administrator/FoodIpadStorage/temp/dksl_c4db8429.pdf"
await m.download_file(rem, "file.pdf")
await m.create_dir_all("/tmp/ops_demo")
await m.upload_file("file.pdf", "/tmp/ops_demo/file.pdf")
print("done")
asyncio.run(main())
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
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 async_server_ops-1.0.4-cp38-abi3-win_amd64.whl.
File metadata
- Download URL: async_server_ops-1.0.4-cp38-abi3-win_amd64.whl
- Upload date:
- Size: 63.4 kB
- Tags: CPython 3.8+, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ac95ce2eafe0a47f67198e098e7f323d4ad32e90dca5d960618094f9adf12a40
|
|
| MD5 |
3da580af6cd1c21e617ec09bc1d6f675
|
|
| BLAKE2b-256 |
f01d653c71734d968bb8bf7a84768fea0396a85c208fa34de12471dbd67b8c1f
|