xdwarf
Mining XML to tabular data, FAAAAAAST
Install
pip install xdwarf
The library is an wrapping on rust_dwarf, a rust based mining tool.
Mining
# finding in glob pattern, project name, use all - 2 CPUs
dwarf = Dwarf.from_glob("../test/data/*.xml", "PMC",-2)
Define the mining detail as xpath query pattern, chaining multistage mining is well supported.
dwarf.find_one('article-meta > article-id[pub-id-type=pmid]' , "pmid")
dwarf.find_one("abstract", "abstract").find_many("p", "paragraph")
# mining stage can be chained to longer detials
reference = dwarf.find_one("ref-list", "ref_list").find_many("ref","reference")
reference.find_one("pub-id[pub-id-type=pmid]", "ref_id")
reference.find_one("pub-id[pub-id-type=doi]", "doi")
ref_name = reference.find_many("name", "ref_name")
ref_name.find_one("surname", "ref_surname")
dwarf.set_necessary("pmid")
dwarf.create_children()
Mining start
result = dwarf()
See result
result.child_df().head(2)
See child result
result['ref_list'].child_df().head()
Metadata
Release files for xdwarf 0.1.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 |
|---|---|---|---|---|
| xdwarf-0.1.0.tar.gz | 4.8 kB | Without provenance | Details for xdwarf-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| xdwarf-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for xdwarf-0.1.0-py3-none-any.whl |
Total release size: 20.9 kB
Release files / xdwarf-0.1.0.tar.gz
| Download URL | xdwarf-0.1.0.tar.gz |
|---|---|
| Size | 4.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fa640061be87bba9e3fde8270b2ef266927ee0f1d437177834b2efc5822a9818
|
|
BLAKE2b-256 checksum How to use checksums |
83738f2519f6e77c4b01cc1b6f68bd39102896359468d93ea687873c0486f8ce
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.4
|
Release files / xdwarf-0.1.0-py3-none-any.whl
| Download URL | xdwarf-0.1.0-py3-none-any.whl |
|---|---|
| Size | 16.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ff133af7e271f6ff9b188d2bbbc77604997338ff0fe036ebbe807de6addf0f44
|
|
BLAKE2b-256 checksum How to use checksums |
b096af1021f53c9c75906264ffcbed2b44e94082f61651c71184d14ffc1636e4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.4
|
Security for xdwarf 0.1.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.