Skip to main content

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:

  1. Make your changes
  2. Change the version in setup.py
  3. Merge changes into the main branch; it will be automatically released to pypi

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

file_process-1.4.6.tar.gz (21.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

file_process-1.4.6-py3-none-any.whl (24.7 kB view details)

Uploaded Python 3

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

Hashes for file_process-1.4.6.tar.gz
Algorithm Hash digest
SHA256 cb8083bb0c372968902480a14e5642068606337b52c330add5b71ac299ca5d3b
MD5 f48234784578c18928b2af1c4074215a
BLAKE2b-256 45419e5956c210c0a7c6573868b39acadbc72670c346a5878e0bfa035262e466

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for file_process-1.4.6-py3-none-any.whl
Algorithm Hash digest
SHA256 f4893792c0b1b01e7893f5e01248c502c6156e2fec3a052447821e898881ca97
MD5 2011f5f73cbbb39f098b8d0a26d60036
BLAKE2b-256 4bea784fb4d34962793ecc5a707597ff89230c4707139628ea783e4d4cdbcdce

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page