{ "info": { "author": "Will McGugan", "author_email": "will@willmcgugan.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: System :: Filesystems" ], "description": "# PyFilesystem2\n\nPython's Filesystem abstraction layer.\n\n[![PyPI version](https://badge.fury.io/py/fs.svg)](https://badge.fury.io/py/fs)\n[![PyPI](https://img.shields.io/pypi/pyversions/fs.svg)](https://pypi.org/project/fs/)\n[![Downloads](https://pepy.tech/badge/fs/month)](https://pepy.tech/project/fs/month)\n\n\n[![Build Status](https://travis-ci.org/PyFilesystem/pyfilesystem2.svg?branch=master)](https://travis-ci.org/PyFilesystem/pyfilesystem2)\n[![Windows Build Status](https://ci.appveyor.com/api/projects/status/github/pyfilesystem/pyfilesystem2?branch=master&svg=true)](https://ci.appveyor.com/project/willmcgugan/pyfilesystem2)\n[![Coverage Status](https://coveralls.io/repos/github/PyFilesystem/pyfilesystem2/badge.svg)](https://coveralls.io/github/PyFilesystem/pyfilesystem2)\n[![Codacy Badge](https://api.codacy.com/project/badge/Grade/30ad6445427349218425d93886ade9ee)](https://www.codacy.com/app/will-mcgugan/pyfilesystem2?utm_source=github.com&utm_medium=referral&utm_content=PyFilesystem/pyfilesystem2&utm_campaign=Badge_Grade)\n\n## Documentation\n\n- [Wiki](https://www.pyfilesystem.org)\n- [API Documentation](https://docs.pyfilesystem.org/)\n- [GitHub Repository](https://github.com/PyFilesystem/pyfilesystem2)\n- [Blog](https://www.willmcgugan.com/tag/fs/)\n\n## Introduction\n\nThink of PyFilesystem's `FS` objects as the next logical step to\nPython's `file` objects. In the same way that file objects abstract a\nsingle file, FS objects abstract an entire filesystem.\n\nLet's look at a simple piece of code as an example. The following\nfunction uses the PyFilesystem API to count the number of non-blank\nlines of Python code in a directory. It works _recursively_, so it will\nfind `.py` files in all sub-directories.\n\n```python\ndef count_python_loc(fs):\n \"\"\"Count non-blank lines of Python code.\"\"\"\n count = 0\n for path in fs.walk.files(filter=['*.py']):\n with fs.open(path) as python_file:\n count += sum(1 for line in python_file if line.strip())\n return count\n```\n\nWe can call `count_python_loc` as follows:\n\n```python\nfrom fs import open_fs\nprojects_fs = open_fs('~/projects')\nprint(count_python_loc(projects_fs))\n```\n\nThe line `project_fs = open_fs('~/projects')` opens an FS object that\nmaps to the `projects` directory in your home folder. That object is\nused by `count_python_loc` when counting lines of code.\n\nTo count the lines of Python code in a _zip file_, we can make the\nfollowing change:\n\n```python\nprojects_fs = open_fs('zip://projects.zip')\n```\n\nOr to count the Python lines on an FTP server:\n\n```python\nprojects_fs = open_fs('ftp://ftp.example.org/projects')\n```\n\nNo changes to `count_python_loc` are necessary, because PyFileystem\nprovides a simple consistent interface to anything that resembles a\ncollection of files and directories. Essentially, it allows you to write\ncode that is independent of where and how the files are physically\nstored.\n\nContrast that with a version that purely uses the standard library:\n\n```python\ndef count_py_loc(path):\n count = 0\n for root, dirs, files in os.walk(path):\n for name in files:\n if name.endswith('.py'):\n with open(os.path.join(root, name), 'rt') as python_file:\n count += sum(1 for line in python_file if line.strip())\n return count\n```\n\nThis version is similar to the PyFilesystem code above, but would only\nwork with the OS filesystem. Any other filesystem would require an\nentirely different API, and you would likely have to re-implement the\ndirectory walking functionality of `os.walk`.\n\n## Credits\n\nThe following developers have contributed code and their time to this projects:\n\n- [Will McGugan](https://github.com/willmcgugan)\n- [Martin Larralde](https://github.com/althonos)\n- [Giampaolo](https://github.com/gpcimino)\n- [Geoff Jukes](https://github.com/geoffjukes)\n\nSee CONTRIBUTORS.md for a full list of contributors.\n\nPyFilesystem2 owes a massive debt of gratitude to the following\ndevelopers who contributed code and ideas to the original version.\n\n- Ryan Kelly\n- Andrew Scheller\n- Ben Timby\n\nApologies if I missed anyone, feel free to prompt me if your name is\nmissing here.\n\n## Support\n\nIf commercial support is required, please contact [Will McGugan](mailto:willmcgugan@gmail.com).\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/PyFilesystem/pyfilesystem2", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "fs-smb-int", "package_url": "https://pypi.org/project/fs-smb-int/", "platform": "any", "project_url": "https://pypi.org/project/fs-smb-int/", "project_urls": { "Bug Reports": "https://github.com/PyFilesystem/pyfilesystem2/issues", "Documentation": "https://pyfilesystem2.readthedocs.io/en/latest/", "Homepage": "https://github.com/PyFilesystem/pyfilesystem2", "Wiki": "https://www.pyfilesystem.org/" }, "release_url": "https://pypi.org/project/fs-smb-int/2.4.11/", "requires_dist": [ "appdirs (~=1.4.3)", "pytz", "setuptools", "six (~=1.10)", "backports.os (~=0.1) ; python_version < '3.0'", "enum34 (~=1.1.6) ; python_version < '3.4'", "typing (~=3.6) ; python_version < '3.6'", "scandir (~=1.5) ; (python_version < '3.5') and extra == 'scandir_'" ], "requires_python": "", "summary": "fs-smb_int", "version": "2.4.11" }, "last_serial": 5982684, "releases": { "2.4.11": [ { "comment_text": "", "digests": { "md5": "b82edc7549dbe52c90a95da5ff30b0e0", "sha256": "a37f3f2d6552f6821ae1d18b2902d9a09a1b0ff3430e502c175d8ef05334b6f4" }, "downloads": -1, "filename": "fs_smb_int-2.4.11-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "b82edc7549dbe52c90a95da5ff30b0e0", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 134474, "upload_time": "2019-10-16T11:29:46", "url": "https://files.pythonhosted.org/packages/91/32/ca86ad17332adc1aab9272d4346205aba4acc7f608279f68f033498dff9a/fs_smb_int-2.4.11-py2.py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b82edc7549dbe52c90a95da5ff30b0e0", "sha256": "a37f3f2d6552f6821ae1d18b2902d9a09a1b0ff3430e502c175d8ef05334b6f4" }, "downloads": -1, "filename": "fs_smb_int-2.4.11-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "b82edc7549dbe52c90a95da5ff30b0e0", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 134474, "upload_time": "2019-10-16T11:29:46", "url": "https://files.pythonhosted.org/packages/91/32/ca86ad17332adc1aab9272d4346205aba4acc7f608279f68f033498dff9a/fs_smb_int-2.4.11-py2.py3-none-any.whl" } ] }