Skip to main content

Classes for representing different file formats in Python classes for use in type hinting in data workflows

Project description

https://github.com/arcanaframework/fileformats/actions/workflows/tests.yml/badge.svg https://codecov.io/gh/arcanaframework/fileformats/branch/main/graph/badge.svg?token=UIS0OGPST7 Supported Python versions Latest Version

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

Creative Commons Attribution 4.0 International License

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

fileformats-0.3.0.tar.gz (25.0 kB view hashes)

Uploaded Source

Built Distribution

fileformats-0.3.0-py3-none-any.whl (38.2 kB view hashes)

Uploaded Python 3

Supported by

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