law_service
law_service
¶
Service functions for the laws/bills (zákony) page.
get_all_status_labels(data)
¶
Collect unique status values from all tisky.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
PeriodData
|
Period data containing tisk_lookup. |
required |
Returns:
| Type | Description |
|---|---|
list[str]
|
Sorted list of unique status strings. |
Source code in pspcz_analyzer/services/law_service.py
list_laws(data, search='', status_filter='', topic_filter='', page=1, per_page=20, lang='cs')
¶
List bills with optional search, status, and topic filters, paginated.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
PeriodData
|
Period data containing tisk_lookup and amendment_data. |
required |
search
|
str
|
Optional text search filter on tisk name. |
''
|
status_filter
|
str
|
Exact status string to match (empty or 'all' = no filter). |
''
|
topic_filter
|
str
|
Exact topic label to match (empty = no filter). |
''
|
page
|
int
|
Page number (1-based). |
1
|
per_page
|
int
|
Results per page. |
20
|
lang
|
str
|
Language code for topics/summaries. |
'cs'
|
Returns:
| Type | Description |
|---|---|
dict
|
Dict with keys: rows, total, page, per_page, total_pages. |
Source code in pspcz_analyzer/services/law_service.py
law_detail(data, ct, lang='cs')
¶
Get full detail for a single bill by tisk number.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
PeriodData
|
Period data. |
required |
ct
|
int
|
Tisk number (cislo tisku). |
required |
lang
|
str
|
Language code for summaries/topics. |
'cs'
|
Returns:
| Type | Description |
|---|---|
dict | None
|
Dict with full bill info, or None if ct not found. |