A XML parser for Python written in Rust
Project description
rxml
What is rxml?
rxml
is a simple python library to read xml files up to 2 times faster than python's xml(ElementTree)
library.
Installation
To install rxml
you can use pip
:
pip install rxml
Simply as that!
Example usage
To a given xml with test.xml
as name:
<?xml version="1.0" encoding="UTF-8"?>
<note example_attr="example value">
<to>
<name>Example Name</name>
</to>
<from>
<name>Example Name</name>
</from>
<heading>An Example Heading</heading>
<body>An Example Body!</body>
</note>
We write the following python code:
from rxml import read_file
root_file = read_file("test.xml", "note")
where "test.xml"
is the file_name
and "note"
is the root_tag
.
After that we can simply iter through the children with:
for node in root_file.children:
# do something whith the node here
Node attributes
This is how the Node
looks like:
class Node:
name: str
attrs: dict[str, str]
children: list[Node]
text: str
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
rxml-0.2.0.tar.gz
(6.7 kB
view hashes)
Built Distributions
rxml-0.2.0-cp311-none-win_amd64.whl
(156.0 kB
view hashes)
rxml-0.2.0-cp311-none-win32.whl
(149.2 kB
view hashes)
rxml-0.2.0-cp310-none-win_amd64.whl
(156.0 kB
view hashes)
rxml-0.2.0-cp310-none-win32.whl
(149.2 kB
view hashes)
Close
Hashes for rxml-0.2.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2e914bde29f781bfa62427ddf273d008605c8a96db27921ccabe882f367597ee |
|
MD5 | 7c9f5c62e5fb9ca5ed5017032171f09b |
|
BLAKE2b-256 | 9bcbd41bfa9acb6f26c344957a5a1d7e057765aedd08808fcce6db04b2a7f451 |
Close
Hashes for rxml-0.2.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1c9cb955e1704ff31bdd64706f021a3fafeae08a96a2c3338a8c155300dec893 |
|
MD5 | 39602fce43f45e7751804ae5cb65cd5e |
|
BLAKE2b-256 | 85268c107aab840dc4a61a4c45b97b1c072a1f196e8b286fb9621c69313fd047 |
Close
Hashes for rxml-0.2.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b637439eefaf022311fd15e7a4bce4a40fefb0ff58156816984338aceddc2a22 |
|
MD5 | 34e97ce886e3b56a0969d13e59295a1f |
|
BLAKE2b-256 | 6e92bf92a19a7a4360997683653f646764a22f443afe3cc265f0f61cd3b1a4db |
Close
Hashes for rxml-0.2.0-cp311-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3e146e749ee83336fa5c46de117f1b25514b56eb458bd464734172db8f6f20c2 |
|
MD5 | bec360913d12b8e67c849b6e0d7a260c |
|
BLAKE2b-256 | 21a47adab74fd9220222c96711a2bcc3e7fd794a910ad8533982b191bba99615 |
Close
Hashes for rxml-0.2.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 65a806289676a5e6a3662c2b59ad7f23e4f0f7aa469773aa1912391f3348a020 |
|
MD5 | 2d4d8d7fe12ba680a47fe98ad4a22cae |
|
BLAKE2b-256 | 52d5188b52800c5d7fc61fe7bb27bda1d4f19d119bc93361edb9a42a2795235a |
Close
Hashes for rxml-0.2.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3cba167a20b9aa50013da73b675739f6fbbd8fe6f454adb2148a49aac8b5dd1a |
|
MD5 | a9836c8bd88a99fc2286656e5741dd97 |
|
BLAKE2b-256 | c2a81844ad45b18fb045c49eaab809a9d8a8cd366d869174280d4dbc8eb8a8a4 |
Close
Hashes for rxml-0.2.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c8c425e54de77d68f4f247c2a05c5edf70a27a2e9ff59872aae53bf34aaa1c56 |
|
MD5 | 382aeaf5671a8f7ed0db89744b760289 |
|
BLAKE2b-256 | fe122db1b30bfc023afcf2c8e4dab1d0380a9e353eed5bca3f56fc25464fffa1 |
Close
Hashes for rxml-0.2.0-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 24ca39b9d0c98c0e91ab5ac68e51adfb03072eefdda615b3fbee014b98dd01ce |
|
MD5 | b8d798a56745812d32b68ea676c24213 |
|
BLAKE2b-256 | 7cbecaa1daa57ee3d49c2e0e38d07aba11c19dd849047f59af11d6f9af8627f4 |
Close
Hashes for rxml-0.2.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fa012976e27f3976a695907bd4e0cf4071796829145366e29120abeec99b4dd1 |
|
MD5 | a5e43ce79a9aef61407480af3aa61367 |
|
BLAKE2b-256 | 5871e43a94dbbe69af91e8f54bf2693a61f6dd5f6fd3c35ca262badf7eae6a89 |
Close
Hashes for rxml-0.2.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f27ea1ba2a6866da4fef82eedc463b8d3c0bb7f4f56d1e0583756dc9ef0a595b |
|
MD5 | 2051008b1ef95fcf72b724cd8fc9d046 |
|
BLAKE2b-256 | 1cde8a63ba9118837b90bfd0ff32ce26b7310a5623230c07311382ecb57c676d |
Close
Hashes for rxml-0.2.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b133f05cb41ca37deacdc58bc110e8e7d82cff8edf9905d4322ddcdeeecaff58 |
|
MD5 | d84558177567faba3d4a297124b5014e |
|
BLAKE2b-256 | 6465426cc74b663f836a3cebe6904548dce400f0bdfa2e6af1b2f82453ab6c0c |
Close
Hashes for rxml-0.2.0-cp311-cp311-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fc26b5b8e6a27d7f6c5ddf2b0ca674e0d0e1bb3f4ae6ec2d53b34aab5dbb1d28 |
|
MD5 | 09a46658d12129ddaba052adc47e06ed |
|
BLAKE2b-256 | 25e85af6667fa4cecc22c8bb29811883da40e075dde69e07bf74f7c78729b929 |
Close
Hashes for rxml-0.2.0-cp310-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c1459a75dde49aa8e104a47bc51ec705a49e36f9ef76f4e5aec19c10be9574f3 |
|
MD5 | 86bd4c4a7d414d9ec2219714dcf2f8cf |
|
BLAKE2b-256 | c3b1488bc22c131f4ce650e7f2ed43301ff37df3888e7d360edb76b712c216a0 |
Close
Hashes for rxml-0.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1168c6b58599ea8d94c4634e401c5c563f2266b7a02aab63af798c8b47c799c5 |
|
MD5 | 2c70d4d97d0f8fc4f500f41b17b0a9af |
|
BLAKE2b-256 | 562673bd6ddfc003c75f963a990ac6446a6662b23b245eb5504438a0417339de |
Close
Hashes for rxml-0.2.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 449e808d9734558fe13bb5856b0b9ac716b61dd29410538dbd62d36c1703313f |
|
MD5 | bac7c981b77e01c4a2be3b83ef1934fb |
|
BLAKE2b-256 | 9a7d17ae9a7652c0bae58b49ab7551905f07f113f6c572a0da75c43801f2cda6 |
Close
Hashes for rxml-0.2.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | de88f8d721b75ca68794ee43f1877ab9aa753ac2807cd6660c79b40a825a46d9 |
|
MD5 | 1d6a7b02b3a8e7ce2e88c7027a20508a |
|
BLAKE2b-256 | 9ccca2c7e78f8ed1a9fbf4fab3368f4845726214227e0d6dea83adfcc2b1d91d |
Close
Hashes for rxml-0.2.0-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 95437139976164b2a06a4cc88b6ec8822b532a2380e4b6638ddc8adeeb4276b4 |
|
MD5 | 4adedb6e1ec24fefb93ffb6ad864c344 |
|
BLAKE2b-256 | 0b3ce73b0f7fd2216958356d9bfa11c794231608e39321c0436cd65cfb4a4262 |
Close
Hashes for rxml-0.2.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d0e663c80078c6bbeb5d58508d4c7c808da1f399e61ef78a7ac4a378925137eb |
|
MD5 | 0687b80f3a55a3f4747e5e6bf698ad67 |
|
BLAKE2b-256 | b9f6bfe5c65a4de3451a4808a83a7a4be2be3414a2c8fd89d3136c2b1241000d |
Close
Hashes for rxml-0.2.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3ef2674776ef496263b81a1ddfdc1082c34462e70546b4b721ef84f30de6b545 |
|
MD5 | ea453338f121ccf183677254612937f8 |
|
BLAKE2b-256 | a98288205fe5b117231fc2d6388fccb55a4d5765d74de0123e3d64385b5d31d8 |
Close
Hashes for rxml-0.2.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3ba34e4976e9bf4750c9ad3bf2bace75929d492b39f586219ffcddcccf4f3ef5 |
|
MD5 | 926b03261c7d70d8182e2d3f85d18f67 |
|
BLAKE2b-256 | b0c9fc5d1c6ed3ec224326daffeb93a221af4df723d0a6078d84aa75d8499df5 |
Close
Hashes for rxml-0.2.0-cp310-cp310-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 070ad3df372a674eebc28042cb27223b4be5c4b101ed21a129ea215e9cdd2bb5 |
|
MD5 | 3f5a256132705ba27d4bad3a742733ea |
|
BLAKE2b-256 | 9e89a7388c6d8b73425247dc87c7195df117d644db5771328ed3074477b4b417 |