Skip to main content

NewsDash is a fast and reliable Python wrapper for the News API that simplifies accessing the latest news articles from around the world.

Project description

NewsDash

NewsDash

Python 3.9-3.11 License: MIT Code style: black GitHub stars GitHub last commit


NewsDash is a fast and reliable Python wrapper for the News API that simplifies accessing the latest news articles from around the world. 📰


Made by: NaviTheCoderboi



!!! note "Note" This is a WIP library, please report bugs if you find one


Features

  • Fast performance: This API wrapper is designed to be fast and efficient, allowing users to retrieve news articles quickly and easily.
  • Reliable functionality: The wrapper uses best practices to ensure reliable functionality and accuracy in retrieving news articles from the API.
  • Easy-to-use interface: The API wrapper has an intuitive interface that makes it easy for developers to interact with the API and retrieve news articles without having to worry about the details of the underlying protocol.
  • Built with aiohttp: The wrapper is built using the popular aiohttp library, which provides high-performance asynchronous HTTP client/server for asyncio and Python. This means the wrapper takes advantage of the latest and greatest in async programming techniques to provide fast and efficient performance.
  • Customizable functionality: The wrapper has a range of customization options, allowing developers to tailor their use of the API to their specific needs.
  • Flexible data handling: The wrapper is designed to handle a wide variety of data formats, allowing developers to work with the data in the way that best suits their needs.
  • Well-documented: The wrapper has clear and comprehensive documentation, making it easy for developers to get up and running quickly and troubleshoot any issues that may arise.

Installation

python -m pip install newsdash

Examples

  • with client
from newsdash import NewsDash
import asyncio

cl = NewsDash("your_api_key")
async def get_news():
  print(await cl.get_everything(query="tech",pageSize=5))
  print(await cl.get_top_headlines(query="Microsoft"))
  print(await cl.get_sources(country="in",language="en"))

asyncio.run(get_news())
  • with async context manager
from newsdash import NewsDash
import asyncio

async def main():
  async with NewsDash("api_key") as nd:
    print(await nd.get_everything(query="apple"))

asyncio.run(main())

Important urls

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

newsdash-0.1.1a0.tar.gz (8.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

newsdash-0.1.1a0-py3-none-any.whl (8.3 kB view details)

Uploaded Python 3

File details

Details for the file newsdash-0.1.1a0.tar.gz.

File metadata

  • Download URL: newsdash-0.1.1a0.tar.gz
  • Upload date:
  • Size: 8.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.2 CPython/3.11.3 Linux/5.15.0-1036-azure

File hashes

Hashes for newsdash-0.1.1a0.tar.gz
Algorithm Hash digest
SHA256 d87c874deba219af784ed0fc0e7565179541ee73f75b50305db4c6ee6a4c7f29
MD5 f42967760c8103eae11d242dfb814e48
BLAKE2b-256 8e812cd45195d0909440e05f984b2b33a88bedf16d75e858aa06f81efd668e62

See more details on using hashes here.

File details

Details for the file newsdash-0.1.1a0-py3-none-any.whl.

File metadata

  • Download URL: newsdash-0.1.1a0-py3-none-any.whl
  • Upload date:
  • Size: 8.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.2 CPython/3.11.3 Linux/5.15.0-1036-azure

File hashes

Hashes for newsdash-0.1.1a0-py3-none-any.whl
Algorithm Hash digest
SHA256 3478665bc0798b80021a56c46bc864d415b70e960962d2325edbe518c7c4fb7d
MD5 bf8b68b7eb260ba6f691b2cc8e58d3e5
BLAKE2b-256 a9ba050264dd5ca1fcbbe40ba27e8aa1672689ec8cfb5c718c9b9b6ab534218b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page