obspy.core.event.base.CreationInfo
- class CreationInfo(*args, **kwargs)[source]
Bases:
AbstractEventType
CreationInfo is used to describe creation metadata (author, version, and creation time) of a resource.
- Parameters:
agency_id (str, optional) – Designation of agency that published a resource.
agency_uri (
ResourceIdentifier
) – Resource Identifier of the agency that published a resource.author (str, optional) – Name describing the author of a resource.
author_uri (
ResourceIdentifier
) – Resource Identifier of the author of a resource.creation_time (
UTCDateTime
, optional) – Time of creation of a resource.version (str, optional) – Version string of a resource
>>> info = CreationInfo(author="obspy.org", version="0.0.1") >>> print(info) CreationInfo(author='obspy.org', version='0.0.1')
Note
For handling additional information not covered by the QuakeML standard and how to output it to QuakeML see the ObsPy Tutorial.
Attributes
Public Methods
Clear the class :return: |
|
If key is not found, d is returned if given, otherwise KeyError is raised. |
|
as a 2-tuple; but raise KeyError if D is empty. |
|
Private Methods
Warning
Private methods are mainly for internal/developer use and their API might change without notice.
- CreationInfo._cast_type(key, value)
Cast type of value to type required in _types dict.
- Parameters:
key (str) – The key from __setattr__.
value – The value being set to key.
- Returns:
value cast to correct type.
- CreationInfo._pretty_str(priorized_keys=[], min_label_length=16)
Return better readable string representation of AttribDict object.
- Parameters:
- Returns:
String representation of current AttribDict object.
- CreationInfo._repr_pretty_(p, cycle)
Special Methods
- CreationInfo.__bool__()
- classmethod CreationInfo.__class_getitem__()
Represent a PEP 585 generic type
E.g. for t = list[int], t.__origin__ is list and t.__args__ is (int,).
- CreationInfo.__contains__(key)
- CreationInfo.__delattr__(name)
- CreationInfo.__delitem__(name)
- CreationInfo.__dir__()
Default dir() implementation.
- CreationInfo.__eq__(other)
Two instances are considered equal if all attributes and all lists are identical.
- CreationInfo.__format__(format_spec, /)
Default object formatter.
- CreationInfo.__ge__(value, /)
Return self>=value.
- CreationInfo.__getattr__(name, default=None)
Py3k hasattr() expects an AttributeError no KeyError to be raised if the attribute is not found.
- CreationInfo.__getattribute__(name, /)
Return getattr(self, name).
- CreationInfo.__getitem__(name, default=None)
- CreationInfo.__gt__(value, /)
Return self>value.
- CreationInfo.__init__(*args, **kwargs)
- CreationInfo.__init_subclass__()
This method is called when a class is subclassed.
The default implementation does nothing. It may be overridden to extend subclasses.
- CreationInfo.__iter__()
- CreationInfo.__le__(value, /)
Return self<=value.
- CreationInfo.__len__()
- CreationInfo.__lt__(value, /)
Return self<value.
- CreationInfo.__ne__(other)
- CreationInfo.__new__(**kwargs)
- CreationInfo.__reduce__()
Helper for pickle.
- CreationInfo.__reduce_ex__(protocol, /)
Helper for pickle.
- CreationInfo.__repr__()
- CreationInfo.__setattr__(name, value)
Custom property implementation that works if the class is inheriting from AttribDict.
- CreationInfo.__setitem__(key, value)
- CreationInfo.__sizeof__()
Size of object in memory, in bytes.
- CreationInfo.__str__(force_one_line=False)
Fairly extensive in an attempt to cover several use cases. It is always possible to change it in the child class.
- classmethod CreationInfo.__subclasshook__(C)