Skip to main content

Xendpal-magic: Advanced File Type Detection Library

Project description


Xendpal-magic: Advanced File Type Detection Library

Xendpal-magic is a comprehensive Python library designed to enhance file type detection through a multi-faceted approach. By combining file extensions, magic numbers, content analysis, and header parsing, Xendpal-magic offers unmatched accuracy and reliability for identifying a wide range of file formats.

Features

  • Robust File Type Detection: Utilizes magic numbers, content analysis, and header parsing for accurate file identification.
  • Customizable Detection Strategies: Tailor the detection process to prioritize speed, accuracy, or a balance of both.
  • Extensive File Format Support: Comes with a broad database of file signatures and MIME types, with the flexibility to add new ones.
  • Developer-friendly: Easy to integrate and use in any Python project requiring file handling capabilities.

Installation

Install Xendpal-magic using pip:

pip install xendpal-magic

Quick Start

from xendpal_magic import FileSignatureMatcher

# Initialize the matcher
matcher = FileSignatureMatcher()

# Determine the file type of 'example.pdf'
file_type = matcher.determine_file_type('example.pdf')
print(file_type)  # Outputs: 'application/pdf'

Advanced Usage

Custom Detection Strategy

matcher = FileSignatureMatcher(detection_method='signature', return_type='description')
file_description = matcher.determine_file_type('example.docx')
print(file_description)  # Outputs: 'Microsoft Word document'

Adding Custom File Signatures

matcher.add_custom_signature(
    extension='custom',
    hex_signatures=['00 11 22 33', '44 55 66 77'],
    description='Custom File Format',
    mime_type='application/x-custom'
)

Contributing

Contributions are welcome! Please read our Contributing Guide for details on how to submit pull requests, report issues, and suggest improvements.

License

Xendpal-magic is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • Special thanks to all contributors who have helped shape Xendpal-magic into what it is today.

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

xendpalmagic-0.0.1.tar.gz (8.9 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

xendpalmagic-0.0.1-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

Xendpalmagic-0.0.1-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

Details for the file xendpalmagic-0.0.1.tar.gz.

File metadata

  • Download URL: xendpalmagic-0.0.1.tar.gz
  • Upload date:
  • Size: 8.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.13

File hashes

Hashes for xendpalmagic-0.0.1.tar.gz
Algorithm Hash digest
SHA256 699fa3bc706486acb459cd4f522411cf9188ab0950649e7db73b690d8e875ed1
MD5 10eaa095df03f46e6f74980e184875d7
BLAKE2b-256 9e5dd56317d523f30e3b9c2c90d4ced39386d8cae1c300faec2a8470b2f68bf2

See more details on using hashes here.

File details

Details for the file xendpalmagic-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: xendpalmagic-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 7.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.13

File hashes

Hashes for xendpalmagic-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2caadfa829f9c3bbf39fc3cff9fda83a419c7f90ee6d610d545932fa76e8bb80
MD5 e7ef60050e0a037ae5ef8279b7ae74d4
BLAKE2b-256 a51dff8b15eef0c67ff7ebbea38130ca78942d2ad8a0fc3f49dd37d91394b724

See more details on using hashes here.

File details

Details for the file Xendpalmagic-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: Xendpalmagic-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 7.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.13

File hashes

Hashes for Xendpalmagic-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2e437e7b056f050af619b21fda481895b0a12227f5c3aa5846593b2a69f7fc4c
MD5 c3e230425dec3c4c852b59b9a0dc6e57
BLAKE2b-256 2ce3a91ac50b7c410ec423d878ddafaddb4811c474d2b1e6116232e6b03bcebe

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