demarches_simpy.dossier module
- class Dossier(number, profile, id=None, **kwargs)[source]
This class represents a dossier in the demarches-simplifiees.fr API. It is used to retrieve and modify the data of a dossier.
Log header : DOSSIER
Properties
- idstr
the dossier id
- numberint
the dossier number
- profileProfile
the dossier attached profile
- stateDossierState
the dossier state
Request Variables (for fetching)
- includeFieldsbool
if True, the dossier fields will be fetched
- includeAnnotationsbool
if True, the dossier annotations will be fetched
Create manually a dossier
- type number:
int- param number:
the unique associated dossier number needed to identify and fetch the associated dossier.
- type number:
int
- type profile:
- param profile:
The connection profile
- type profile:
Profile
- type id:
str- param id:
the associated unique id
- type id:
str , optional
- type **kwargs:
- param **kwargs:
IData and ILog optional arguments (see IData and ILog documentation)
- type **kwargs:
dict, optional
Notes
Currently fetching a dossier is possible only with its unique number, id fetching is not currently supported
- get_annotations()[source]
Returns the annotations of the dossier as a dict
{ 'annotation_label' : { 'stringValue' : 'foo', 'id' : 'foo' }, ... }
- Return type:
list[dict[str,dict]]- Returns:
Annotations dict
- get_attached_demarche()[source]
Get the associated demarche object
- Return type:
- Returns:
the associated demarche object
Notes
Take consider that a new Demarche object will be instantiated. For instance if you want to just get the id, prefer get_attached_demarche_id()
- get_attached_demarche_id()[source]
Return the associated demarche unique id
- Return type:
str- Returns:
the associated id string
- get_deposit_date()[source]
Get the deposit date of the dossier.
- Return type:
str- Returns:
the deposit date of the dossier
- get_dossier_state()[source]
Get the dossier current state
A state can be :
en_construction
en_instruction
accepte
refuse
sans_suite
- Return type:
- Returns:
The current dossier state
- get_fields()[source]
Returns the fields of the dossier as a dict
{ 'field_label' : { 'stringValue':'foo', 'id':'foo' }, ... }
- Return type:
list[Field]- Returns:
a dict of fields value
- get_id()[source]
Get the associated unique id of the dossier.
- Return type:
str- Returns:
the unique id
- get_number()[source]
Get the associated unique dossier number.
- Return type:
int- Returns:
the number of the dossier
- class DossierState(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]
This enum represents the state of a dossier in the demarches-simplifiees.fr API.
- CONSTRUCTION
The dossier is in construction
- ACCEPTE
The dossier is accepted
- REFUSE
The dossier is refused
- SANS_SUITE
The dossier is classified without following