معرفی شرکت ها


alertapi-0.0.4


Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر

توضیحات

The Air Raid Alert API wrapper for Python3
ویژگی مقدار
سیستم عامل -
نام فایل alertapi-0.0.4
نام alertapi
نسخه کتابخانه 0.0.4
نگهدارنده []
ایمیل نگهدارنده []
نویسنده CrispCrow
ایمیل نویسنده minikslyh@gmail.com
آدرس صفحه اصلی https://github.com/CrispCrow/AlertAPI
آدرس اینترنتی https://pypi.org/project/alertapi/
مجوز MIT
<h1 align="center">AlertAPI</h1> <p> Async and static typed Air Raid Alert microframework for Python3. Python 3.8, 3.9 and 3.10 are currently supported. </p> ## Installation Install AlertAPI from PyPi with the following command: ```bash pip install alertapi ``` ---- ## Updating ```bash pip install --upgrade alertapi ``` ---- ## Start up basic client ```py import asyncio import alertapi async def main() -> None: client = alertapi.Client(access_token='...') print(await client.fetch_states()) loop = asyncio.get_event_loop() loop.run_until_complete(main()) ``` ---- ## Example ```py import asyncio import alertapi async def main() -> None: client = alertapi.Client(access_token='...') print('State list:', await client.fetch_states()) print('First 5 active alerts:', await client.fetch_states(with_alert=True, limit=5)) print('Inactive alerts:', await client.fetch_states(with_alert=False)) print('Kyiv info:', await client.fetch_state(25)) print('Kyiv info:', await client.fetch_state('Kyiv')) print('Is active alert in Lviv oblast:', await client.is_alert('Lviv oblast')) loop = asyncio.get_event_loop() loop.run_until_complete(main()) ``` ---- Or run GatewayClient ```py import alertapi client = alertapi.GatewayClient(access_token='...') @client.listen(alertapi.ClientConnectedEvent) async def on_client_connected(event: alertapi.ClientConnectedEvent) -> None: states = await event.app.fetch_states() print(states) @client.listen(alertapi.PingEvent) async def on_ping(event: alertapi.PingEvent) -> None: print('Ping event') @client.listen(alertapi.StateUpdateEvent) async def on_state_update(event: alertapi.StateUpdateEvent) -> None: print('State updated:', event.state) client.connect() ``` ---- ## Python optimization flags CPython provides two optimisation flags that remove internal safety checks that are useful for development, and change other internal settings in the interpreter. - python main.py - no optimisation - this is the default. - python -O main.py - first level optimisation - features such as internal assertions will be disabled. - python -OO main.py - second level optimisation - more features (**including all docstrings**) will be removed from the loaded code at runtime. **A minimum of first level of optimizations** is recommended when running applications in a production environment.


نیازمندی

مقدار نام
==21.4.0 attrs
==3.8.1 aiohttp
==0.2.1 aiohttp-sse-client


زبان مورد نیاز

مقدار نام
>=3.8 Python


نحوه نصب


نصب پکیج whl alertapi-0.0.4:

    pip install alertapi-0.0.4.whl


نصب پکیج tar.gz alertapi-0.0.4:

    pip install alertapi-0.0.4.tar.gz