2.8. The Atom Syndication Format (RFC4287)¶
This module defines functions and classes for working with the Atom Syndication Format as defined by RFC4287: http://www.ietf.org/rfc/rfc4287.txt
2.8.1. Reference¶
2.8.1.1. Elements¶
- class pyslet.rfc4287.Feed(parent)¶
Bases: pyslet.rfc4287.Source
Represents an Atom feed.
This is the document (i.e., top-level) element of an Atom Feed Document, acting as a container for metadata and data associated with the feed
- Entry = None¶
atomEntry
- class pyslet.rfc4287.Source(parent)¶
Bases: pyslet.rfc4287.Entity
Metadata from the original source feed of an entry.
This class is also used a base class for Feed.
- Generator = None¶
atomGenerator
- Icon = None¶
atomIcon
- Logo = None¶
atomLogo
- Subtitle = None¶
atomSubtitle
- class pyslet.rfc4287.Entry(parent)¶
Bases: pyslet.rfc4287.Entity
An individual entry, acting as a container for metadata and data associated with the entry.
- class pyslet.rfc4287.Entity(parent)¶
Bases: pyslet.rfc4287.AtomElement
Base class for feed, entry and source elements.
- AtomId = None¶
the atomId of the object
Note that we qualify the class name used to represent the id to avoid confusion with the existing ‘id’ attribute in Element.
- Author = None¶
atomAuthor
- Link = None¶
atomLink
- Title = None¶
atomTitle
- class pyslet.rfc4287.Author(parent)¶
Bases: pyslet.rfc4287.Person
A Person construct that indicates the author of the entry or feed.
- class pyslet.rfc4287.Category(parent)¶
Bases: pyslet.rfc4287.AtomElement
Information about a category associated with an entry or feed.
- term = None¶
a string that identifies the category to which the entry or feed belongs
- scheme = None¶
an IRI that identifies a categorization scheme.
This is not converted to a pyslet.rfc2396.URI instance as it is not normally resolved to a resource. Instead it defines a type of namespace.
- label = None¶
a human-readable label for display in end-user applications
- class pyslet.rfc4287.Content(parent)¶
Bases: pyslet.rfc4287.Text
Contains or links to the content of the entry.
Although derived from Text this class overloads the meaning of the Text.type attribute allowing it to be a media type.
- src = None¶
link to remote content
- GetValue()¶
Gets a single unicode string representing the value of the element.
Overloads the basic GetValue(), if type is a media type rather than one of the text types then a ValueError is raised.
- class pyslet.rfc4287.Contributor(parent)¶
Bases: pyslet.rfc4287.Person
A Person construct that indicates a person or other entity who contributed to the entry or feed.
- class pyslet.rfc4287.Generator(parent)¶
Bases: pyslet.rfc4287.AtomElement
Identifies the agent used to generate a feed, for debugging and other purposes.
- uri = None¶
the uri of the tool used to generate the feed
- version = None¶
the version of the tool used to generate the feed
- SetPysletInfo()¶
Sets this generator to a default representation of this Pyslet module.
- class pyslet.rfc4287.Icon(parent)¶
Bases: pyslet.rfc4287.AtomElement
Identifies an image that provides iconic visual identification for a feed.
- GetValue()¶
Overrides GetValue(), returning a pyslet.rfc2396.URI instance.
- SetValue(value)¶
Overrides SetValue(), enabling the value to be set from a pyslet.rfc2396.URI instance.
If value is a string it is used to set the element’s content, ContentChanged() is then called to update the value of uri. If value is a URI instance then uri is set directory and it is then converted to a string and used to set the element’s content.
- class pyslet.rfc4287.AtomId(parent, name=None)¶
Bases: pyslet.rfc4287.AtomElement
A permanent, universally unique identifier for an entry or feed.
- class pyslet.rfc4287.Link(parent)¶
Bases: pyslet.rfc4287.AtomElement
A reference from an entry or feed to a Web resource.
- rel = None¶
a string indicating the link relation type
- type = None¶
an advisory media type
- title = None¶
human-readable information about the link
- class pyslet.rfc4287.Logo(parent)¶
Bases: pyslet.rfc4287.Icon
An image that provides visual identification for a feed.
- class pyslet.rfc4287.Published(parent)¶
Bases: pyslet.rfc4287.Date
A Date construct indicating an instant in time associated with an event early in the life cycle of the entry.
- class pyslet.rfc4287.Rights(parent)¶
Bases: pyslet.rfc4287.Text
A Text construct that conveys information about rights held in and over an entry or feed.
- class pyslet.rfc4287.Subtitle(parent)¶
Bases: pyslet.rfc4287.Text
A Text construct that conveys a human-readable description or subtitle for a feed.
- class pyslet.rfc4287.Summary(parent)¶
Bases: pyslet.rfc4287.Text
A Text construct that conveys a short summary, abstract, or excerpt of an entry.
- class pyslet.rfc4287.Title(parent)¶
Bases: pyslet.rfc4287.Text
A Text construct that conveys a human-readable title for an entry or feed.
- class pyslet.rfc4287.Updated(parent)¶
Bases: pyslet.rfc4287.Date
A Date construct indicating the most recent instant in time when an entry or feed was modified in a way the publisher considers significant.
2.8.1.2. Base Classes¶
- class pyslet.rfc4287.Person(parent)¶
Bases: pyslet.rfc4287.AtomElement
An element that describes a person, corporation, or similar entity
- class pyslet.rfc4287.Name(parent, name=None)¶
Bases: pyslet.rfc4287.AtomElement
A human-readable name for a person.
- class pyslet.rfc4287.URI(parent, name=None)¶
Bases: pyslet.rfc4287.AtomElement
An IRI associated with a person
- class pyslet.rfc4287.Email(parent, name=None)¶
Bases: pyslet.rfc4287.AtomElement
An e-mail address associated with a person
- class pyslet.rfc4287.Text(parent)¶
Bases: pyslet.rfc4287.AtomElement
Base class for atomPlainTextConstruct and atomXHTMLTextConstruct.
- SetValue(value, type=1)¶
Sets the value of the element. type must be a value from the TextType enumeration
Overloads the basic SetValue() implementation, adding an additional type attribute to enable the value to be set to either a plain TextType.text, TextType.html or TextType.xhtml value. In the case of an xhtml type, value is parsed for the required XHTML div element and this becomes the only child of the element. Given that the div itself is not considered to be part of the content the value can be given without the enclosing div, in which case it is generated automatically.
- GetValue()¶
Gets a single unicode string representing the value of the element.
Overloads the basic GetValue() implementation to add support for text of type xhtml.
When getting the value of TextType.xhtml text the child div element is not returned as it is not considered to be part of the content.
- class pyslet.rfc4287.TextType¶
Bases: pyslet.xsdatatypes20041028.Enumeration
text type enumeration:
"text" | "html" | "xhtml"
This enumeration is used for setting the Text.type attribute.
Usage: TextType.text, TextType.html, TextType.xhtml
- class pyslet.rfc4287.Date(parent)¶
Bases: pyslet.rfc4287.AtomElement
An element conforming to the definition of date-time in RFC3339.
This class is modeled using the iso8601 module.
- GetValue()¶
Overrides GetValue(), returning a pyslet.iso8601.TimePoint instance.
- SetValue(value)¶
Overrides SetValue(), enabling the value to be set from a pyslet.iso8601.TimePoint instance.
If value is a string the behaviour is unchanged, if value is a TimePoint instance then it is formatted using the extended format of ISO 8601 in accordance with the requirements of the Atom specification.