Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
A minimalist Python wrapper for the Perigon News API. Currently only supports querying all news articles via the v1/all
endpoint.
Installation (currently, only tested for Python 3.11):
pip install perigon-api-wrapper
To initialize the API, import the package and add your API key:
from perigon_api_wrapper import PerigonAPI
# specify your credentials:
api_key = '...'
# initialize API:
api = PerigonAPI(api_key=api_key)
The main method is get_articles()
, which takes the following arguments:
paginate [bool = True]
: Whether or not to paginate results (if multiple pages are available). Defaults to True
.size [int = 100]
: The number of results to return per page. Defaults to 100
(maximum allowed by Perigon).**kwargs
: Arbitrary keyword arguments supported by the Perigon API. Consult the API docs for a comprehensive list of parameters.get_articles()
returns a list of dictionaries, where each dictionary is the JSON of an individual article.
Example:
# speciy **kwargs (recommend dict format):
payload = {
'content': 'olympics AND usa AND gold',
'from': '2024-07-26',
'to': '2024-08-08',
'language': 'en',
'exclude_labels': [
'Non-news',
'Opinion',
'Face Check',
'Roundup',
'Low Content'
]
}
# get results, using payload as **kwargs:
results = api.get_articles(paginate=False, size=100, **payload)
FAQs
A minimalist Python wrapper for the Perigon News API.
We found that perigon-api-wrapper demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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.
Security News
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.