A simple tool for developers that can perform operations on server with just a few line of codes.
Project description
server_connector
A simple tool for developers to perform operations on server with just a few line of codes.
install
pip i server_connector
Usage
Before you perform operations on server, you need to initialize a ServerConnector object
:
from server_connector import server
server_info = {
"ip": "your server ip",
"username": "xxx",
"password": "xxx"
}
sc = server.ServerConnector(server_info)
File operations
uploadFile(localPath, remotePath)
Upload a file from client to server.
sc.uploadFile("./xxx.txt", "/<directory>/xxx.txt")
Directory will be created recursively if it does not exist on server.
downloadFile(remotePath, localPath)
Download a file from server to client.
sc.downloadFile("/<directory>/xxx.txt", "./xxx.txt")
deleteFile(remotePath)
Delete a file from server.
sc.downloadFile("/path/to/your/file")
Directory operations
uploadDir(localPath, remotePath)
Upload a directory from client to server.
sc.uploadDir("./xxx", "/<directory>")
The xxx directory will be uploaded to /<directory>/xxx
on server.
downloadDir(remotePath, localPath)
Download a directory from server to client.
sc.downloadDir("/<directory>/xxx", "./")
deleteDir(remotePath)
Delete a directory from server.
sc.deleteDir("/path/to/your/directory")
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 Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Close
Hashes for server_connector-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4348a8d90313af382e6c0e06190739a28e306fdffda24d0806102ef2f872014a |
|
MD5 | 8999e4468d61966f467442d35f176ac7 |
|
BLAKE2b-256 | e7c9d93becdcb7f8c0cf5ef03e80d6d1de19751710262d07eab733ed1821d6c9 |