Skip to content

Expose information about content type knowledge base #826

Open
@reyammer

Description

@reyammer

In a previous version of the magika python package (e.g., 0.5.1), we had a ContentTypesManager class that was wrapping the knowledge about content types and their metadata (e.g., mime types). This class was never meant to be used by external clients (nor it was documented). In the new version, this class has been refactored away, now content type labels are actual enums, and we track their metadata via a private field in the Magika object.

That being said, the content types knowledge base could be of some use to external clients. It may be worth exploring a clean way to expose this information.

One idea is to add a couple of methods to the Magika object to list all content types (all in our content types KB, or all supported by a given model) and one method to access the metadata (e.g., mime type) for a given content type.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestpythonPull requests that update Python package

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions