Metadata-Version: 1.1
Name: gexml
Version: 1.2.0
Summary: A dead-simple Object-XML mapper for Python.
Home-page: https://github.com/ampledata/gexml
Author: Ryan Kelly
Author-email: oss@undef.net
License: Copyright (c) 2009-2011 Ryan Kelly

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

Description: gexml: A dead-simple Object-XML mapper for Python
        *************************************************
        
        Let's face it: xml is a fact of modern life.  I'd even go so far as to say
        that it's *good* at what is does.  But that doesn't mean it's easy to work
        with and it doesn't mean that we have to like it.  Most of the time, XML
        just needs to get out of the way and let you do some actual work instead
        of writing code to traverse and manipulate yet another DOM.
        
        The gexml module takes the obvious mapping between XML tags and Python objects
        and lets you capture that as cleanly as possible.  Loosely inspired by Django's
        ORM, you write simple class definitions to define the expected structure of
        your XML document.  Like so::
        
          >>> import gexml
          >>> from gexml import fields
          >>> class Person(gexml.Model):
          ...   name = fields.String()
          ...   age = fields.Integer(tagname='age')
        
        Then you can parse an XML document into an object like this::
        
          >>> p = Person.parse("<Person name='Foo McBar'><age>42</age></Person>")
          >>> p.name
          u'Foo McBar'
          >>> p.age
          42
        
        And you can render an object into an XML document like this::
        
          >>> p = Person(name="Handsome B. Wonderful",age=36)
          >>> p.render()
          '<?xml version="1.0" ?><Person name="Handsome B. Wonderful"><age>36</age></Person>'
        
        Malformed documents will raise a ParseError::
        
          >>> p = Person.parse("<Person><age>92</age></Person>")
          Traceback (most recent call last):
              ...
          ParseError: required field not found: 'name'
        
        Of course, it gets more interesting when you nest Model definitions, like this::
        
          >>> class Group(gexml.Model):
          ...   name = fields.String(attrname="name")
          ...   members = fields.List(Person)
          ...
          >>> g = Group(name="Monty Python")
          >>> g.members.append(Person(name="John Cleese",age=69))
          >>> g.members.append(Person(name="Terry Jones",age=67))
          >>> g.render(fragment=True)
          '<Group name="Monty Python"><Person name="John Cleese"><age>69</age></Person><Person name="Terry Jones"><age>67</age></Person></Group>'
        
        There's support for XML namespaces, default field values, case-insensitive
        parsing, and more fun stuff.  Check out the documentation on the following
        classes for more details:
        
          :Model:  the base class for objects that map into XML
          :Field:  the base class for individual model fields
          :Meta:   meta-information about how to parse/render a model
        
        Source
        ======
        Github: https://github.com/ampledata/gexml
        
        Author
        ======
        Ryan Kelly oss@undef.net
        
        Contributors
        ============
        Greg Albrecht W2GMD oss@undef.net
        
        https://ampledata.org
        
        Copyright
        =========
        Copyright (c) 2009-2011 Ryan Kelly
        
        License
        =======
        MIT License. See LICENSE.txt for details.
        
Platform: UNKNOWN
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: License :: OSI Approved
Classifier: License :: OSI Approved :: MIT License
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Topic :: Text Processing
Classifier: Topic :: Text Processing :: Markup
Classifier: Topic :: Text Processing :: Markup :: XML
