Skip to main content

PikudHaoref.py


Documentation

An unofficial API wrapper for Pikud Haoref's rocket API written in python.
The documentation is not done yet.

Credits

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.

python -m pip install pikudhaoref.py

Examples

Siren detector example

from datetime import datetime

import 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

Metadata

Release files for pikudhaoref.py 0.0.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pikudhaoref.py 0.0.8
File Size Uploaded
pikudhaoref.py-0.0.8.tar.gz 11.8 kB Details

Release files / pikudhaoref.py-0.0.8.tar.gz

Download URL pikudhaoref.py-0.0.8.tar.gz
Size 11.8 kB
Tags Source
SHA-256 checksum
How to use checksums
77e2d82fa919d345d829ab8c1d286e9f9597496c469761ff7bbaced39f560d7e
BLAKE2b-256 checksum
How to use checksums
6cafddee6dd26d586c4533c102de881e58e1d566c37cf3d465dc9d2bc1fb18fa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.6.0 pkginfo/1.7.0 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.8.6

Release history Release notifications | RSS feed

This release

0.0.8 This release

1 release file

0.0.7

1 release file

0.0.6

1 release file

0.0.5

1 release file

0.0.4

1 release file

0.0.3

1 release file

0.0.2

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page