miarec-ftpfs


Namemiarec-ftpfs JSON
Version 2024.3.1 PyPI version JSON
download
home_pagehttps://github.com/miarec/miarec_ftpfs
SummaryFTP filesystem for PyFilesystem2
upload_time2024-03-11 23:00:05
maintainer
docs_urlNone
authorMiaRec
requires_python>=3.6
licenseMIT
keywords filesystem pyfilesystem2 ftp ftps
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # miarec_ftpfs

[![Actions](https://img.shields.io/github/actions/workflow/status/miarec/miarec_ftpfs/test_and_release.yml?branch=master&logo=github&style=flat-square&maxAge=300)](https://github.com/miarec/miarec_ftpfs/actions)

MiaRec FTPFS is a [PyFilesystem](https://www.pyfilesystem.org/) interface to
FTP/FTPS storage.

This a fork of the builtin FTPFS class from [PyFileSystem2](https://github.com/PyFilesystem/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_ftpfs.FTPFS and fs.FTPFS

1. Requires Python 3.6+. A support of Python 2.7 is removed.

2. Opener protocol prefixes are `mftp://` and `mftps://` for FTP and FTP-over-TLS respectively (instead of the original `ftp://` and `ftps://`)

3. Add Implicit TLS support

4. Fix bugs in Explicit TLS implementation

5. Automatically try to re-open FTP connection on the next operation in case of network issues.
  Previously, the `FTPFS` object was stuck in error state, and any operations on the file system instance, like `openbin()`, `listdir()`, etc, were failing infinitely.

6. Better error handling. All FTP protocol-specific and SSL errors are converted into corresponding `FSError` exception


## 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 FTPFS

Open an FTPFS by explicitly using the constructor:

```python
from fs.ftpfs import FTPFS
FTPFS("demo.wftpserver.com")
```

Or via an FS URL:

```python
ftp_fs = fs.open_fs('mftp://test.rebex.net')
```

Or via an FS URL, using TLS:

```python
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:

```python
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:

```python
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](https://github.com/miarec/miarec_ftpfs/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

- [PyFilesystem Wiki](https://www.pyfilesystem.org)
- [PyFilesystem Reference](https://docs.pyfilesystem.org/en/latest/reference/base.html)

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/miarec/miarec_ftpfs",
    "name": "miarec-ftpfs",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "filesystem,Pyfilesystem2,ftp,ftps",
    "author": "MiaRec",
    "author_email": "support@miarec.com",
    "download_url": "https://files.pythonhosted.org/packages/da/3f/67369b3ef7a82cea6ed70f46f46b65d6665743f646ee8863f150fb510274/miarec_ftpfs-2024.3.1.tar.gz",
    "platform": "any",
    "description": "# miarec_ftpfs\n\n[![Actions](https://img.shields.io/github/actions/workflow/status/miarec/miarec_ftpfs/test_and_release.yml?branch=master&logo=github&style=flat-square&maxAge=300)](https://github.com/miarec/miarec_ftpfs/actions)\n\nMiaRec FTPFS is a [PyFilesystem](https://www.pyfilesystem.org/) interface to\nFTP/FTPS storage.\n\nThis a fork of the builtin FTPFS class from [PyFileSystem2](https://github.com/PyFilesystem/pyfilesystem2) project, written by Will McGugan (email willmcgugan@gmail.com). \n\nThe code was modified by MiaRec team to fullfill our needs.\n\n## Notable differences between miarec_ftpfs.FTPFS and fs.FTPFS\n\n1. Requires Python 3.6+. A support of Python 2.7 is removed.\n\n2. Opener protocol prefixes are `mftp://` and `mftps://` for FTP and FTP-over-TLS respectively (instead of the original `ftp://` and `ftps://`)\n\n3. Add Implicit TLS support\n\n4. Fix bugs in Explicit TLS implementation\n\n5. Automatically try to re-open FTP connection on the next operation in case of network issues.\n  Previously, the `FTPFS` object was stuck in error state, and any operations on the file system instance, like `openbin()`, `listdir()`, etc, were failing infinitely.\n\n6. Better error handling. All FTP protocol-specific and SSL errors are converted into corresponding `FSError` exception\n\n\n## Installing\n\nYou can install FTPFS from pip as follows:\n\n```\npip install miarec_ftpfs\n```\n\nThis will install the most recent stable version.\n\nAlternatively, if you want the cutting edge code, you can check out\nthe GitHub repos at https://github.com/miarec/miarec_ftpfs\n\n## Opening a FTPFS\n\nOpen an FTPFS by explicitly using the constructor:\n\n```python\nfrom fs.ftpfs import FTPFS\nFTPFS(\"demo.wftpserver.com\")\n```\n\nOr via an FS URL:\n\n```python\nftp_fs = fs.open_fs('mftp://test.rebex.net')\n```\n\nOr via an FS URL, using TLS:\n\n```python\nftp_fs = fs.open_fs('mftps://demo.wftpserver.com')\n```\n\nYou can also use a non-anonymous username, and optionally a\npassword, even within a FS URL:\n\n```python\nftp_fs = FTPFS(\"test.rebex.net\", user=\"demo\", passwd=\"password\")\nftp_fs = fs.open_fs('mftp://demo:password@test.rebex.net')\n```\n\nConnecting via a proxy is supported. If using a FS URL, the proxy\nURL will need to be added as a URL parameter:\n\n```python\nftp_fs = FTPFS(\"ftp.ebi.ac.uk\", proxy=\"test.rebex.net\")\nftp_fs = fs.open_fs('mftp://ftp.ebi.ac.uk/?proxy=test.rebex.net')\n```\n\n## Testing\n\nAutomated unit tests are run on [GitHub Actions](https://github.com/miarec/miarec_ftpfs/actions)\n\nTo run the tests locally, do the following.\n\nCreate activate python virtual environment:\n\n    python -m vevn venv\n    source venv\\bin\\activate\n\nInstall the project and test dependencies:\n\n    pip install -e \".[test]\"\n\nRun tests:\n\n    pytest\n\n## Documentation\n\n- [PyFilesystem Wiki](https://www.pyfilesystem.org)\n- [PyFilesystem Reference](https://docs.pyfilesystem.org/en/latest/reference/base.html)\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "FTP filesystem for PyFilesystem2",
    "version": "2024.3.1",
    "project_urls": {
        "Bug Tracker": "https://github.com/miarec/miarec_ftpfs/issues",
        "Builds": "https://github.com/miarec/miarec_ftpfs/actions",
        "Homepage": "https://github.com/miarec/miarec_ftpfs"
    },
    "split_keywords": [
        "filesystem",
        "pyfilesystem2",
        "ftp",
        "ftps"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6e13a79e1df253b0a89ab7cbaecafa0d1663b3e0f9a1b62e6dea435afe72567d",
                "md5": "b7ddcfb00a8c86d710d2f53d12f7738f",
                "sha256": "ea87ccc03616033d27201c8f6056f54719667c13265bd82613739d94b887d2d5"
            },
            "downloads": -1,
            "filename": "miarec_ftpfs-2024.3.1-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b7ddcfb00a8c86d710d2f53d12f7738f",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": ">=3.6",
            "size": 17494,
            "upload_time": "2024-03-11T23:00:01",
            "upload_time_iso_8601": "2024-03-11T23:00:01.193294Z",
            "url": "https://files.pythonhosted.org/packages/6e/13/a79e1df253b0a89ab7cbaecafa0d1663b3e0f9a1b62e6dea435afe72567d/miarec_ftpfs-2024.3.1-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "da3f67369b3ef7a82cea6ed70f46f46b65d6665743f646ee8863f150fb510274",
                "md5": "c49ac402964ecc0fcbde13d998de10a2",
                "sha256": "064b7841ce7c21b6b8f90b60e5324193b17bd6830dcb97183716b4bf5cc56582"
            },
            "downloads": -1,
            "filename": "miarec_ftpfs-2024.3.1.tar.gz",
            "has_sig": false,
            "md5_digest": "c49ac402964ecc0fcbde13d998de10a2",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 24042,
            "upload_time": "2024-03-11T23:00:05",
            "upload_time_iso_8601": "2024-03-11T23:00:05.735486Z",
            "url": "https://files.pythonhosted.org/packages/da/3f/67369b3ef7a82cea6ed70f46f46b65d6665743f646ee8863f150fb510274/miarec_ftpfs-2024.3.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-11 23:00:05",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "miarec",
    "github_project": "miarec_ftpfs",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "miarec-ftpfs"
}
        
Elapsed time: 0.28606s