Skip to main content

Une bibliothèque Python pour interagir avec l'API de Newswacafi.

Project description

Newswacafi

Description

NEWSwacafi est une initiative innovante destinée à fournir aux décideurs et analystes une compréhension approfondie des dynamiques au Sahel. En exploitant la puissance du web scraping et des analyses de données avancées, notre plateforme offre des insights précieux pour anticiper les tensions et conflits.

Cette librairie permet d'exploiter l'API de Newswacafi avec Python.

Installation

pip install newswacafi

Utilisation

from newswacafi.api import NewswacafiClient
from datetime import date

client = NewswacafiClient(
    api_key="6a07a7ee-***-b4504ebc0e68",
    api_secret="pbkdf2_sha256$6000***+g1R2MDOzS/QMoJstT6bWZTTVTcQlQ3cc="
)

news = client.get_news(
    start_date=date(2024, 1, 1), 
    end_date=date(2024, 2, 1), 
    country=['bf', 'ne'], 
    category=['politique'], 
    source=['lefaso.net', 'levenementniger.com']
)

print(news.data[0].title)

License

MIT

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

newswacafi-0.4.tar.gz (2.9 kB view details)

Uploaded Source

File details

Details for the file newswacafi-0.4.tar.gz.

File metadata

  • Download URL: newswacafi-0.4.tar.gz
  • Upload date:
  • Size: 2.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.7

File hashes

Hashes for newswacafi-0.4.tar.gz
Algorithm Hash digest
SHA256 8268f090aab656dcc188c410ae8b3e3a86f50209ba66116d9040011f902056fb
MD5 cb17a9f31848025c6c0c6a20dba2b682
BLAKE2b-256 46c9e9a234060ea5f9718f437f3768bc4dbecef66c9405e0fc8c88ee7873eab3

See more details on using hashes here.

Supported by

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