{"id":34099783,"url":"https://github.com/nephi-dev/rxml","last_synced_at":"2026-02-27T08:54:25.828Z","repository":{"id":156379979,"uuid":"632978236","full_name":"nephi-dev/rxml","owner":"nephi-dev","description":"A Python library to read xml files written in rust ","archived":false,"fork":false,"pushed_at":"2025-10-08T14:20:13.000Z","size":108,"stargazers_count":18,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-10-08T16:16:40.996Z","etag":null,"topics":["cpython","maturin","pypy","python","rust","xml"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/rxml/","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nephi-dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-04-26T14:15:46.000Z","updated_at":"2025-10-08T14:19:22.000Z","dependencies_parsed_at":"2024-11-19T18:36:44.310Z","dependency_job_id":"4cba840f-2cb6-4571-8610-b718414d3875","html_url":"https://github.com/nephi-dev/rxml","commit_stats":null,"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"purl":"pkg:github/nephi-dev/rxml","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nephi-dev%2Frxml","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nephi-dev%2Frxml/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nephi-dev%2Frxml/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nephi-dev%2Frxml/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nephi-dev","download_url":"https://codeload.github.com/nephi-dev/rxml/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nephi-dev%2Frxml/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27730945,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-12-14T02:00:11.348Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cpython","maturin","pypy","python","rust","xml"],"created_at":"2025-12-14T16:02:55.476Z","updated_at":"2026-02-27T08:54:25.822Z","avatar_url":"https://github.com/nephi-dev.png","language":"Rust","funding_links":["https://buymeacoffee.com/nephilim"],"categories":[],"sub_categories":[],"readme":"# rxml\n\n[![PyPI version](https://img.shields.io/pypi/v/rxml?color=%2334D058\u0026label=pypi%20package)](https://pypi.org/project/rxml)\n[![Python versions](https://img.shields.io/pypi/pyversions/rxml.svg?color=%2334D058)](https://pypi.org/project/rxml)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\nA fast, lightweight Python library for reading and writing XML files, powered by Rust.\n\n`rxml` provides up to **2× faster** XML parsing compared to Python's built-in `xml.etree.ElementTree`, with a simple and intuitive API.\n\n---\n\n## Features\n\n- **Fast** - Rust-powered XML parsing, up to 2× faster than the standard library.\n- **Simple API** - Read, traverse, and write XML with minimal boilerplate.\n- **Type-safe** - Ships with a `.pyi` stub file for full editor autocompletion and type checking.\n- **Cross-platform** - Supports CPython and PyPy on Windows, macOS, and Linux.\n\n## Installation\n\n```bash\npip install rxml\n```\n\n## Quick Start\n\n### Reading XML\n\nGiven an XML file `note.xml`:\n\n```xml\n\u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\n\u003cnote example_attr=\"example value\"\u003e\n    \u003cto\u003e\n        \u003cname\u003eExample Name\u003c/name\u003e\n    \u003c/to\u003e\n    \u003cfrom\u003e\n        \u003cname\u003eExample Name\u003c/name\u003e\n    \u003c/from\u003e\n    \u003cheading\u003eAn Example Heading\u003c/heading\u003e\n    \u003cbody\u003eAn Example Body!\u003c/body\u003e\n\u003c/note\u003e\n```\n\nParse it with `rxml`:\n\n```python\nfrom rxml import read_file\n\nroot = read_file(\"note.xml\", \"note\")\n\nfor child in root.children:\n    print(child.name, child.text)\n```\n\n### Writing XML\n\n```python\nfrom rxml import Node, write_file\n\nnode = Node(\n    name=\"greeting\",\n    attrs={\"lang\": \"en\"},\n    text=\"Hello, World!\",\n)\nwrite_file(node, \"greeting.xml\")\n```\n\n### The `Node` Object\n\nEvery parsed element is represented as a `Node`:\n\n```python\nclass Node:\n    name: str                # Tag name\n    attrs: dict[str, str]    # Element attributes\n    children: list[Node]     # Child nodes\n    text: str                # Text content\n```\n\nRefer to the [`rxml.pyi`](rxml.pyi) stub file for the complete API surface, including `read_string`, `write_string`, and additional utilities.\n\n## Development\n\n`rxml` is built with [PyO3](https://pyo3.rs) and [Maturin](https://www.maturin.rs/).\n\n### Prerequisites\n\n- Python 3.10+\n- Rust toolchain (stable)\n- [Maturin](https://www.maturin.rs/) (`pip install maturin`)\n\n### Building from Source\n\n```bash\ngit clone https://github.com/nephi-dev/rxml.git\ncd rxml\npython -m venv .venv \u0026\u0026 source .venv/bin/activate\npip install maturin\nmaturin develop\n```\n\n### Running Tests\n\n```bash\ncargo test\n```\n\n## Contributing\n\nContributions are welcome! Please open an issue or submit a pull request on [GitHub](https://github.com/nephi-dev/rxml).\n\n## License\n\nThis project is licensed under the [MIT License](LICENSE).\n\n## Support\n\nIf you find this project useful, consider supporting me:\n\n[![Buy Me a Coffee](https://img.shields.io/badge/Buy%20Me%20a%20Coffee-ffdd00?style=flat\u0026logo=buy-me-a-coffee\u0026logoColor=black)](https://buymeacoffee.com/nephilim)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnephi-dev%2Frxml","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnephi-dev%2Frxml","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnephi-dev%2Frxml/lists"}