xbrl.UnitsRegistry

An xbrl.UnitsRegistry object represents an XBRL Units Registry.

Nested classes: xbrl.UnitsRegistry.Unit

class xbrl.UnitsRegistry

Proper instances of this class will be created within RaptorXML only, instantiation from script code will throw a NotImplementedError exception.

Class methods

classmethod xbrl.UnitsRegistry.create_from_buffer(type cls, buf, **kargs)

Returns a tuple with an xbrl.UnitsRegistry and xml.ErrorLog object. Constructs a new xbrl.UnitsRegistry object after processing the content in the given buffer. Other validation options can be specified using additional kargs. Please consult the RaptorXML CLI documentation http://manual.altova.com/RaptorXML/raptorxmlxbrlserver/rxcli_xbrl_valxbrl.htm for a list of available options. Any errors and warnings reported during the validation can be accessed through the returned xml.ErrorLog object.

classmethod xbrl.UnitsRegistry.create_from_url(type cls, url, **kargs)

Returns a tuple with an xbrl.UnitsRegistry and xml.ErrorLog object. Constructs a new xbrl.UnitsRegistry object after processing the content retrieved from the given url. Other validation options can be specified using additional kargs. Please consult the RaptorXML CLI documentation http://manual.altova.com/RaptorXML/raptorxmlxbrlserver/rxcli_xbrl_valxbrl.htm for a list of available options. Any errors and warnings reported during the validation can be accessed through the returned xml.ErrorLog object.

classmethod xbrl.UnitsRegistry.default_utr(type cls)

Returns an xbrl.UnitsRegistry object which represents the default http://www.xbrl.org/utr/utr.xml Units Registry.

Attributes

xbrl.UnitsRegistry.instance

Returns an object of type xml.Instance which represents the Units Registry XML file.

xbrl.UnitsRegistry.last_updated

Returns the value of the ‘last_updated’ attribute as a datetime.date, or None if the XML root element information item <utr:utr> doesn’t have a ‘datetime.date’ attribute.

xbrl.UnitsRegistry.units

Returns an iterator of xbrl.UnitsRegistry.Unit objects which represents the <utr:unit> child elements.

xbrl.UnitsRegistry.uri

Returns the URI of the XBRL Units Registry.

xbrl.UnitsRegistry.version

Returns the value of the ‘version’ attribute as a string, or None if the XML root element information item <utr:utr> doesn’t have a ‘version’ attribute.

Methods

xbrl.UnitsRegistry.unit(id)

Returns an object of type xbrl.UnitsRegistry.Unit which represents the <utr:unit> child element with the given id, or None if no such element can be found.

Special methods

__bool__, __eq__, __ge__, __gt__, __le__, __lt__, __ne__