| |
- builtins.object
-
- Evenement
- builtins.tuple(builtins.object)
-
- Ressource
class Evenement(builtins.object) |
|
Evenement(entite, descriptif, contact, dt=None, publication=0, dtmaj=None, typeevt=0, ressources=None, dtfin=None, strict=True)
Classe Evenement.
Classe pour manipuler des evenements.
Proprietes:
entite (sitehydro.Sitehydro ou sitehydro.Station ou
sitemeteo.Sitemeteo) = entite concernee par l'evenement
descriptif (string)
contact (intervenant.Contact) = contact proprietaire de l'evenement
dt (datetime.datetime) = date de l'evenement
publication (entier parmi NOMENCLATURE[534]) = type de publication
dtmaj (datetime.datetime ou None) = date de mise a jour
typeevt (entier parmi NOMENCLATURE[891]) = type de l'évènement
ressources (iterable of evenement.Ressource) = ressources associées
à l'évènement
dtfin (datetime.datetime ou None) = date de fin |
|
Methods defined here:
- __eq__(self, other, attrs=None, ignore=None, lazzy=False)
- Equal elaborate function.
Arguments:
self, other
attrs (iterable of strings, default to self.__class__.__all__attrs__ or
__self.__dict__.keys() = the attrs to compare
ignore (iterable of strings, default None) = attrs to ignore in the
comparison
lazzy (bool, default False) = if True does not test an attribute
whose counterpart is None
NB: functool.partial could be smarter than a private class variable to
fix the default attrs list, but it doesn't work with 'self'.
- __hash__(self)
- __init__(self, entite, descriptif, contact, dt=None, publication=0, dtmaj=None, typeevt=0, ressources=None, dtfin=None, strict=True)
- Initialisation.
Arguments:
entite (sitehydro.Sitehydro ou sitehydro.Station ou
sitemeteo.Sitemeteo) = entite concernee par l'evenement
descriptif (string)
contact (intervenant.Contact) = contact proprietaire de l'evenement
dt (numpy.datetime64 string, datetime.datetime...) =
date de l'evenement
publication (entier parmi NOMENCLATURE[534]) = type de publication
dtmaj (numpy.datetime64 string, datetime.datetime...) =
date de mise a jour
typeevt (entier parmi NOMENCLATURE[891]) = type de l'évènement
ressources (iterable of evenement.Ressource) = ressources associées
à l'évènement
dtfin (datetime.datetime ou None) = date de fin
strict (bool, defaut True) = en mode permissif le type de
publication n'est pas controle et les proprietes obligatoires
sont facultatives
- __ne__(self, other, attrs=[], ignore=[], lazzy=False)
- __str__(self)
- Return string representation from __unicode__ method.
- __unicode__(self)
- Return unicode representation.
Data descriptors defined here:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
- contact
- Return contact.
- descriptif
- Return descriptif.
- dt
- Class Datefromeverything.
A descriptor to store a datetime.datetime property that can be initiated
in different manners using numpy.datetime64 facilities.
- dtfin
- Class Datefromeverything.
A descriptor to store a datetime.datetime property that can be initiated
in different manners using numpy.datetime64 facilities.
- dtmaj
- Class Datefromeverything.
A descriptor to store a datetime.datetime property that can be initiated
in different manners using numpy.datetime64 facilities.
- entite
- Return entite.
- publication
- Class Nomenclatureitem.
A descriptor to deal with 'in nomenclature.NOMENCLATURES' properties.
Should raise only a ValueError when value is not allowed (even with
the None case).
Properties:
nomenclature (int) = the nomenclature ref
valuetype (type) = a function to cast values to the nomenclature's
items type
strict (bool, default True) = wether or not the instance value has
to be in the nomenclature items
required (bool, defaut True) = wether or not instance's value can
be None
default = a defautl value returned if the instance's value is not
in the dictionnary. Should be unused if the property has been
initialized.
data (weakref.WeakKeyDictionary)
- ressources
- Return ressources.
- typeevt
- Class Nomenclatureitem.
A descriptor to deal with 'in nomenclature.NOMENCLATURES' properties.
Should raise only a ValueError when value is not allowed (even with
the None case).
Properties:
nomenclature (int) = the nomenclature ref
valuetype (type) = a function to cast values to the nomenclature's
items type
strict (bool, default True) = wether or not the instance value has
to be in the nomenclature items
required (bool, defaut True) = wether or not instance's value can
be None
default = a defautl value returned if the instance's value is not
in the dictionnary. Should be unused if the property has been
initialized.
data (weakref.WeakKeyDictionary)
Data and other attributes defined here:
- __all__attrs__ = ('entite', 'descriptif', 'contact', 'dt', 'publication', 'dtmaj', 'typeevt', 'ressources', 'dtfin')
|
class Ressource(builtins.tuple) |
|
Ressource(url, libelle)
Ressource(url, libelle) |
|
- Method resolution order:
- Ressource
- builtins.tuple
- builtins.object
Methods defined here:
- __getnewargs__(self)
- Return self as a plain tuple. Used by copy and pickle.
- __repr__(self)
- Return a nicely formatted representation string
- _asdict(self)
- Return a new OrderedDict which maps field names to their values.
- _replace(_self, **kwds)
- Return a new Ressource object replacing specified fields with new values
Class methods defined here:
- _make(iterable) from builtins.type
- Make a new Ressource object from a sequence or iterable
Static methods defined here:
- __new__(_cls, url, libelle)
- Create new instance of Ressource(url, libelle)
Data descriptors defined here:
- url
- Alias for field number 0
- libelle
- Alias for field number 1
Data and other attributes defined here:
- _fields = ('url', 'libelle')
- _fields_defaults = {}
Methods inherited from builtins.tuple:
- __add__(self, value, /)
- Return self+value.
- __contains__(self, key, /)
- Return key in self.
- __eq__(self, value, /)
- Return self==value.
- __ge__(self, value, /)
- Return self>=value.
- __getattribute__(self, name, /)
- Return getattr(self, name).
- __getitem__(self, key, /)
- Return self[key].
- __gt__(self, value, /)
- Return self>value.
- __hash__(self, /)
- Return hash(self).
- __iter__(self, /)
- Implement iter(self).
- __le__(self, value, /)
- Return self<=value.
- __len__(self, /)
- Return len(self).
- __lt__(self, value, /)
- Return self<value.
- __mul__(self, value, /)
- Return self*value.
- __ne__(self, value, /)
- Return self!=value.
- __rmul__(self, value, /)
- Return value*self.
- count(self, value, /)
- Return number of occurrences of value.
- index(self, value, start=0, stop=9223372036854775807, /)
- Return first index of value.
Raises ValueError if the value is not present.
| |