Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose information about content type knowledge base #826

Open
reyammer opened this issue Dec 10, 2024 · 0 comments
Open

Expose information about content type knowledge base #826

reyammer opened this issue Dec 10, 2024 · 0 comments
Labels
enhancement New feature or request python Pull requests that update Python package

Comments

@reyammer
Copy link
Collaborator

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.

@reyammer reyammer added enhancement New feature or request python Pull requests that update Python package labels Dec 10, 2024
@reyammer reyammer changed the title Expose content type knowledge base information Expose information about content type knowledge base Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request python Pull requests that update Python package
Projects
None yet
Development

No branches or pull requests

1 participant