![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
sftp_py is a Python package for transferring files between remote and local directories using the paramiko sftp client. After transfer, downloaded/uploaded files can be optionally deleted from the remote/local source directory. Only files (not directories) are transferred - there is no option to recursively transfer nested directories.
pip3 install sftp_py
git clone https://github.com/AlexOrlek/sftp_py.git
cd sftp_py
pip3 install .
sftp_py can be used within a Python script as follows:
from sftp_py.transfer import RemoteTransfer
conn = RemoteTransfer([
arguments...
])
# Establish connection and download files.
# local_path must be a directory
# remote_path can be a single file or a directory containing files to be transferred
conn = RemoteTransfer(host=host_name, username=user_name, port=22, key=private_key_path)
conn.connect()
conn.list_remote_dir(remote_path) # inspect directory contents
conn.remote_download(remote_path, local_path, copy_hidden_files=True, copy_symlink_files=True, remove=False)
# hidden files (.*) and symlink files are copied by default
# remove=True: downloaded files are removed immediately after transfer
# remove=False (default): downloaded files are recorded and can be removed later...
conn.downloaded_files # conn.downloaded_files records list of downloaded filenames
conn.remove_downloaded() # remove downloaded files
# Disconnect once finished
conn.disconnect()
# Code for uploading to a remote server is similar to code for downloading from a remote server...
conn = RemoteTransfer(host=host_name, username=user_name, port=22, key=private_key_path)
conn.connect()
conn.remote_upload(remote_path, local_path, remove=True) # upload and remove uploaded files from local_path
conn.disconnect()
FAQs
py_sftp uses sftp to transfer files from remote to local and vice-versa.
We found that sftp-py demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.