Science Score: 23.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
○.zenodo.json file
-
○DOI references
-
○Academic publication links
-
✓Committers with academic emails
2 of 49 committers (4.1%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (13.4%) to scientific vocabulary
Keywords
Keywords from Contributors
Repository
Python's Filesystem abstraction layer
Basic Info
- Host: GitHub
- Owner: PyFilesystem
- License: mit
- Language: Python
- Default Branch: master
- Homepage: https://www.pyfilesystem.org
- Size: 1.68 MB
Statistics
- Stars: 2,058
- Watchers: 42
- Forks: 180
- Open Issues: 117
- Releases: 50
Topics
Metadata Files
README.md
PyFilesystem2
Python's Filesystem abstraction layer.
Documentation
- ~~Wiki~~ (currently offline)
- API Documentation
- GitHub Repository
- Blog
Introduction
Think of PyFilesystem's FS objects as the next logical step to
Python's file objects. In the same way that file objects abstract a
single file, FS objects abstract an entire filesystem.
Let's look at a simple piece of code as an example. The following
function uses the PyFilesystem API to count the number of non-blank
lines of Python code in a directory. It works recursively, so it will
find .py files in all sub-directories.
python
def count_python_loc(fs):
"""Count non-blank lines of Python code."""
count = 0
for path in fs.walk.files(filter=['*.py']):
with fs.open(path) as python_file:
count += sum(1 for line in python_file if line.strip())
return count
We can call count_python_loc as follows:
python
from fs import open_fs
projects_fs = open_fs('~/projects')
print(count_python_loc(projects_fs))
The line project_fs = open_fs('~/projects') opens an FS object that
maps to the projects directory in your home folder. That object is
used by count_python_loc when counting lines of code.
To count the lines of Python code in a zip file, we can make the following change:
python
projects_fs = open_fs('zip://projects.zip')
Or to count the Python lines on an FTP server:
python
projects_fs = open_fs('ftp://ftp.example.org/projects')
No changes to count_python_loc are necessary, because PyFileystem
provides a simple consistent interface to anything that resembles a
collection of files and directories. Essentially, it allows you to write
code that is independent of where and how the files are physically
stored.
Contrast that with a version that purely uses the standard library:
python
def count_py_loc(path):
count = 0
for root, dirs, files in os.walk(path):
for name in files:
if name.endswith('.py'):
with open(os.path.join(root, name), 'rt') as python_file:
count += sum(1 for line in python_file if line.strip())
return count
This version is similar to the PyFilesystem code above, but would only
work with the OS filesystem. Any other filesystem would require an
entirely different API, and you would likely have to re-implement the
directory walking functionality of os.walk.
Credits
The following developers have contributed code and their time to this projects:
See CONTRIBUTORS.md for a full list of contributors.
PyFilesystem2 owes a massive debt of gratitude to the following developers who contributed code and ideas to the original version.
- Ryan Kelly
- Andrew Scheller
- Ben Timby
Apologies if I missed anyone, feel free to prompt me if your name is missing here.
Support
If commercial support is required, please contact Will McGugan.
Owner
- Name: pyFilesystem
- Login: PyFilesystem
- Kind: organization
- Website: https://www.pyfilesystem.org
- Repositories: 7
- Profile: https://github.com/PyFilesystem
GitHub Events
Total
- Issues event: 3
- Watch event: 63
- Issue comment event: 22
- Push event: 4
- Pull request review comment event: 1
- Pull request event: 4
- Fork event: 9
- Create event: 1
Last Year
- Issues event: 3
- Watch event: 63
- Issue comment event: 22
- Push event: 4
- Pull request review comment event: 1
- Pull request event: 4
- Fork event: 9
- Create event: 1
Committers
Last synced: 6 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Will McGugan | w****n@g****m | 361 |
| Martin Larralde | m****e@e****e | 130 |
| Thomas Feldmann | m****l@t****e | 64 |
| atollk | t****s@g****m | 41 |
| Martin Larralde | m****e@e****r | 22 |
| Martin Larralde | a****s@u****m | 14 |
| Martin Larralde | m****e@e****r | 14 |
| Giampaolo Cimino | c****o@n****t | 12 |
| Oliver Galvin | o****g@r****t | 9 |
| Diego Argueta | d****a@u****m | 6 |
| Sven Schliesing | m****n@r****t | 5 |
| Geoff Jukes | g****s@u****m | 4 |
| Andrew Scheller | g****b@l****g | 3 |
| Andrey Serov | 4****w@u****m | 3 |
| Eelke van den Bos | e****s@g****m | 3 |
| Ben Lindsay | b****y@g****m | 2 |
| Kossak | t****k@u****m | 2 |
| Louis Sautier | s****s@g****m | 2 |
| Matthew Gamble | g****t@m****t | 2 |
| Philippe Ombredanne | p****e@g****m | 2 |
| Rehan Khwaja | r****n@k****e | 2 |
| Tim Gates | t****s@i****m | 2 |
| fresheed | o****s@g****m | 2 |
| sqwishy | s****y@f****a | 2 |
| Adrian Garcia Badaracco | 1****b@u****m | 1 |
| Alex Povel | 4****l@u****m | 1 |
| Andrew Scheller | l****h@d****g | 1 |
| Bernhard M. Wiedemann | g****w@l****e | 1 |
| Dafna Hirschfeld | d****3@g****m | 1 |
| Felix Yan | f****s@a****g | 1 |
| and 19 more... | ||
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 83
- Total pull requests: 47
- Average time to close issues: 6 months
- Average time to close pull requests: 4 months
- Total issue authors: 62
- Total pull request authors: 30
- Average comments per issue: 3.73
- Average comments per pull request: 3.17
- Merged pull requests: 18
- Bot issues: 0
- Bot pull requests: 1
Past Year
- Issues: 4
- Pull requests: 10
- Average time to close issues: about 24 hours
- Average time to close pull requests: 5 months
- Issue authors: 4
- Pull request authors: 5
- Average comments per issue: 2.25
- Average comments per pull request: 0.7
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 1
Top Authors
Issue Authors
- tfeldmann (7)
- ReimarBauer (3)
- kloczek (3)
- adriangb (3)
- prchristie (2)
- frafra (2)
- hrnciar (2)
- willmcgugan (2)
- djmattyg007 (2)
- dAnjou (2)
- jdonnerstag (2)
- althonos (2)
- JustASquid (2)
- dsoulis (1)
- CDU-Ge (1)
Pull Request Authors
- eli-schwartz (8)
- tfeldmann (6)
- althonos (5)
- lurch (2)
- edgarrmondragon (2)
- djmattyg007 (2)
- akeeman (2)
- jenhagg (2)
- dependabot[bot] (2)
- musicinmybrain (2)
- mweinelt (2)
- kianmeng (1)
- adriangb (1)
- arossert (1)
- benlindsay (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 6
-
Total downloads:
- pypi 6,478,585 last-month
- Total docker downloads: 19,389,451
-
Total dependent packages: 153
(may contain duplicates) -
Total dependent repositories: 1,141
(may contain duplicates) - Total versions: 165
- Total maintainers: 4
pypi.org: fs
Python's filesystem abstraction layer
- Homepage: https://github.com/PyFilesystem/pyfilesystem2
- Documentation: https://pyfilesystem2.readthedocs.io/en/latest/
- License: MIT
-
Latest release: 2.4.16
published almost 4 years ago
Rankings
Maintainers (2)
proxy.golang.org: github.com/pyfilesystem/pyfilesystem2
- Documentation: https://pkg.go.dev/github.com/pyfilesystem/pyfilesystem2#section-documentation
- License: mit
-
Latest release: v2.4.16+incompatible
published almost 4 years ago
Rankings
conda-forge.org: fs
pyfilesystem2 lets you work with diverse filesystems through a common API.
- Homepage: https://www.pyfilesystem.org/
- License: MIT
-
Latest release: 2.4.15
published almost 4 years ago
Rankings
spack.io: py-fs
Python's filesystem abstraction layer
- Homepage: https://github.com/PyFilesystem/pyfilesystem2
- License: []
-
Latest release: 2.4.14
published almost 4 years ago
Rankings
Maintainers (1)
pypi.org: fs-smb-int
fs-smb_int
- Homepage: https://github.com/PyFilesystem/pyfilesystem2
- Documentation: https://pyfilesystem2.readthedocs.io/en/latest/
- License: MIT
-
Latest release: 2.4.11
published over 6 years ago
Rankings
Maintainers (1)
anaconda.org: fs
pyfilesystem2 lets you work with diverse filesystems through a common API.
- Homepage: https://www.pyfilesystem.org/
- License: MIT
-
Latest release: 2.4.16
published almost 3 years ago
Rankings
Dependencies
- actions/checkout v2 composite
- actions/checkout v1 composite
- actions/download-artifact v2 composite
- actions/setup-python v2 composite
- actions/upload-artifact v2 composite
- pypa/gh-action-pypi-publish master composite
- rasmus-saks/release-a-changelog-action v1.0.1 composite
- AndreMiras/coveralls-python-action develop composite
- actions/checkout v1 composite
- actions/download-artifact v2 composite
- actions/setup-python v2 composite
- actions/upload-artifact v2 composite
- Sphinx *
- recommonmark *
- sphinx-rtd-theme *
- mock * test
- parameterized * test
- psutil * test
- pyftpdlib * test
- pysendfile * test