Aller au contenu

Code

class Code:
def __init__(client: LegifranceClient, fond: str = "CODE_ETAT")
def search() -> CodeSearchBuilder
def fetch_code(text_id: str) -> CodeConsultFetcher
def fetch_article(article_id: str) -> ArticleFetcher
MéthodeSignatureRôle
in_code(code_name: NomCode) -> Selfrestreindre à un code
in_codes`(code_names: list[strNomCode]) -> Self`
article_number(number: str) -> Selfpar numéro d’article
text(search_text: str, in_field: TypeChampCode = TypeChampCode.ALL) -> Selfrecherche textuelle
at_date(date_str: str) -> SelfYYYY-MM-DD
with_legal_status`(status: list[EtatJuridique]None = None) -> Self`
with_formatter() -> Selfactiver formatage
paginate(page_number: int = 1, page_size: int = 10) -> Selfpagination
execute() -> list[Article]exécuter

Valeurs possibles pour in_field :

  • TypeChampCode.NUM_ARTICLE
  • TypeChampCode.TITLE
  • TypeChampCode.ARTICLE
  • TypeChampCode.ALL (défaut)
  • ValueError — paramètres invalides.
  • Exception — échec de l’appel API.