Python SDK for AskNews
Project description
AskNews Python SDk
Python SDK for the AskNews API.
Installation
pip install asknews
Usage
import asyncio
from asknews_sdk import AskNewsSDK
async def main():
async with AskNewsSDK(
client_id="your_client_id",
client_secret="your_client_secret",
scopes=["chat", "news", "stories"],
) as sdk:
response = await sdk.stories.get_stories(query="covid", n_stories=50, method="nl")
print(response)
response = await sdk.news.search_news(query="covid", n_articles=50, method="nl")
print(response)
if __name__ == "__main__":
asyncio.run(main())
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
asknews-0.3.9-py3-none-any.whl
(17.4 kB
view hashes)