Python library for alerts.in.ua API
Project description
Introduction
The Alerts.in.ua API Client is a Python library that simplifies access to the alerts.in.ua API service. This API provides real-time information about air raid alerts and other potential threats.
Installation
To install the Alerts.in.ua API Client, run the following command in your terminal:
pip install alerts_in_ua
Usage
⚠️ Before you can use this library, you need to obtain an API token by contacting api@alerts.in.ua.
Here's an example of how to use the library to get a list of active alerts:
Async:
import asyncio
from alerts_in_ua import AsyncClient
async def main():
# Initialize the client with your token
alerts_client = AsyncClient(token="your_token")
# Get the active alerts
active_alerts = await alerts_client.get_active_alerts()
print(active_alerts)
# Run the asynchronous function
asyncio.run(main())
or sync:
from alerts_in_ua import Client
alerts_client = Client(token="your_token")
# Get the active alerts
active_alerts = alerts_client.get_active_alerts()
print(active_alerts)
License
MIT 2023
Project details
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
File details
Details for the file alerts_in_ua-0.1.7-py3-none-any.whl
.
File metadata
- Download URL: alerts_in_ua-0.1.7-py3-none-any.whl
- Upload date:
- Size: 6.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a453b77521b7446f8dfe385c25320f63276d606e40d40f2f6fa6f8e17bafc810 |
|
MD5 | aa68fd9c90732227b48bd35e12839b7d |
|
BLAKE2b-256 | e799beb6d0debf901bf20823d582ff5f5d5b3b94617f9eacf5d82d57100d8d7c |