Déporte les données officielles dans officiel.py
This commit is contained in:
parent
159db50add
commit
02afdb60db
13
python/officiel.py
Normal file
13
python/officiel.py
Normal file
@ -0,0 +1,13 @@
|
||||
import logging, yaml
|
||||
|
||||
__LOGGER = logging.getLogger(__name__)
|
||||
|
||||
# Récupère les informations officielles sur les ressources (code/nom)
|
||||
with open("pn/ressources.yml", 'r', encoding="utf8") as fid:
|
||||
DATA_RESSOURCES = yaml.load(fid.read(), Loader=yaml.Loader)
|
||||
# Récupère les données officielles des ACs
|
||||
with open("pn/acs.yml", 'r', encoding="utf8") as fid:
|
||||
DATA_ACS = yaml.load(fid.read(), Loader=yaml.Loader)
|
||||
with open("pn/saes.yml", 'r', encoding="utf8") as fid:
|
||||
DATA_SAES = yaml.load(fid.read(), Loader=yaml.Loader)
|
||||
|
@ -3,18 +3,11 @@ import logging
|
||||
import re
|
||||
import yaml
|
||||
import unicodedata
|
||||
from officiel import *
|
||||
from modeles import *
|
||||
|
||||
__LOGGER = logging.getLogger(__name__)
|
||||
|
||||
# Récupère les informations officielles sur les ressources (code/nom)
|
||||
with open("pn/ressources.yml", 'r', encoding="utf8") as fid:
|
||||
DATA_RESSOURCES = yaml.load(fid.read(), Loader=yaml.Loader)
|
||||
# Récupère les données officielles des ACs
|
||||
with open("pn/acs.yml", 'r', encoding="utf8") as fid:
|
||||
DATA_ACS = yaml.load(fid.read(), Loader=yaml.Loader)
|
||||
with open("pn/saes.yml", 'r', encoding="utf8") as fid:
|
||||
DATA_SAES = yaml.load(fid.read(), Loader=yaml.Loader)
|
||||
|
||||
class Ressource():
|
||||
"""Classe modélisant les ressources"""
|
||||
|
Loading…
Reference in New Issue
Block a user