Skip to main content

Tools for online voter registration in the United States of America

Project description

voter-tools

PyPI Tests Changelog License

Tools for online voter registration in the United States of America.

Contains a command-line tool (vote) and a python library (voter_tools) to:

  1. Check voter registration status in key states, currently including:
    • Georgia
    • Michigan
    • Pennsylvania
    • Wisconsin
  2. Perform online voter registration (OVR) directly with key states, via their APIs. We currently support the Pennsylvania OVR API with plans to support Michigan and Washington states in the future.

Installation

Install this library using pip:

pip install voter-tools

Command-line usage

Check registration of a single voter

To check whether a voter is registered:

vote check <first-name> <last-name> <zip> <dob YYYY-MM-DD> [--details]

This will tell you whether the user is registered to vote. You can request extra details (registration date, current status, etc.) with the --details flag. Not all states support all details.

Check registration of multiple voters in bulk

There is also a tool to check every record in a CSV file:

vote check-csv <input-file.csv> [--details]

A new CSV is written to stdout with the same fields as the input CSV plus extras related to the registration check.

Interact with the Pennsylvania API

The vote command contains a number of sub-commands for interacting directly with the Pennsylvania state API.

For instance, to invoke the API's "get available languages" call:

> vote pa get-languages
languages=(Language(code='LANGENG', name='English'), Language(code='LANGSPN', name='Spanish'), Language(code='LANGTCN', name='Chinese'))

Use vote pa --help for details on available subcommands.

Development

To contribute to this library, first checkout the code. Then create a new virtual environment:

cd voter-tools
python -m venv .venv
source .venv/bin/activate

Now install the dependencies and test dependencies:

pip install -e '.[dev]'

To run tests:

make test

To run a full lint/typecheck/test pass:

make check

State-specific documents

We've collected state-specific documents in the docs directory and will try to keep them up-to-date as state APIs change.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

voter_tools-0.0.12.tar.gz (658.9 kB view details)

Uploaded Source

Built Distribution

voter_tools-0.0.12-py3-none-any.whl (669.4 kB view details)

Uploaded Python 3

File details

Details for the file voter_tools-0.0.12.tar.gz.

File metadata

  • Download URL: voter_tools-0.0.12.tar.gz
  • Upload date:
  • Size: 658.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for voter_tools-0.0.12.tar.gz
Algorithm Hash digest
SHA256 fff4df2a3d1e31c5852eb6b7be5b25e75194ee8a6a38746dadb303c2a78d0710
MD5 25bf84174af2ca9df6087b3171d6e5b2
BLAKE2b-256 bd4b4dbb928e32c7e9837c9d856135ac0e6408b06a46a1e0ac8a3dd59ecb55e0

See more details on using hashes here.

Provenance

File details

Details for the file voter_tools-0.0.12-py3-none-any.whl.

File metadata

  • Download URL: voter_tools-0.0.12-py3-none-any.whl
  • Upload date:
  • Size: 669.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for voter_tools-0.0.12-py3-none-any.whl
Algorithm Hash digest
SHA256 08fdf7656eef022638c0540ebb6a03ce95354d2d47a74be94f10d58b703bdc1d
MD5 4159b3001f7feb713bbfa0238dd00d3e
BLAKE2b-256 774c0b1327484ecd69cf3eaa8bccb0c3c046b414d08635ff0d4d79ee47901ace

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page