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

Uploaded Python 3

File details

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

File metadata

  • Download URL: file_process-1.4.3.tar.gz
  • Upload date:
  • Size: 21.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for file_process-1.4.3.tar.gz
Algorithm Hash digest
SHA256 c13ed1a9769eff15884f0e5e6840b039f7bf8231d11d1a8520defb89de78d05e
MD5 00a0032c1289ab176d0cf0d2d0049beb
BLAKE2b-256 c96d6dfa11af02066b99a161260dd16c19b8f9503947d4c4ee6e9c013aba2078

See more details on using hashes here.

File details

Details for the file file_process-1.4.3-py3-none-any.whl.

File metadata

  • Download URL: file_process-1.4.3-py3-none-any.whl
  • Upload date:
  • Size: 24.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for file_process-1.4.3-py3-none-any.whl
Algorithm Hash digest
SHA256 b14d81fae046b231780b9ca580aad99768d18522a7b6d9fa74026b36b77420ec
MD5 5e5c939f624afd2f48fd0760e9542aa6
BLAKE2b-256 e21a635f89777e5d7d84d9b597c7202d6bc41f439e87d57109aab10dd881582b

See more details on using hashes here.

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