texta-parsers
A Python package for file parsing.
The main class in the package is DocParser. The package also supports sophisticated parsing of emails which is implemented in class EmailParser. If you only need to parse emails then you can specify it with parameter parse_only_extensions. It is possible to use EmailParser independently as well but then attachments will not be parsed.
Requirements
NB! Starting from version 3.0.0, only Elasticsearch 8 clusters are supported.
Most of the file types are parsed with tika. Other tools that are required:
| Tool | File Type |
|---|---|
| pst-utils | .pst |
| digidoc-tool | .ddoc .bdoc .asics .asice |
| rar-nonfree | .rar |
| lxml | XML HTML |
Installation of required packages on Ubuntu/Debian:
sudo apt-get install pst-utils rar python3-lxml cmake build-essential -y
sudo sh install-digidoc.sh
Requires our custom version of Apache TIKA with relevant Tesseract language packs installed:
sudo docker run -p 9998:9998 docker.texta.ee/texta/texta-parsers-python/tikaserver:latest
Installation
Base install (without MLP & Face Analyzer):
pip install texta-parsers
Install with MLP:
pip install texta-parsers[mlp]
Install with whole bundle:
pip install texta-parsers[mlp]
Testing
python -m pytest -rx -v tests
Description
DocParser
A file parser. Input can either be in bytes or a path to the file as a string. See user guide more information. DocParser also includes EmailParser.
EmailParser
For parsing email messages and mailboxes. Supported file formats are Outlook Data File (.pst), mbox (.mbox) and EML (.eml). Can be used separately from DocParser but then attachments are not parsed. User guide can be found here and documentation here.
Metadata
Release files for texta-parsers 3.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| texta-parsers-3.0.0.tar.gz | 34.4 kB | Without provenance | Details for texta-parsers-3.0.0.tar.gz |
Release files / texta-parsers-3.0.0.tar.gz
| Download URL | texta-parsers-3.0.0.tar.gz |
|---|---|
| Size | 34.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
01a5f0705f04117743a68ae3ccf8f21c86a7459676c6ae2339f9dc5568e5bbea
|
|
BLAKE2b-256 checksum How to use checksums |
bd8e2e50f416119fbec1196503d727b80663736b55e3b8aff2032db3cc243bb9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.11.5
|
Security for texta-parsers 3.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.