Skip to main content

Newsdata Python Client

Project description

newsdata-client

Python client for Newsdata API

Installation

Install using pip:

pip install newsdata-client

Usage

Import the client class into your project, and initialize using the api_key.

from newsdata_client import NewsDataClient

news_client = NewsDataClient(api_key="pub_XXXXXXXXXXX")

Endpoints

There are four endpoint functions you can use. You can add keyword arguments for parameters you like. You can read this for more detail on the parameters available for all the endpoints

# Latest news endpoint
response = news_client.latest() 

# Crypto related news endpoint
response = news_client.crypto()

# News archive endpoint, for this endpoint you will have to
# give atleast one parameter, otherwise it will raise NewsDataException
response = news_client.archive(category=["technology"])

# News sources endpoint
response = news_client.sources()

License

This project in under MIT License

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

newsdata_client-0.1.0.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

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

newsdata_client-0.1.0-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

Details for the file newsdata_client-0.1.0.tar.gz.

File metadata

  • Download URL: newsdata_client-0.1.0.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.17

File hashes

Hashes for newsdata_client-0.1.0.tar.gz
Algorithm Hash digest
SHA256 b8e841de2c3e03712327d4dfae198d11bd334e508c934f60bfcf9e68d1d4d7bd
MD5 108126c647e7112d5b849a2fc2312377
BLAKE2b-256 8a03fdc55a68df58998a10f204a4626e69200d298d6df93c03070ddb24ae49f5

See more details on using hashes here.

File details

Details for the file newsdata_client-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for newsdata_client-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f27b9f6630f48bb6ef5d800e59254c6e844ed5bff182010854a06a83593edb1c
MD5 70a4de2aca29dcb74c1beda91a3de4ed
BLAKE2b-256 01fd428747f3f7823ae1c656f8c6e7220f1fe8ae45280d998f108d6656280d93

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