
Security News
npm Adopts OIDC for Trusted Publishing in CI/CD Workflows
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
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
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.