opynfec
Python wrapper for OpenFEC API
This product uses the openFEC API but is not endorsed or certified by the Federal Election Commission (FEC).
Setup
Download
Download the package via pip with the command
>>> pip install opynfec
Get API Key
For small-scale testing, you can use "DEMO_KEY" as your API key, but for higher rate limits, create your own personalized key with the FEC at: https://api.open.fec.gov/developers/.
Basic Example
First, create you API connection object:
>>> from opynfec import OpynFEC
>>> api = OpynFEC("DEMO_KEY") # Replace with you own key if you have it
Now you can use any of the implemented endpoints. For example, you can search for basic info about President Biden from all of the candidates that have registered with the FEC:
>>> api.search("biden", category="candidates")
[{'name': 'OBAMA, BARACK / JOSEPH R. BIDEN', 'id': 'P80003338', 'office_sought': 'P'}, {'name': 'BIDEN, JOSEPH R JR', 'id': 'P80000722', 'office_sought': 'P'}, ...]
See below for an overview of all of the endpoints that have been implemented.
What has been implemented?
Below we go through each category (in the same way the openFEC does in their documentation) and describe the status of each.
-
candidate: use the
candidate()andcandidates()methods -
committee: use the
committee()andcommittees()methods -
dates: not implemented
-
financial: use the
financial()method -
search: use the
search()method -
filings: not implemented
-
receipts: use the
receipts()method -
disbursements: use the
disbursements()method -
loans: not implemented
-
debts: not implemented
-
independent expenditures: not implemented
-
party-coordinated expenditures: not implemented
-
communication cost: not implemented
-
electioneering: not implemented
-
presidential: not implemented
-
filer resources: not implemented
-
efiling: not implemented
-
audit: not implemented
-
legal: not implemented
More work will continue to be done, and contributions are always welcome!
Metadata
Release files for opynfec 0.0.4
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 |
|---|---|---|---|---|
| opynfec-0.0.4.tar.gz | 7.4 kB | Without provenance | Details for opynfec-0.0.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| opynfec-0.0.4-py3-none-any.whl | Python 3 | none | any | Details for opynfec-0.0.4-py3-none-any.whl |
Total release size: 14.2 kB
Release files / opynfec-0.0.4.tar.gz
| Download URL | opynfec-0.0.4.tar.gz |
|---|---|
| Size | 7.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2fedd488743836170971042de6768e9343f9a3ef9fc83cb91f41936ae22fecd6
|
|
BLAKE2b-256 checksum How to use checksums |
6290408a6909bd3744fd0fed096f27dd2888a4e719db485d7d7e24636b0482e3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
|
Release files / opynfec-0.0.4-py3-none-any.whl
| Download URL | opynfec-0.0.4-py3-none-any.whl |
|---|---|
| Size | 6.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c9a1618ff96c6bff6951848c5f1ff36b0ada863242fb23fdcea4757bc4192a03
|
|
BLAKE2b-256 checksum How to use checksums |
158b94c86f1492fbb339d4511d43b210637c4610af7b60628e5f8d2aa0e378bb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
|
Security for opynfec 0.0.4
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.