---
# Xendpalmagic: Advanced File Type Detection Library
Xendpalmagic 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, Xendpalmagic 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:
```bash
pip install xendpalmagic
```
## Quick Start
```python
from xendpalmagic import FileSignatureMatcher
# Initialize the matcher
matcher = FileSignatureMatcher()
# Determine the file type of 'example.pdf'
file_type, method = matcher.determine_file_type('example.pdf')
print(file_type) # Outputs: 'application/pdf'
```
## Advanced Usage
### Custom Detection Strategy
```python
matcher = FileSignatureMatcher(detection_method='signature', return_type='description')
file_description, method = matcher.determine_file_type('example.docx')
print(file_description) # Outputs: 'Microsoft Word document'
```
### Adding Custom File Signatures
```python
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](CONTRIBUTING.md) for details on how to submit pull requests, report issues, and suggest improvements.
## License
Xendpalmagic is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
## Acknowledgments
- Special thanks to all [contributors](https://github.com/yourusername/xendpal-magic/contributors) who have helped shape Xendpal-magic into what it is today.
---
Raw data
{
"_id": null,
"home_page": null,
"name": "xendpalmagic",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": null,
"keywords": "file type detection, file signatures, MIME type, content analysis, python, file handling, file identification, magic numbers, file metadata",
"author": "joeygoesgrey",
"author_email": "<mail@godfreydjoseph@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/b5/fb/01c50ebe3b4ca0c5157601eb1f046494fd25e603d03199ef4a3eb2b00f2f/xendpalmagic-0.0.4.tar.gz",
"platform": null,
"description": "\n\n---\n\n# Xendpalmagic: Advanced File Type Detection Library\n\nXendpalmagic 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, Xendpalmagic offers unmatched accuracy and reliability for identifying a wide range of file formats.\n\n## Features\n\n- **Robust File Type Detection**: Utilizes magic numbers, content analysis, and header parsing for accurate file identification.\n- **Customizable Detection Strategies**: Tailor the detection process to prioritize speed, accuracy, or a balance of both.\n- **Extensive File Format Support**: Comes with a broad database of file signatures and MIME types, with the flexibility to add new ones.\n- **Developer-friendly**: Easy to integrate and use in any Python project requiring file handling capabilities.\n\n## Installation\n\nInstall Xendpal-magic using pip:\n\n```bash\npip install xendpalmagic\n```\n\n## Quick Start\n\n```python\nfrom xendpalmagic import FileSignatureMatcher\n\n# Initialize the matcher\nmatcher = FileSignatureMatcher()\n\n# Determine the file type of 'example.pdf'\nfile_type, method = matcher.determine_file_type('example.pdf')\nprint(file_type) # Outputs: 'application/pdf'\n\n```\n\n## Advanced Usage\n\n### Custom Detection Strategy\n\n```python\nmatcher = FileSignatureMatcher(detection_method='signature', return_type='description')\nfile_description, method = matcher.determine_file_type('example.docx')\nprint(file_description) # Outputs: 'Microsoft Word document'\n\n```\n\n### Adding Custom File Signatures\n\n```python\nmatcher.add_custom_signature(\n extension='custom',\n hex_signatures=['00 11 22 33', '44 55 66 77'],\n description='Custom File Format',\n mime_type='application/x-custom'\n)\n```\n\n## Contributing\n\nContributions are welcome! Please read our [Contributing Guide](CONTRIBUTING.md) for details on how to submit pull requests, report issues, and suggest improvements.\n\n## License\n\nXendpalmagic is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## Acknowledgments\n\n- Special thanks to all [contributors](https://github.com/yourusername/xendpal-magic/contributors) who have helped shape Xendpal-magic into what it is today.\n\n---\n\n \n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Xendpalmagic: Advanced File Type Detection Library",
"version": "0.0.4",
"project_urls": null,
"split_keywords": [
"file type detection",
" file signatures",
" mime type",
" content analysis",
" python",
" file handling",
" file identification",
" magic numbers",
" file metadata"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "95c9855b20dfcf921f2aaf28dfa2ff843673a4fdb44b2beff36537d448272bfd",
"md5": "0b5abc367c8f8757ab9bef1183bb9181",
"sha256": "1ccdd55f62064d7f8089029462af913d8f95c87b2f3c970f99064ec9e4551c7b"
},
"downloads": -1,
"filename": "xendpalmagic-0.0.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "0b5abc367c8f8757ab9bef1183bb9181",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 7608,
"upload_time": "2024-05-13T23:28:24",
"upload_time_iso_8601": "2024-05-13T23:28:24.345673Z",
"url": "https://files.pythonhosted.org/packages/95/c9/855b20dfcf921f2aaf28dfa2ff843673a4fdb44b2beff36537d448272bfd/xendpalmagic-0.0.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "b5fb01c50ebe3b4ca0c5157601eb1f046494fd25e603d03199ef4a3eb2b00f2f",
"md5": "db50b74f82e8b144aa56d142bbb1d735",
"sha256": "256876b2a68681156fbc36defcdb6c0505be43ff0a5c04dd1198e8a3fe085f56"
},
"downloads": -1,
"filename": "xendpalmagic-0.0.4.tar.gz",
"has_sig": false,
"md5_digest": "db50b74f82e8b144aa56d142bbb1d735",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 8790,
"upload_time": "2024-05-13T23:28:25",
"upload_time_iso_8601": "2024-05-13T23:28:25.420144Z",
"url": "https://files.pythonhosted.org/packages/b5/fb/01c50ebe3b4ca0c5157601eb1f046494fd25e603d03199ef4a3eb2b00f2f/xendpalmagic-0.0.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-05-13 23:28:25",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "xendpalmagic"
}