A previous release had provenance metadata, but this release does not. View details.
File System IO
| Badges | |
|---|---|
| License | |
| PyPI |
| Version | Build Status |
|---|---|
| Main |
File System IO or simply FSIO is a Python package containing useful file system operations.
Table of contents
Installation
Installing the main package is as simple as downloading from PyPI.
pip install 'fsio==$VERSION'
If you also require use of the CLI, then you can install with extras as follows.
pip install 'fsio[cli]==$VERSION'
Getting Started
This package was designed for simplifying some file system operations.
Its original design was for detecting file types of a file, but it has been expanded beyond this.
The main code lives within the core directory. Here, for example, you will see the
file_type class which supports the detect-file-type commands within the CLI.
Moreover, we can use this within Python code provided we have the object in BytesIO form.
For example, suppose we have a .parquet file without an extension and we want to establish its type,
and confirm that it really is of type parquet. To do this, we could do something as follows.
>>> from io import BytesIO
>>> from pathlib import Path
>>>
>>> from fsio.core import FileType
>>>
>>> path_to_file = Path('path/to/suspected/parquet')
>>>
>>> with path_to_file.open('rb') as f:
>>> body = BytesIO(f.read())
>>>
>>> FileType.detect_file_type(body)
'parquet'
CLI
If you optionally installed the cli subpackage, then you get extra functionality and are able to use most of the
functionality from the core package. For example, you can detect the file type of a given file using the command
fsio detect-file-type path/to/file.ext
This will return the type of the file to the stdout, for example parquet.
You can get more information about each command by using the --help flag on each command.
The CLI was designed using typer, from the creators of FastAPI.
A list of the following CLI commands which are available are below.
| Commands | |
|---|---|
fsio detect-file-type FILE |
Detect the type of FILE given as input |
fsio supported-types |
List the current supportoed file types |
Development
To contribute to this project, you can clone the repository and install the development dependencies.
This can be done using uv sync --all-extras (which uses the uv.lock file for consistency).
There is a pre-commit hook which will run on each commit to ensure that the code is formatted correctly.
To install this, we need to run
uv sync --extra test
to install pre-commit and then run pre-commit install in terminal.
We can manually run the pre-commit hooks using the command
pre-commit run --all-files
Branching
When creating a new branch, please use one of the following:
feature/*for new features (branch from and PR todevelop);bugfix/*for bug fixes (non-critical) (branch from and PR todevelop);hotfix/*for hotfixes (branch from and PR tomain, syncing todevelop); andrelease/*for releases (branch fromdevelopwith PR tomain, syncing todevelop).
The main branch is the stable deployment, and release branches are used for preparing a new release.
Metadata
Release files for fsio 1.3.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Loss of provenance
These files do not have provenance metadata, despite files in a prior release including this data.
We recommend further investigation before installing these files. View details.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| fsio-1.3.7.tar.gz | 14.9 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| fsio-1.3.7-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 22.8 kB
Release files / fsio-1.3.7.tar.gz
Loss of provenance
This file belongs to a release without provenance metadata, despite a prior release including this data.
We recommend further investigation before installing this file. View details.
| Download URL | fsio-1.3.7.tar.gz |
|---|---|
| Size | 14.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
14354d99962d5c77df795620a7bb1df8307df9037227734fed82a138a4560ef5
|
|
BLAKE2b-256 checksum How to use checksums |
e150af4bda525f02ce9953b566b2c7d3dda06fa92ec1084e139dc65174a37645
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.8.6
|
Release files / fsio-1.3.7-py3-none-any.whl
Loss of provenance
This file belongs to a release without provenance metadata, despite a prior release including this data.
We recommend further investigation before installing this file. View details.
| Download URL | fsio-1.3.7-py3-none-any.whl |
|---|---|
| Size | 7.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
be812c168f856498999e38613e36cc17707ed8b2df1c21be8ebf41ae25ed5a03
|
|
BLAKE2b-256 checksum How to use checksums |
dc4b619265137479a142ea75c0b21059cebe1a08a7ec9cd675a8a3e4edd77c95
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.8.6
|
Security for fsio 1.3.7
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Loss of provenance
A previous release of these files had provenance metadata, but this release does not.
While this could reflect a routine change by the project maintainers, it may also indicate that the release files have been compromised.
Release comparison
- Removed 1.3.1 2 files With provenance
- Added 1.3.7 2 files Without provenance
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.