xacro
xacro is a macro language for XML
Decision gist · record as of 2026-08-14
Yes, if you work with XML files that contain repetition or need templating. The package is actively maintained, has low install friction, and no known vulnerabilities. The unclear license treatment is a minor concern—review the BSD 3-Clause text in the repository to confirm it aligns with your project before committing to it.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.8 or later; input file must be a valid xacro XML document with macro definitions or includes.
- Low install friction with a single runtime dependency (pyyaml).
- The package is actively maintained with a recent commit on 2026-04-07 and has been in active development since its first release on 2018-09-18.
License · maintenance · safety
(unclear) — License treatment is unclear; the package uses a BSD 3-Clause-style license text but no SPDX identifier is recorded. You should review the full license text in the repository before use to confirm it meets your project's requirements.
last release 2025-08-28 (351 days) · last repo commit 2026-04-07 · 124 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 201,771 downloads/mo, #9,664 on PyPI
Alternatives
Verify before relying
pip install xacro
import xacro
xacro.process_file('input.xacro', output='output.xml')- Whether the BSD 3-Clause license text is the canonical license or if an SPDX identifier should be assigned
- Whether xacro is primarily used within the ROS ecosystem or has broader XML-processing applications
What it is and what it does
Xacro is a macro preprocessor for XML that allows you to define reusable templates and macros, then expand them into full XML documents. It reduces repetition and improves readability by letting you write shorter, more maintainable XML source files that are transformed into the final XML output. The package depends only on pyyaml and requires Python 3.8 or later.
It is commonly used in robotics and configuration contexts where XML files would otherwise contain significant duplication. You write xacro source files with macro definitions and calls, then process them through xacro to generate the expanded XML output.
Use it for
- Generate robot configuration files in ROS by defining reusable component macros instead of repeating XML blocks
- Preprocess XML configuration files to reduce boilerplate and improve maintainability across multiple similar configs
- Template XML documents where sections repeat with minor parameter variations
- Build XML files programmatically using macro definitions rather than string concatenation
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you work with XML files that contain repetition or need templating.
The package is actively maintained, has low install friction, and no known vulnerabilities. The unclear license treatment is a minor concern—review the BSD 3-Clause text in the repository to confirm it aligns with your project before committing to it.
Install
xacro on PyPI
Before you install
Low install friction with a single runtime dependency (pyyaml). The package is actively maintained with a recent commit on 2026-04-07 and has been in active development since its first release on 2018-09-18.
Requires Python 3.8 or later; input file must be a valid xacro XML document with macro definitions or includes.
License in practice
License treatment is unclear; the package uses a BSD 3-Clause-style license text but no SPDX identifier is recorded. You should review the full license text in the repository before use to confirm it meets your project's requirements.
Quickstart
pip install xacro
import xacro
xacro.process_file('input.xacro', output='output.xml')
Verify before relying
- Whether the BSD 3-Clause license text is the canonical license or if an SPDX identifier should be assigned
- Whether xacro is primarily used within the ROS ecosystem or has broader XML-processing applications
Package facts
| License | Not declared unclear |
| Python support | Supports the current Python release >=3.8 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packagepyyaml |
| Maintenance | Actively maintained 351 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 201,771 / month, #9,664 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
Evidence: xacro-2.1.1-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “xml macro language”
- xacroXacro is an XML macro language that lets you write shorter, more…
- xmacroxmacro is a command-line and Python tool for defining and expanding…
- zope.talzope.tal implements the Template Attribute Language (TAL) and Macro…
Give your agent the search over MCP, or paste the wish link into any chat.
More Markup packages
PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.
A Python markdown parser that converts markdown to HTML following the CommonMark specification, with support for plugins and custom syntax rules.
Install it if you need reliable markdown-to-HTML conversion.
Beautiful Soup parses HTML and XML documents into a navigable tree, providing Pythonic methods to search, iterate, and modify the parsed content.
Install it if you need to parse or extract data from markup documents.
et_xmlfile writes large XML files with minimal memory overhead by serializing elements to disk as they are created, rather than holding the entire tree in memory.
Install it if incremental XML writing fits your use case; skip it if your XML documents are small or you already use lxml.
Parses and edits TOML files while preserving formatting, comments, and structure, then serializes them back with layout intact.
Install it if you're building tools that touch TOML files and user readability of the source matters.
Parses Python docstrings in ReST, Google, Numpydoc, and Epydoc formats, extracting structured information like descriptions, parameters, return types, and exceptions.
Install it if you need to programmatically read and extract structured data from Python docstrings.
See also xmacro · zope.tal · defusedxml · mkdocs-macros-plugin · xmldiff · Jinja2 · pcodedmp · zope.pagetemplate · uri-template · clvm-tools