Module geolink_formatter.entity¶
File¶
-
class
geolink_formatter.entity.
File
(category=None, href=None, title=None, description=None)[source]¶ Bases:
object
Creates a new file instance.
Parameters: - category (str) – The file’s category.
- href (str) – The URL to access the file.
- title (str) – The file’s title.
- description (str) – The file’s description.
-
category
¶ str – The file’s category.
-
description
¶ str – The file’s description.
-
href
¶ str – The URL to access the file.
-
title
¶ str – The file’s title.
Document¶
-
class
geolink_formatter.entity.
Document
(files, id=None, category=None, doctype=None, federal_level=None, authority=None, authority_url=None, title=None, number=None, abbreviation=None, instance=None, type=None, subtype=None, decree_date=None, enactment_date=None, abrogation_date=None, cycle=None, municipality=None, index=None)[source]¶ Bases:
object
Creates a new document instance.
Parameters: - files (list[geolink_formatter.entity.File]) – The files contained by the document.
- id (str) – The document identifier.
- category (str) – The document category.
- doctype (str) – The internal type of the document.
- federal_level (str) – The federal level of the document.
- authority (str) – The name of the authority responsible for the document.
- authority_url (str) – The URL of the authority’s website.
- title (str) – The document title.
- number (str) – The document number.
- abbreviation (str) – The document abbreviation.
- instance (str) – The document’s instance.
- type (str) – The official type of the document.
- subtype (str) – The subtype of the document.
- decree_date (datetime.date) – The date of decree.
- enactment_date (datetime.date) – The date of enactment.
- abrogation_date (datetime.date) – The date of abrogation.
- cycle (str) – The document cycle.
- municipality (str) – The municipality concerned by this document.
- index (int) – The document’s index for sorting.
Raises: TypeError
– Raised on missing argument or invalid argument type.ValueError
– Raised on invalid argument value.
-
abbreviation
¶ str – The document abbreviation (since v1.1.0).
-
abrogation_date
¶ datetime.date – The date of abrogation (since v1.1.0).
str – The name of the authority responsible for the document.
str – The URL of the authority’s website.
-
category
¶ str – The document category.
-
cycle
¶ str – The document cycle (v1.0.0 only).
-
decree_date
¶ datetime.date – The date of decree.
-
doctype
¶ str – The internal type of the document.
-
enactment_date
¶ datetime.date – The date of enactment.
-
federal_level
¶ str – The federal level of the document.
-
files
¶ list[geolink_formatter.entity.File] – The files contained by the document.
-
id
¶ str – The document identifier.
-
index
¶ int – The document’s index for sorting (since v1.2.2).
-
instance
¶ str – The document’s instance.
-
municipality
¶ str – The municipality concerned by this document (since v1.2.1).
-
number
¶ str – The document number (since v1.1.0).
-
subtype
¶ str – The subtype of the document.
-
title
¶ str – The document title.
-
type
¶ str – The official type of the document.