https://github.com/aghuttun/fileshiftlib
SFTP client Python package that uses paramiko library.
https://github.com/aghuttun/fileshiftlib
file ftp paramiko sftp
Last synced: 3 months ago
JSON representation
SFTP client Python package that uses paramiko library.
- Host: GitHub
- URL: https://github.com/aghuttun/fileshiftlib
- Owner: aghuttun
- License: bsd-3-clause
- Created: 2025-05-07T13:13:31.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-12-09T10:25:16.000Z (7 months ago)
- Last Synced: 2026-03-04T23:49:44.411Z (4 months ago)
- Topics: file, ftp, paramiko, sftp
- Language: Python
- Homepage:
- Size: 33.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# fileshiftlib
- [Description](#package-description)
- [Usage](#usage)
- [Installation](#installation)
- [Docstring](#docstring)
- [License](#license)
## Package Description
SFTP client Python package that uses [paramiko](https://pypi.org/project/paramiko/) library.
## Usage
From a script:
```python
import fileshiftlib
host = "localhost"
username = "123..."
password = "xxxx"
port = 22
# Initialize SFTP client
sftp = fileshiftlib.SFTP(
host=host,
username=username,
password=password,
port=port,
logger=None
)
```
```python
sftp.reconnect()
```
```python
ftp_status = sftp.is_connected()
print(ftp_status)
```
```python
content_list = sftp.list_dir()
print(content_list)
```
```python
sftp.change_dir(path=".")
```
```python
sftp.delete_file(filename=r"demo.txt")
```
```python
sftp.download_file(
remote_path=r"/demo/demo.txt",
local_path=r"c:\local\demo.txt"
)
```
```python
sftp.upload_file(
local_path=r"c:\local\demo.txt",
remote_path=r"/demo/demo.txt"
)
```
## Installation
Install python and pip if you have not already.
Then run:
```bash
pip install pip --upgrade
```
For production:
```bash
pip install fileshiftlib
```
This will install the package and all of it's python dependencies.
If you want to install the project for development:
```bash
git clone https://github.com/aghuttun/fileshiftlib.git
cd fileshiftlib
pip install -e ".[dev]"
```
## Docstring
The script's docstrings follow the numpydoc style.
## License
BSD License (see license file)
[top](#fileshiftlib)