mysoc-validator-fast
A Rust-backed shadow of mysoc-validator
for mySociety democracy data: Popolo, publicwhip XML transcripts, and JSON
registers of interests. Rust handles parsing and validation, with a Python API
that currently targets mysoc-validator 1.5. Package versions are independent
of the upstream compatibility target.
Requires Python 3.11 or newer.
pip install mysoc-validator-fast
Usage
These examples mirror the upstream README
with imports changed to mysoc_validator_fast.
Look up a person by identifier or name:
from datetime import date
from mysoc_validator_fast import Chamber, IdentifierScheme, Popolo
popolo = Popolo.from_parlparse()
by_id = popolo.persons.from_identifier("4514", scheme=IdentifierScheme.MNIS)
by_name = popolo.persons.from_name(
"keir starmer", chamber_id=Chamber.COMMONS, date=date(2022, 7, 31)
)
assert by_id.id == by_name.id
Load a transcript or register of interests:
from pathlib import Path
from mysoc_validator_fast import RegmemRegister, Transcript
transcript = Transcript.from_xml_path(Path("data/debates2023-03-28d.xml"))
interests = RegmemRegister.from_path(Path("data/commons-regmem-2025-01-20.json"))
Validate files from the command line:
uvx mysoc-validator-fast popolo validate people.json
uvx mysoc-validator-fast transcript validate debates.xml
uvx mysoc-validator-fast transcript validate transcripts/
uvx mysoc-validator-fast transcript validate 'transcripts/*.xml' --glob
uvx mysoc-validator-fast interests validate interests.json
uvx mysoc-validator-fast popolo format people.json
mysoc-validator-fast and msv-fast are also CLI entry points. Use --help
to see available commands.
Current differences from mysoc-validator
This is not yet a complete drop-in replacement:
- Imports: use
mysoc_validator_fast, with models in.popolo,.interestsand.transcripts; upstream'smysoc_validator.models.*paths are not provided. Import Pydantic extra schemas such asMembershipExtrafrommysoc_validator_fast.popolo_extras. - Coverage: legacy XML interests (
XMLRegister), transcript JSON I/O, info XML models (InfoCollection,PersonInfo,ConsInfo), and the Popolo TUI are not implemented. - Pydantic integration: core models are Rust extension classes, not Pydantic
models. Selected
model_validate/model_dumphelpers are provided; the full Pydantic API, its keyword options, andValidationErrorstructure are not. Rust validation failures generally raiseValueError. - Mutation: Popolo collection lookups return live handles, but appending a
standalone model copies it. Retrieve it from the collection for later edits.
Names and dates are copies, and changing a collection's returned
.rootlist does not edit the collection; use setters and collection methods to write changes. Register details, annotations, and summaries are also detached values; use entry/detail-group editing methods. - Typed extras:
get_extra_as(CustomExtra)returns a validated Pydantic snapshot. Editing that snapshot does not update the record; write throughset_extraor the liveextraproxy. - Transcript editing: item wrappers are copies. Editing an item does not
update the transcript;
model_dump_xml()returns its retained source XML.
See the repository README for implementation and development details.
Metadata
Release files for mysoc-validator-fast 0.2.3
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 |
|---|---|---|---|---|
| mysoc_validator_fast-0.2.3.tar.gz | 1.3 MB | Without provenance | Details for mysoc_validator_fast-0.2.3.tar.gz |
Built distributions (wheels)
Total release size: 14.7 MB
Release files / mysoc_validator_fast-0.2.3.tar.gz
| Download URL | mysoc_validator_fast-0.2.3.tar.gz |
|---|---|
| Size | 1.3 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
914d18c74d2e839fc3d8102562c7ea46910604784a191dca0cc06fb82ea774f7
|
|
BLAKE2b-256 checksum How to use checksums |
843986515b51e05a48a7e495dd8d65528abcf6428be109c325889954a8707283
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / mysoc_validator_fast-0.2.3-cp311-abi3-win_amd64.whl
| Download URL | mysoc_validator_fast-0.2.3-cp311-abi3-win_amd64.whl |
|---|---|
| Size | 1.8 MB |
| Tags | CPython 3.11 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
057464bfaa3763fd7e3e6112785cca5438da96fd64921ea8b3e2a95c8c0201f6
|
|
BLAKE2b-256 checksum How to use checksums |
06ea299d9130a0fa6a4b968e8749d908e73b721114bda26379d9a8dac1382daa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / mysoc_validator_fast-0.2.3-cp311-abi3-musllinux_1_2_x86_64.whl
| Download URL | mysoc_validator_fast-0.2.3-cp311-abi3-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 2.2 MB |
| Tags | CPython 3.11 Linux musl 1.2+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
a42372436830cf8fe36ae50bb6d1c96e29691fdfd23df1912703cd8776610d44
|
|
BLAKE2b-256 checksum How to use checksums |
36474386c0924782876141c3cced5074309384a9b8895dc3dc9a0eccd6a0c4ca
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / mysoc_validator_fast-0.2.3-cp311-abi3-musllinux_1_2_aarch64.whl
| Download URL | mysoc_validator_fast-0.2.3-cp311-abi3-musllinux_1_2_aarch64.whl |
|---|---|
| Size | 2.0 MB |
| Tags | CPython 3.11 Linux musl 1.2+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
049154b66c7aba8e9d3720b6dafcf1b713feba63cd2c397ba5f1657b490c9a42
|
|
BLAKE2b-256 checksum How to use checksums |
167b1aa3bcda525692021598c7d6017bb08c4c0a93af130141de76df5fcfc402
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / mysoc_validator_fast-0.2.3-cp311-abi3-manylinux_2_28_x86_64.whl
| Download URL | mysoc_validator_fast-0.2.3-cp311-abi3-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 1.9 MB |
| Tags | CPython 3.11 Linux glibc 2.28+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
a3039ea0a13c13217c7421bee957d1b0c05c4adaade9ebb0823594e883e894a2
|
|
BLAKE2b-256 checksum How to use checksums |
03f5e41d35117c827639b514d6adfad9b0db513ea4d474c5546278cf1aca1b1b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / mysoc_validator_fast-0.2.3-cp311-abi3-manylinux_2_28_aarch64.whl
| Download URL | mysoc_validator_fast-0.2.3-cp311-abi3-manylinux_2_28_aarch64.whl |
|---|---|
| Size | 1.9 MB |
| Tags | CPython 3.11 Linux glibc 2.28+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
96730e3d33de16f7c1b5db986497e72ee7bc2a532be48c53116b7dc1be6732e8
|
|
BLAKE2b-256 checksum How to use checksums |
f19029f2234eec0e3ef6679f8b309497932c432b4af17d9bf7b848c8e5156351
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / mysoc_validator_fast-0.2.3-cp311-abi3-macosx_11_0_arm64.whl
| Download URL | mysoc_validator_fast-0.2.3-cp311-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 1.8 MB |
| Tags | CPython 3.11 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
6e465229aa0551d99afbeee7e70e56c2d63d99a31971f1c20276d352d9a83753
|
|
BLAKE2b-256 checksum How to use checksums |
0dbe7629f7870afb714cccd67ebac4292dd4b086fd2611ed2a4e65d654c46d80
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / mysoc_validator_fast-0.2.3-cp311-abi3-macosx_10_12_x86_64.whl
| Download URL | mysoc_validator_fast-0.2.3-cp311-abi3-macosx_10_12_x86_64.whl |
|---|---|
| Size | 1.9 MB |
| Tags | CPython 3.11 abi3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
2c2051d47da993f781b90b3238d38ed380c998ffcbcf4249a4db35e7d3f79034
|
|
BLAKE2b-256 checksum How to use checksums |
0c0b691aee003d68627717371bca998771cf0b53488a505a9a500f46af95925e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for mysoc-validator-fast 0.2.3
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.