# evamaxfield/pywslegislature architecture

> Architecture diagram of the GitHub repository evamaxfield/pywslegislature, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-26). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/evamaxfield/pywslegislature
- Repository: https://github.com/evamaxfield/pywslegislature

## Overview

pywslegislature wraps the Washington State Legislative Web Services API: callers define a service/function request, receive an HTTP response, and can expose it as XML or JSON. Its documented higher-level workflow maps biennium-specific Legislature and Committee objects to committee, member, and meeting details. The service modules also advertise legislative, amendment, sponsor, document, and session-law queries. Source excerpts show request processing and committee detail loading; connections for other advertised service capabilities are therefore shown only at the service boundary.

Main entry points: [`pywslegislature/services/apifunction.py`](https://github.com/evamaxfield/pywslegislature/blob/master/pywslegislature/services/apifunction.py) (API function specs), [`pywslegislature/committee.py`](https://github.com/evamaxfield/pywslegislature/blob/master/pywslegislature/committee.py) (Committee), [`pywslegislature/query.py`](https://github.com/evamaxfield/pywslegislature/blob/master/pywslegislature/query.py) (WSLRequest), [`pywslegislature/legislature.py`](https://github.com/evamaxfield/pywslegislature/blob/master/pywslegislature/legislature.py) (Legislature)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Request client"]
  node_request["WSLRequest<br/>[query.py]"]
  node_result["WSLResults<br/>[query.py]"]
  node_function["API function specs<br/>[apifunction.py]"]
end

subgraph group_services["Legislative services"]
  node_committee_api["Committee queries"]
  node_meeting_api["Meeting queries"]
  node_action_api["Committee actions"]
  node_legislation_api["Legislation queries"]
  node_amendment_api["Amendment queries"]
  node_document_api["Legislative documents"]
  node_sponsor_api["Sponsor queries<br/>[sponsorService.py]"]
  node_sessionlaw_api["Session laws"]
  node_rcw_api["RCW citations"]
end

subgraph group_domain["Legislature model"]
  node_biennium["Biennium<br/>[biennium.py]"]
  node_legislature["Legislature<br/>[legislature.py]"]
  node_committee["Committee<br/>[committee.py]"]
  node_meeting["Meeting<br/>[meeting.py]"]
  node_member["Member<br/>[member.py]"]
end

node_caller(("Python caller"))
node_api{{"WSL Web Services"}}

node_caller -->|"constructs"| node_request
node_request -->|"validates parameters"| node_function
node_request -->|"sends HTTP request"| node_api
node_api -->|"returns response"| node_result
node_request -->|"wraps response"| node_result
node_caller -->|"reads XML or JSON"| node_result
node_caller -->|"creates model"| node_legislature
node_legislature -->|"uses period"| node_biennium
node_legislature -->|"exposes committees"| node_committee
node_committee -->|"requests meetings"| node_meeting_api
node_committee -->|"processes query"| node_request
node_committee -->|"requests members"| node_committee_api
node_committee -->|"builds meeting objects"| node_meeting
node_committee -->|"builds member objects"| node_member
node_committee_api -->|"defines calls"| node_function
node_meeting_api -->|"defines calls"| node_function
node_action_api -->|"defines calls"| node_function
node_legislation_api -->|"defines calls"| node_function
node_amendment_api -->|"defines calls"| node_function
node_document_api -->|"defines calls"| node_function
node_sponsor_api -->|"defines calls"| node_function
node_sessionlaw_api -->|"defines calls"| node_function
node_rcw_api -->|"defines calls"| node_function

click node_request "https://github.com/evamaxfield/pywslegislature/blob/master/pywslegislature/query.py"
click node_result "https://github.com/evamaxfield/pywslegislature/blob/master/pywslegislature/query.py"
click node_function "https://github.com/evamaxfield/pywslegislature/blob/master/pywslegislature/services/apifunction.py"
click node_biennium "https://github.com/evamaxfield/pywslegislature/blob/master/pywslegislature/biennium.py"
click node_legislature "https://github.com/evamaxfield/pywslegislature/blob/master/pywslegislature/legislature.py"
click node_committee "https://github.com/evamaxfield/pywslegislature/blob/master/pywslegislature/committee.py"
click node_meeting "https://github.com/evamaxfield/pywslegislature/blob/master/pywslegislature/meeting.py"
click node_member "https://github.com/evamaxfield/pywslegislature/blob/master/pywslegislature/member.py"
click node_committee_api "https://github.com/evamaxfield/pywslegislature/blob/master/pywslegislature/services/committeeService.py"
click node_meeting_api "https://github.com/evamaxfield/pywslegislature/blob/master/pywslegislature/services/committeeMeetingsService.py"
click node_action_api "https://github.com/evamaxfield/pywslegislature/blob/master/pywslegislature/services/committeeActionService.py"
click node_legislation_api "https://github.com/evamaxfield/pywslegislature/blob/master/pywslegislature/services/legislationService.py"
click node_amendment_api "https://github.com/evamaxfield/pywslegislature/blob/master/pywslegislature/services/amendmentService.py"
click node_document_api "https://github.com/evamaxfield/pywslegislature/blob/master/pywslegislature/services/legislativeDocumentService.py"
click node_sponsor_api "https://github.com/evamaxfield/pywslegislature/blob/master/pywslegislature/services/sponsorService.py"
click node_sessionlaw_api "https://github.com/evamaxfield/pywslegislature/blob/master/pywslegislature/services/sessionLawService.py"
click node_rcw_api "https://github.com/evamaxfield/pywslegislature/blob/master/pywslegislature/services/rcwSiteAffectedService.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_request,node_result,node_function toneBlue
class node_committee_api,node_meeting_api,node_action_api,node_legislation_api,node_amendment_api,node_document_api,node_sponsor_api,node_sessionlaw_api,node_rcw_api toneAmber
class node_biennium,node_legislature,node_committee,node_meeting,node_member toneMint
class node_caller,node_api toneIndigo
```

## Components

### Request client

- [WSLRequest](https://github.com/evamaxfield/pywslegislature/blob/master/pywslegislature/query.py): `pywslegislature/query.py`
- [WSLResults](https://github.com/evamaxfield/pywslegislature/blob/master/pywslegislature/query.py): `pywslegislature/query.py`
- [API function specs](https://github.com/evamaxfield/pywslegislature/blob/master/pywslegislature/services/apifunction.py): `pywslegislature/services/apifunction.py`

### Legislative services

- [Committee queries](https://github.com/evamaxfield/pywslegislature/blob/master/pywslegislature/services/committeeService.py): `pywslegislature/services/committeeService.py`
- [Meeting queries](https://github.com/evamaxfield/pywslegislature/blob/master/pywslegislature/services/committeeMeetingsService.py): `pywslegislature/services/committeeMeetingsService.py`
- [Committee actions](https://github.com/evamaxfield/pywslegislature/blob/master/pywslegislature/services/committeeActionService.py): `pywslegislature/services/committeeActionService.py`
- [Legislation queries](https://github.com/evamaxfield/pywslegislature/blob/master/pywslegislature/services/legislationService.py): `pywslegislature/services/legislationService.py`
- [Amendment queries](https://github.com/evamaxfield/pywslegislature/blob/master/pywslegislature/services/amendmentService.py): `pywslegislature/services/amendmentService.py`
- [Legislative documents](https://github.com/evamaxfield/pywslegislature/blob/master/pywslegislature/services/legislativeDocumentService.py): `pywslegislature/services/legislativeDocumentService.py`
- [Sponsor queries](https://github.com/evamaxfield/pywslegislature/blob/master/pywslegislature/services/sponsorService.py): `pywslegislature/services/sponsorService.py`
- [Session laws](https://github.com/evamaxfield/pywslegislature/blob/master/pywslegislature/services/sessionLawService.py): `pywslegislature/services/sessionLawService.py`
- [RCW citations](https://github.com/evamaxfield/pywslegislature/blob/master/pywslegislature/services/rcwSiteAffectedService.py): `pywslegislature/services/rcwSiteAffectedService.py`

### Legislature model

- [Biennium](https://github.com/evamaxfield/pywslegislature/blob/master/pywslegislature/biennium.py): `pywslegislature/biennium.py`
- [Legislature](https://github.com/evamaxfield/pywslegislature/blob/master/pywslegislature/legislature.py): `pywslegislature/legislature.py`
- [Committee](https://github.com/evamaxfield/pywslegislature/blob/master/pywslegislature/committee.py): `pywslegislature/committee.py`
- [Meeting](https://github.com/evamaxfield/pywslegislature/blob/master/pywslegislature/meeting.py): `pywslegislature/meeting.py`
- [Member](https://github.com/evamaxfield/pywslegislature/blob/master/pywslegislature/member.py): `pywslegislature/member.py`

### Other components

- **Python caller**
- **WSL Web Services**

## Connections

- Python caller → WSLRequest: constructs
- WSLRequest → API function specs: validates parameters
- WSLRequest → WSL Web Services: sends HTTP request
- WSL Web Services → WSLResults: returns response
- WSLRequest → WSLResults: wraps response
- Python caller → WSLResults: reads XML or JSON
- Python caller → Legislature: creates model
- Legislature → Biennium: uses period
- Legislature → Committee: exposes committees
- Committee → Meeting queries: requests meetings
- Committee → WSLRequest: processes query
- Committee → Committee queries: requests members
- Committee → Meeting: builds meeting objects
- Committee → Member: builds member objects
- Committee queries → API function specs: defines calls
- Meeting queries → API function specs: defines calls
- Committee actions → API function specs: defines calls
- Legislation queries → API function specs: defines calls
- Amendment queries → API function specs: defines calls
- Legislative documents → API function specs: defines calls
- Sponsor queries → API function specs: defines calls
- Session laws → API function specs: defines calls
- RCW citations → API function specs: defines calls
