
Research
/Security News
Toptal’s GitHub Organization Hijacked: 10 Malicious Packages Published
Threat actors hijacked Toptal’s GitHub org, publishing npm packages with malicious payloads that steal tokens and attempt to wipe victim systems.
.. image:: https://readthedocs.org/projects/fec-filing-iterator/badge/?version=latest :target: https://fec-filing-iterator.readthedocs.io/en/latest/?badge=latest :alt: Documentation Status
fec-filing-iterator
provides a simple interface for iterating through
results from the Federal Election Commission's API <https://api.open.fec.gov/developers>
_ as a single, lazily evaluated stream.
The FEC's API provides access to a wealth of data on where candidates and
committees get their funds, what they spend them on, and more. This library
simply tries to make the API easier to work with in Python.
In order to use this library you will first need to get a data.gov <https://www.data.gov/>
_ API key, which you can request here <https://api.data.gov/signup/>
. Once you get an API key you will be allowed to
make 1,000 requests to the FEC API per hour. If you want more throughput you
can request that your key be upgraded to be allowed to make 120 calls per
minute by emailing APIinfo@fec.gov <mailto:apiinfo@fec.gov>
and asking
nicely.
Next, you'll have to install the library::
pip install fec-filing-iterator
Now you're all set to start exploring campaign finance data! For example::
import json from fec_filing_iterator import schedules
api_key = '<YOUR_DATA_DOT_GOV_API_KEY>'
params = { 'two_year_transaction_period': 2020, 'committee_id': 'C00696948', }
for filing in schedules('a', api_key=api_key, params=params): print(json.dumps(filing, indent=4))
This library only tries to provide an easy way to access and iterate through
the paginated results returned by the FEC API. It does not currently attempt
to provide a full and consistent interface for retrieving arbitrary subsets of
information from the API. Lots of powerful searches and queries can be
parameterized through the API, but we leave it up to you to read the FEC's documentation <https://api.open.fec.gov/developers>
_ and find the appropriate
parameters yourself.
The main workhorse of the library is the FilingIterator <https://fec-filing-iterator.readthedocs.io/en/latest/code.html#module-fec_filing_iterator.filing_iterator>
_
class. Construct it with API credentials, an API endpoint to iterate over, and
whatever parameters you want, and you can treat the full set of records as one
big iterable.
The library also provides several handy factory functions that will construct
the FilingIterator
object and configure it for the appropriate endpoint.
FAQs
Utility to iterate over FEC filings through the FEC API
We found that fec-filing-iterator demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
/Security News
Threat actors hijacked Toptal’s GitHub org, publishing npm packages with malicious payloads that steal tokens and attempt to wipe victim systems.
Research
/Security News
Socket researchers investigate 4 malicious npm and PyPI packages with 56,000+ downloads that install surveillance malware.
Security News
The ongoing npm phishing campaign escalates as attackers hijack the popular 'is' package, embedding malware in multiple versions.