demarches_simpy.fields module

class AttachedFileField(id, label, stringValue, type, dossier, **kwargs)[source]

Represent a attached file field of a dossier (all properties of Field are available)

Properties

filesdict[str,dict[str,str]]

a dict of files with the url as key and the filename, size, type and url as value

property files: dict[str, dict[str, str]]

a dict of files with the url as key and the filename, size, type and url as value

class DateField(id, label, stringValue, type, dossier, **kwargs)[source]

Represent a date field of a dossier (all properties of Field are available)

Properties

datestr

The date of the field formatted in ISO 8601 (YYYY-MM-DD) (stringValue is plain text formatted like β€œ12 mars 2021”)

timestampint

The timestamp of the date

class Field(id, label, stringValue, type, dossier, **kwargs)[source]

Represent a field of a dossier, it’s a generic class, you should use more specific class if you want to access to more specific properties

Properties

idstr

The id of the field

labelstr

The label of the field

stringValuestr

The value of the field

typestr

The type of the field

dossierDossier

The dossier which the field is attached

class MapField(id, label, stringValue, type, dossier, **kwargs)[source]

Properties

geoAreaslist[GeoArea]

The list of GeoArea of the field

geo_areas_to_geojson()[source]

The geojson representation of the geo_areas

Return type:

dict

Returns:

The geojson representation of the geo_areas

class MultipleDropDownField(id, label, stringValue, type, dossier, **kwargs)[source]

Represent a multiple dropdown field of a dossier (all properties of Field are available)

Properties

valueslist[str]

The values of the field (same as stringValue but with a different name and maybe it can hold a better encoding)

class TextField(id, label, stringValue, type, dossier, **kwargs)[source]

Represent a text field of a dossier (all properties of Field are available)

Properties

valuestr

The value of the field (same as stringValue but with a different name and maybe it can hold a better encoding)