Skip to main content
Help us improve PyPI by participating in user testing. All experience levels needed!

A simple tag wrapping method for XML and HTML.

Project description

tag_wrap

A simple tag and attribute generation tool.

Purpose

Developed to simplify the generation of HTML and XML content.

Usage

Syntax: wrap(tag_name, optional_attribute1="here", optional_attributeN="here, content_to_be_wrapped)

You may specify any number of attributes and any number of items to wrap as well as nesting tags themselves.


Examples

import tag_wrap

HTML Paragraph

tag_wrap.wrap('p', "This is a paragraph.")

Produces:

<p>This is a paragraph.</p>

Nested HTML with attributes and a nested body

tag_wrap.wrap('html', lang="en-US", wrap('body', 'Body content here'))

Produces:

<html lang="en-US"><body>Body content here</body></html>


Authors

Josh Whetton

Project details


Release history Release notifications

This version
History Node

1.0.6

History Node

1.0.5

History Node

1.0.4

History Node

1.0.3

History Node

1.0.2

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
tag_wrap-1.0.6.tar.gz (2.8 kB) Copy SHA256 hash SHA256 Source None Aug 2, 2016

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page