Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/adam757521/pikudhaoref.py
An API wrapper for Pikud Haoref's unofficial rocket API written in python.
https://github.com/adam757521/pikudhaoref.py
api pikudhaoref python rocket wrapper
Last synced: 2 months ago
JSON representation
An API wrapper for Pikud Haoref's unofficial rocket API written in python.
- Host: GitHub
- URL: https://github.com/adam757521/pikudhaoref.py
- Owner: adam757521
- License: mit
- Created: 2021-08-26T06:08:13.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2023-01-27T13:33:41.000Z (almost 2 years ago)
- Last Synced: 2024-10-11T11:49:49.448Z (3 months ago)
- Topics: api, pikudhaoref, python, rocket, wrapper
- Language: Python
- Homepage:
- Size: 114 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
PikudHaoref.py
An unofficial API wrapper for Pikud Haoref's rocket API written in python.
The documentation is not done yet.Credits
-------------
- [HoshenKadosh](https://github.com/HoshenKadosh/) for pikudhaoref API help.Features
-------------- Very easy to use and user-friendly.
- Object Oriented.
- Detect sirens in real time.
- View city data (zone, name, countdown, location).
- Supports many languages (English, Russian, Hebrew, Spanish, Arabic).
- Both sync and async support.
(MORE COMING SOON)**The pikudhaoref API is only accessible from Israel.**
Installation
--------------Installing pikudhaoref.py is very easy.
```sh
python -m pip install pikudhaoref.py
```Examples
--------------### Siren detector example ###
```py
from datetime import datetimeimport pikudhaoref
client = pikudhaoref.SyncClient(update_interval=2)
history_range = client.get_history(
date_range=pikudhaoref.Range(datetime(year=2014, month=7, day=24), datetime.now())
)
history_month = client.get_history(mode=pikudhaoref.HistoryMode.LAST_MONTH)print(history_month)
print(history_range)
# The get_history method does not create a city object as it might take a long time.
# In case you need the city information, you can use the get_city method.print(client.current_sirens)
# The current_sirens property returns the list of current sirens, and gets the city automatically.@client.event()
def on_siren(sirens):
print(f"Siren alert! started sirens: {sirens}")@client.event()
def on_siren_end(sirens):
print(f"Sirens {sirens} have ended.")while True:
pass # To make sure the script doesnt stop
```TODO
--------------- None
Known Issues
--------------- None
**Incase you do find bugs, please create an issue or a PR.**
Support
--------------- **[Documentation](#)**