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.4.tar.gz (21.1 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.4-py3-none-any.whl (24.4 kB view details)

Uploaded Python 3

File details

Details for the file file_process-1.4.4.tar.gz.

File metadata

  • Download URL: file_process-1.4.4.tar.gz
  • Upload date:
  • Size: 21.1 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.4.tar.gz
Algorithm Hash digest
SHA256 d0cd97539ea62f74e7c69c1c7a5d63fb276fde5fe18eef31dd11741526b93c0b
MD5 8b85251ea2ab1e13ce7a8f983da35b2f
BLAKE2b-256 da3eb95fb652c3c7fcef1e81bb0c8c21f2e44c23b84d92d0cf3d2bb15c6928a5

See more details on using hashes here.

Provenance

The following attestation bundles were made for file_process-1.4.4.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.4-py3-none-any.whl.

File metadata

  • Download URL: file_process-1.4.4-py3-none-any.whl
  • Upload date:
  • Size: 24.4 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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 51623b16e890f799da0037bc5d99284ca4498c0d12e172f93cbd2842a288c18c
MD5 70bbed4c12bbfe4ca8ea5cccb7fcf276
BLAKE2b-256 98048a05c6622ebd0002e5c6c79e570af2ed12d512d4818c1ee345279f95c244

See more details on using hashes here.

Provenance

The following attestation bundles were made for file_process-1.4.4-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