Skip to main content

Xml Subsetter

decimate data while keeping others intact

before

# bulk.xml
<r>
    <meta>
    some meta data
    </meta>

    <something>
    thing thing thing thing
    </something>

    <e>e0</e>
    <e>e1</e>
    <e>e2</e>
    <e>e3</e>
    <some-annoying-non-data-you-have-to-keep-1>ah yah yah</some-annoying-non-data-you-have-to-keep-1>
    <some-annoying-non-data-you-have-to-keep-2>ah yah yah</some-annoying-non-data-you-have-to-keep-2>
    <some-annoying-non-data-you-have-to-keep-3>ah yah yah</some-annoying-non-data-you-have-to-keep-3>
    <e>e4</e>
    <e>e5</e>
    <e>e6</e>
    <e>e7</e>
    <e>e8</e>
    <e>e9</e>
    <e>e10</e>
    ...
    <e>e99</e>
</r>

subset_head("bulk.xml", target_file='/tmp/small.xml', data_tag='e',ratio=0.05)

after

# small.xml
<r>
    <meta>
    some meta data
    </meta>

    <something>
    thing thing thing thing
    </something>

    <e>e0</e>
    <e>e1</e>
    <e>e2</e>
    <e>e3</e>
    <some-annoying-non-data-you-have-to-keep-1>ah yah yah</some-annoying-non-data-you-have-to-keep-1>
    <some-annoying-non-data-you-have-to-keep-2>ah yah yah</some-annoying-non-data-you-have-to-keep-2>
    <some-annoying-non-data-you-have-to-keep-3>ah yah yah</some-annoying-non-data-you-have-to-keep-3>
    <e>e4</e>
</r>

Metadata

Release files for xml-subsetter 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for xml-subsetter 0.0.2
File Size Uploaded Provenance Actions
xml-subsetter-0.0.2.tar.gz 4.7 kB Without provenance Details for xml-subsetter-0.0.2.tar.gz

Release files / xml-subsetter-0.0.2.tar.gz

Download URL xml-subsetter-0.0.2.tar.gz
Size 4.7 kB
Tags Source
SHA-256 checksum
How to use checksums
3c102e20288d37d1fff6e081b3e22339acc710e8e24458a050bd777985589837
BLAKE2b-256 checksum
How to use checksums
6eab37c989d1c2bda5f47e5e5157bd5ec1ee4c13ae4577ec8b50cbbf13fc904c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.37.0 CPython/3.7.3

Security for xml-subsetter 0.0.2

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page