--- id: markuppy version: "1.18" license: MIT license_treatment: permissive maintenance: active --- # MarkupPy — An HTML/XML generator License: permissive · Maintenance: active · Downloads: 818.4K/mo ## What it is and what it does MarkupPy is a lightweight Python library for generating HTML and XML markup programmatically. Instead of writing strings or using templates, you build markup by calling methods on a page object—each method corresponds to an HTML or XML tag, and you chain or nest them to create document structure. It supports inline styles and scripts, raw content insertion for pre-formatted text, and works with both Python 2 and 3. The package is useful when you need to generate markup dynamically from Python code without the overhead of a templating engine or the verbosity of string concatenation. It has no external dependencies, installs cleanly, and is maintained actively with recent updates. Use it for: - Generate HTML reports or dashboards programmatically from Python data structures. - Build XML feeds or configuration files dynamically without manual string formatting. - Create pre-formatted code or text blocks in HTML with exact whitespace control using add_raw. - Embed inline CSS and JavaScript directly in generated HTML pages during initialization. - Construct HTML pages for testing or documentation generation in automated workflows. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. MarkupPy generates HTML and XML markup from Python code using an intuitive, pythonic API without external dependencies. Yes. MarkupPy is a solid choice for programmatic HTML/XML generation when you want a lightweight, dependency-free alternative to templating. It has no known vulnerabilities, uses a permissive MIT license, and is actively maintained. Install it if you need to build markup from Python code without external dependencies or template syntax overhead. ## Install pip install markuppy uv add markuppy poetry add markuppy ## Installing MarkupPy Before you install: Installation is straightforward with no runtime dependencies. The package is actively maintained with recent releases and a stable codebase. License in practice: MIT license is permissive and imposes no restrictions on use, modification, or distribution in proprietary or open-source projects. Quickstart: pip install MarkupPy from MarkupPy import markup page = markup.page() page.init(title="My Title") page.p("Hello, World!") print(page) Verify before relying: - Whether the package works reliably with Python 3.12+ given its long maintenance history and dual Python 2/3 support claim. - Performance characteristics when generating large or deeply nested HTML structures. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 818.4K/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags html generator python, xml markup builder, programmatic html creation, python markup generation, lightweight html builder, html templating alternative, dynamic markup generation, html-generation, markup-builder, no-dependencies [View on SkillFed](https://skillfed.io/packages/markuppy) · [View on PyPI](https://pypi.org/project/markuppy/)