FTP filesystem for PyFilesystem2
Project description
miarec_ftpfs
MiaRec FTPFS is a PyFilesystem interface to FTP/FTPS storage.
This a fork of the builtin FTPFS class from PyFileSystem2 project, written by Will McGugan (email willmcgugan@gmail.com).
The code was modified by MiaRec team to fullfill our needs.
Notable differences between miarec_s3fs and fs-s3fs
-
Requires Python 3.6+. A support of Python 2.7 is removed.
-
Opener protocol prefixes are
mftp://andmftps://for FTP and FTP-over-TLS respectively (instead of the originalftp://andftps://)
Installing
You can install FTPFS from pip as follows:
pip install miarec_ftpfs
This will install the most recent stable version.
Alternatively, if you want the cutting edge code, you can check out the GitHub repos at https://github.com/miarec/miarec_ftpfs
Opening a S3FS
Open an S3FS by explicitly using the constructor:
from fs.ftpfs import FTPFS
FTPFS("demo.wftpserver.com")
Or via an FS URL:
ftp_fs = fs.open_fs('mftp://test.rebex.net')
Or via an FS URL, using TLS:
ftp_fs = fs.open_fs('mftps://demo.wftpserver.com')
You can also use a non-anonymous username, and optionally a password, even within a FS URL:
ftp_fs = FTPFS("test.rebex.net", user="demo", passwd="password")
ftp_fs = fs.open_fs('mftp://demo:password@test.rebex.net')
Connecting via a proxy is supported. If using a FS URL, the proxy URL will need to be added as a URL parameter:
ftp_fs = FTPFS("ftp.ebi.ac.uk", proxy="test.rebex.net")
ftp_fs = fs.open_fs('mftp://ftp.ebi.ac.uk/?proxy=test.rebex.net')
Testing
Automated unit tests are run on GitHub Actions
To run the tests locally, do the following.
Create activate python virtual environment:
python -m vevn venv
source venv\bin\activate
Install the project and test dependencies:
pip install -e ".[test]"
Run tests:
pytest
Documentation
Project details
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 miarec_ftpfs-2024.1.1.tar.gz.
File metadata
- Download URL: miarec_ftpfs-2024.1.1.tar.gz
- Upload date:
- Size: 22.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ac3024a8bfbcee00a4641aae4a10ffec11cf3f0f8a5404d43b8cb6c32dcaf2ea
|
|
| MD5 |
ad7ebad043206b2d87faab9eb5a2c5b6
|
|
| BLAKE2b-256 |
9f5bf361a6ea861bf6493b1fa181c3765b6dc21039edb4c88a3eb401597d1ac9
|
File details
Details for the file miarec_ftpfs-2024.1.1-py2.py3-none-any.whl.
File metadata
- Download URL: miarec_ftpfs-2024.1.1-py2.py3-none-any.whl
- Upload date:
- Size: 16.7 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c63585f6a78f0c8760dd4db1263d6eea934cc69d2c6a88e3391884e000c8f899
|
|
| MD5 |
7392805a63e5a861ce689086082e736a
|
|
| BLAKE2b-256 |
b7101325e4d680b366754a83da64f50583ad606a11c496c65bd2b81ed0fa0346
|