Classes for representing different file formats in Python classes for use in type hinting in data workflows
Project description
Fileformats provides Python classes for representing different file formats for use in type hinting and input validation in data workflows. File formats are typically identified by a combination of file extension and “magic numbers” where applicable. However, Fileformats provides a flexible framework to write custom identification routines for exotic file formats, which require deeper inspection of header files.
Quick Installation
All sub-packages can be installed by installing the fileformats meta-package:
$ python3 -m pip fileformats
Converters
Support for converter methods between several equivalent formats can be installed by passing the ‘converters’ install extra, e.g:
$ python3 -m pip install fileformats[converters]
The converters are implemented in the Pydra dataflow framework, and can be linked into wider Pydra workflows using DesiredFormat.get_converter(OriginalFormat), or run standalone using the DesiredFormat.convert(original_file) classmethod.
License
This work is licensed under a Creative Commons Attribution 4.0 International License
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
Hashes for fileformats-0.3.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a0b4d491af57fac60dbd6ded7a8645fbba5ff91b7dec34620f88e445d02693ae |
|
MD5 | 55e8e2532ac55862131673fa6d7c7aa2 |
|
BLAKE2b-256 | 2d42d499c2661fd1629a90d085558a98cd23ca062f3073b0ce29cbbc8f4b907c |