wa-leg-api
Python wrapper library around Washington State Legislature web services API
Installation
pip install wa-leg-api
Dependecies are:
Basic Usage
The stub functions are in modules named after each service in all lower case. The function names are the request type changed from CamelCase to snake_case.
Example: If you want to call the function GetAmendments from the AmendmentService, do:
from wa_leg_api.amendment import get_amendments
result = get_amendments(2021)
All stubs return dicts.
For more information about the Washington State Legislature web services available visit wslwebservices.leg.wa.gov
Exceptions
There is one exception defined by this library:
try:
result = get_amendments(2100) # an invalid year!
except WaLegApiException as e:
print(e.http_error) # HTTP Error code
print(e.http_error_text) # HTTP Error code as text
print(e.http_text) # Additional text returned from leg.wa.gov
print(e.args_sent) # Record of arguments sent with request
Sample output:
500
Internal Server Error
System.Web.Services.Protocols.SoapException: Invalid Input. ---> System.ArgumentException: You have not submitted a valid year. Please enter year in the following format: YYYY. Information is only available back to 1991.
Parameter name: Year
--- End of inner exception stack trace ---
at WslWebServices.AmendmentService.GetAmendments(Int32 year)
{'year': 2100}
Exceptions thrown directly by the requests package are not re-wrapped.
Full documentation
Please visit https://wa-leg-api.readthedocs.io
Metadata
Release files for wa-leg-api 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| wa_leg_api-0.4.0.tar.gz | 17.0 kB | Without provenance | Details for wa_leg_api-0.4.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| wa_leg_api-0.4.0-py3-none-any.whl | Python 3 | none | any | Details for wa_leg_api-0.4.0-py3-none-any.whl |
Total release size: 35.4 kB
Release files / wa_leg_api-0.4.0.tar.gz
| Download URL | wa_leg_api-0.4.0.tar.gz |
|---|---|
| Size | 17.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ebd06feca5e2257f3ec4a01bd8e2c3323e26f0b953197406dec03d1e6d6935e0
|
|
BLAKE2b-256 checksum How to use checksums |
a565b5ad4173b82328e2a481db62441794fb34d81546870318211930ae1a50fe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.12
|
Release files / wa_leg_api-0.4.0-py3-none-any.whl
| Download URL | wa_leg_api-0.4.0-py3-none-any.whl |
|---|---|
| Size | 18.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8f6350755e1235862ec44230ba8f27981d9f2d306fd0e25d4dd533f049778cd8
|
|
BLAKE2b-256 checksum How to use checksums |
d909ca18369657ab6cd3fb456bf36f7dabec3f1f095b2da1711544fa415ff457
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.12
|
Security for wa-leg-api 0.4.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.