A package that does file validation and file preview.
Project description
Superbio.ai
Package that can validate and return preview for different files.
Currenty supported extensions:
- .h5ad
- .csv
- .tsv
- .txt
- .pdb
- .fasta
Usage:
pip install file_process
from file_process import preview_file
try:
processor = FileProcessFactory.get(file_data.filename, file_data.file)
except WrongExtension as exc:
raise CustomException from exc
processor.validate(model_metadata_file)
var_target_names, obs_target_names, obs_preview, var_preview, text_preview = processor.get_preview()
where:
- file: an object of io.BytesIo or FileStorage which will be validated and previewed
- filename: name of the validated file (only it's extention will be used)
- model_metadata_file (optional parameter): file with metadata of a model that will be used for validation. If this file is provided, the code will check that this file has the same set of columns as the validated file. If this file is not provided, no validation will be applied.
The code returns a list of var targets and obs targets (columns from the validated file), var preview and obs preview and text preview. If some is not applicable for the file, None will be returned).
How to release:
- Make your changes
- Change the version in setup.py
- Merge changes into the main branch; it will be automatically released to pypi
Project details
Release history Release notifications | RSS feed
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 file_process-1.4.6.tar.gz.
File metadata
- Download URL: file_process-1.4.6.tar.gz
- Upload date:
- Size: 21.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cb8083bb0c372968902480a14e5642068606337b52c330add5b71ac299ca5d3b
|
|
| MD5 |
f48234784578c18928b2af1c4074215a
|
|
| BLAKE2b-256 |
45419e5956c210c0a7c6573868b39acadbc72670c346a5878e0bfa035262e466
|
Provenance
The following attestation bundles were made for file_process-1.4.6.tar.gz:
Publisher:
deploy_to_pypi.yaml on Superbio-ai/file-process
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
file_process-1.4.6.tar.gz -
Subject digest:
cb8083bb0c372968902480a14e5642068606337b52c330add5b71ac299ca5d3b - Sigstore transparency entry: 164433878
- Sigstore integration time:
-
Permalink:
Superbio-ai/file-process@745110eee22421a325653d3c309bb32a6cdc7521 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/Superbio-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
deploy_to_pypi.yaml@745110eee22421a325653d3c309bb32a6cdc7521 -
Trigger Event:
push
-
Statement type:
File details
Details for the file file_process-1.4.6-py3-none-any.whl.
File metadata
- Download URL: file_process-1.4.6-py3-none-any.whl
- Upload date:
- Size: 24.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f4893792c0b1b01e7893f5e01248c502c6156e2fec3a052447821e898881ca97
|
|
| MD5 |
2011f5f73cbbb39f098b8d0a26d60036
|
|
| BLAKE2b-256 |
4bea784fb4d34962793ecc5a707597ff89230c4707139628ea783e4d4cdbcdce
|
Provenance
The following attestation bundles were made for file_process-1.4.6-py3-none-any.whl:
Publisher:
deploy_to_pypi.yaml on Superbio-ai/file-process
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
file_process-1.4.6-py3-none-any.whl -
Subject digest:
f4893792c0b1b01e7893f5e01248c502c6156e2fec3a052447821e898881ca97 - Sigstore transparency entry: 164433880
- Sigstore integration time:
-
Permalink:
Superbio-ai/file-process@745110eee22421a325653d3c309bb32a6cdc7521 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/Superbio-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
deploy_to_pypi.yaml@745110eee22421a325653d3c309bb32a6cdc7521 -
Trigger Event:
push
-
Statement type: