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.5.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.5-py3-none-any.whl (24.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: file_process-1.4.5.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.5.tar.gz
Algorithm Hash digest
SHA256 464700e96e6c734b919e92eb6fbbee47b2a81fe499866790e7c2fcd7c3beec1e
MD5 b44a1e83769963f3a22f815a189e88c5
BLAKE2b-256 a019a666863cb8f52518d77d0d50ae382c99026ba1803304f424eacb0bd4af5f

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: file_process-1.4.5-py3-none-any.whl
  • Upload date:
  • Size: 24.6 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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 858c70c28c0daf65b870508453e40621862c14756e034807febbef64415d093d
MD5 5a6aec1e882216c1eb57bc16156027ef
BLAKE2b-256 cc7de77a134ef8fb4ed7c7f980cb2f36482877ce82645dd3bf6c8b0822743428

See more details on using hashes here.

Provenance

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