%global _empty_manifest_terminate_build 0 Name: python-messages Version: 0.8.0 Release: 1 Summary: Easy and efficient messaging. License: MIT URL: https://github.com/trp07/messages Source0: https://mirrors.nju.edu.cn/pypi/web/packages/ba/6d/6f05773d8d99638cfa2634a1408b416677ae5e95821718b2919566e6ddd1/messages-0.8.0.tar.gz BuildArch: noarch Requires: python3-validus Requires: python3-httpx Requires: python3-aiosmtplib %description # Messages: Create and send messages fast! [![](https://img.shields.io/badge/built%20with-Python3-red.svg)](https://www.python.org/) [![PyPI version](https://badge.fury.io/py/messages.svg)](https://badge.fury.io/py/messages) [![](https://app.travis-ci.com/HomeMadePy/messages.svg?branch=master)](https://app.travis-ci.com/github/HomeMadePy/messages) [![Coverage Status](https://coveralls.io/repos/github/HomeMadePy/messages/badge.svg?branch=master)](https://coveralls.io/github/HomeMadePy/messages?branch=master) [![](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/HomeMadePy/messages/blob/master/LICENSE) ![messages_words](https://user-images.githubusercontent.com/18299151/48576493-c0a68380-e925-11e8-9322-eb5bd67858a4.png) ## Purpose - **Messages** is a package designed to make sending messages easy and efficient! - **Messages** intends to be a _lightweight_ package with minimal dependencies. - **Messages** with a **consistent API** across all message types. - **Messages** includes **asynchronous** support for fast message handling. ## Installation **Python3 only** ```shell $ pip install messages ``` ## Documentation in the [Wiki](https://github.com/HomeMadePy/messages/wiki) ## Supported Messages * [Email](https://github.com/HomeMadePy/messages/wiki/Email) * [Telegram](https://github.com/HomeMadePy/messages/wiki/TelegramBot) * [Twilio](https://github.com/HomeMadePy/messages/wiki/Twilio) * [WhatsApp](https://github.com/HomeMadePy/messages/wiki/WhatsApp) * **Read the [Wiki](https://github.com/HomeMadePy/messages/wiki) for usage**. # Examples ### Synchronous Execution ```python3 # You can send messages right in the REPL >>> from messages import Email >>> >>> m = Email( from_ = "me@here.com", to = "you@there.com", auth = "p@ssw0rd", subject: "Good Advice" body = "Hello,\n\tBuy more Bitcoin!", attachments = ["./file1.txt", "~/Documents/file2.pdf"], ) >>> >>> m.send() Message sent... ``` ### Asynchronous Execution ```python3 # You can also send messages inside a script import asyncio from messages import Email RECIPIENTS = [ "you@mail.com", "him@mail.com", "her@mail.com", "doglover@mail.com", ] loop = asyncio.get_event_loop() for r in RECIPIENTS e = Email( from_ = "me@gmail.com", to = r, auth = "p@ssw0rd", subject = "Good Advice", body = "This is an asynchronous email.\nContinue buying more Bitcoin!", attachments = ["./file1.txt", "~/Documents/file2.pdf"], ) loop.create_task(e.send_async()) tasks = asyncio.all_tasks(loop=loop) group = asyncio.gather(*tasks) loop.run_until_complete(group) ``` ### **Read** the [Wiki](https://github.com/HomeMadePy/messages/wiki) for **more examples** ## Contributing Code * **Help Wanted!** * All contributions are welcome to build upon the package! * If it's a **message**, add it to messages! * Read the [Wiki](https://github.com/HomeMadePy/messages/wiki) for guidelines. %package -n python3-messages Summary: Easy and efficient messaging. Provides: python-messages BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-pip %description -n python3-messages # Messages: Create and send messages fast! [![](https://img.shields.io/badge/built%20with-Python3-red.svg)](https://www.python.org/) [![PyPI version](https://badge.fury.io/py/messages.svg)](https://badge.fury.io/py/messages) [![](https://app.travis-ci.com/HomeMadePy/messages.svg?branch=master)](https://app.travis-ci.com/github/HomeMadePy/messages) [![Coverage Status](https://coveralls.io/repos/github/HomeMadePy/messages/badge.svg?branch=master)](https://coveralls.io/github/HomeMadePy/messages?branch=master) [![](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/HomeMadePy/messages/blob/master/LICENSE) ![messages_words](https://user-images.githubusercontent.com/18299151/48576493-c0a68380-e925-11e8-9322-eb5bd67858a4.png) ## Purpose - **Messages** is a package designed to make sending messages easy and efficient! - **Messages** intends to be a _lightweight_ package with minimal dependencies. - **Messages** with a **consistent API** across all message types. - **Messages** includes **asynchronous** support for fast message handling. ## Installation **Python3 only** ```shell $ pip install messages ``` ## Documentation in the [Wiki](https://github.com/HomeMadePy/messages/wiki) ## Supported Messages * [Email](https://github.com/HomeMadePy/messages/wiki/Email) * [Telegram](https://github.com/HomeMadePy/messages/wiki/TelegramBot) * [Twilio](https://github.com/HomeMadePy/messages/wiki/Twilio) * [WhatsApp](https://github.com/HomeMadePy/messages/wiki/WhatsApp) * **Read the [Wiki](https://github.com/HomeMadePy/messages/wiki) for usage**. # Examples ### Synchronous Execution ```python3 # You can send messages right in the REPL >>> from messages import Email >>> >>> m = Email( from_ = "me@here.com", to = "you@there.com", auth = "p@ssw0rd", subject: "Good Advice" body = "Hello,\n\tBuy more Bitcoin!", attachments = ["./file1.txt", "~/Documents/file2.pdf"], ) >>> >>> m.send() Message sent... ``` ### Asynchronous Execution ```python3 # You can also send messages inside a script import asyncio from messages import Email RECIPIENTS = [ "you@mail.com", "him@mail.com", "her@mail.com", "doglover@mail.com", ] loop = asyncio.get_event_loop() for r in RECIPIENTS e = Email( from_ = "me@gmail.com", to = r, auth = "p@ssw0rd", subject = "Good Advice", body = "This is an asynchronous email.\nContinue buying more Bitcoin!", attachments = ["./file1.txt", "~/Documents/file2.pdf"], ) loop.create_task(e.send_async()) tasks = asyncio.all_tasks(loop=loop) group = asyncio.gather(*tasks) loop.run_until_complete(group) ``` ### **Read** the [Wiki](https://github.com/HomeMadePy/messages/wiki) for **more examples** ## Contributing Code * **Help Wanted!** * All contributions are welcome to build upon the package! * If it's a **message**, add it to messages! * Read the [Wiki](https://github.com/HomeMadePy/messages/wiki) for guidelines. %package help Summary: Development documents and examples for messages Provides: python3-messages-doc %description help # Messages: Create and send messages fast! [![](https://img.shields.io/badge/built%20with-Python3-red.svg)](https://www.python.org/) [![PyPI version](https://badge.fury.io/py/messages.svg)](https://badge.fury.io/py/messages) [![](https://app.travis-ci.com/HomeMadePy/messages.svg?branch=master)](https://app.travis-ci.com/github/HomeMadePy/messages) [![Coverage Status](https://coveralls.io/repos/github/HomeMadePy/messages/badge.svg?branch=master)](https://coveralls.io/github/HomeMadePy/messages?branch=master) [![](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/HomeMadePy/messages/blob/master/LICENSE) ![messages_words](https://user-images.githubusercontent.com/18299151/48576493-c0a68380-e925-11e8-9322-eb5bd67858a4.png) ## Purpose - **Messages** is a package designed to make sending messages easy and efficient! - **Messages** intends to be a _lightweight_ package with minimal dependencies. - **Messages** with a **consistent API** across all message types. - **Messages** includes **asynchronous** support for fast message handling. ## Installation **Python3 only** ```shell $ pip install messages ``` ## Documentation in the [Wiki](https://github.com/HomeMadePy/messages/wiki) ## Supported Messages * [Email](https://github.com/HomeMadePy/messages/wiki/Email) * [Telegram](https://github.com/HomeMadePy/messages/wiki/TelegramBot) * [Twilio](https://github.com/HomeMadePy/messages/wiki/Twilio) * [WhatsApp](https://github.com/HomeMadePy/messages/wiki/WhatsApp) * **Read the [Wiki](https://github.com/HomeMadePy/messages/wiki) for usage**. # Examples ### Synchronous Execution ```python3 # You can send messages right in the REPL >>> from messages import Email >>> >>> m = Email( from_ = "me@here.com", to = "you@there.com", auth = "p@ssw0rd", subject: "Good Advice" body = "Hello,\n\tBuy more Bitcoin!", attachments = ["./file1.txt", "~/Documents/file2.pdf"], ) >>> >>> m.send() Message sent... ``` ### Asynchronous Execution ```python3 # You can also send messages inside a script import asyncio from messages import Email RECIPIENTS = [ "you@mail.com", "him@mail.com", "her@mail.com", "doglover@mail.com", ] loop = asyncio.get_event_loop() for r in RECIPIENTS e = Email( from_ = "me@gmail.com", to = r, auth = "p@ssw0rd", subject = "Good Advice", body = "This is an asynchronous email.\nContinue buying more Bitcoin!", attachments = ["./file1.txt", "~/Documents/file2.pdf"], ) loop.create_task(e.send_async()) tasks = asyncio.all_tasks(loop=loop) group = asyncio.gather(*tasks) loop.run_until_complete(group) ``` ### **Read** the [Wiki](https://github.com/HomeMadePy/messages/wiki) for **more examples** ## Contributing Code * **Help Wanted!** * All contributions are welcome to build upon the package! * If it's a **message**, add it to messages! * Read the [Wiki](https://github.com/HomeMadePy/messages/wiki) for guidelines. %prep %autosetup -n messages-0.8.0 %build %py3_build %install %py3_install install -d -m755 %{buildroot}/%{_pkgdocdir} if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi pushd %{buildroot} if [ -d usr/lib ]; then find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/lib64 ]; then find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/bin ]; then find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/sbin ]; then find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst fi touch doclist.lst if [ -d usr/share/man ]; then find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst fi popd mv %{buildroot}/filelist.lst . mv %{buildroot}/doclist.lst . %files -n python3-messages -f filelist.lst %dir %{python3_sitelib}/* %files help -f doclist.lst %{_docdir}/* %changelog * Fri May 05 2023 Python_Bot - 0.8.0-1 - Package Spec generated