%global _empty_manifest_terminate_build 0 Name: python-telegraph Version: 2.2.0 Release: 1 Summary: Telegraph API wrapper License: MIT URL: https://github.com/python273/telegraph Source0: https://mirrors.nju.edu.cn/pypi/web/packages/49/81/1c9f99004e23555fb21b80a2ef6ddbecb3a7a4eefbc4aac75ffb5a9ccf71/telegraph-2.2.0.tar.gz BuildArch: noarch Requires: python3-requests Requires: python3-httpx %description # Telegraph [![PyPI](https://img.shields.io/pypi/v/telegraph.svg)](https://pypi.python.org/pypi/telegraph) ![Python Versions](https://img.shields.io/pypi/pyversions/telegraph.svg) ![License](https://img.shields.io/github/license/python273/telegraph.svg) Python Telegraph API wrapper - [Documentation](https://python-telegraph.readthedocs.io/en/latest/) ```bash $ python3 -m pip install telegraph # with asyncio support $ python3 -m pip install 'telegraph[aio]' ``` ## Example ```python from telegraph import Telegraph telegraph = Telegraph() telegraph.create_account(short_name='1337') response = telegraph.create_page( 'Hey', html_content='

Hello, world!

' ) print(response['url']) ``` ## Async Example ```python import asyncio from telegraph.aio import Telegraph async def main(): telegraph = Telegraph() print(await telegraph.create_account(short_name='1337')) response = await telegraph.create_page( 'Hey', html_content='

Hello, world!

', ) print(response['url']) asyncio.run(main()) ``` %package -n python3-telegraph Summary: Telegraph API wrapper Provides: python-telegraph BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-pip %description -n python3-telegraph # Telegraph [![PyPI](https://img.shields.io/pypi/v/telegraph.svg)](https://pypi.python.org/pypi/telegraph) ![Python Versions](https://img.shields.io/pypi/pyversions/telegraph.svg) ![License](https://img.shields.io/github/license/python273/telegraph.svg) Python Telegraph API wrapper - [Documentation](https://python-telegraph.readthedocs.io/en/latest/) ```bash $ python3 -m pip install telegraph # with asyncio support $ python3 -m pip install 'telegraph[aio]' ``` ## Example ```python from telegraph import Telegraph telegraph = Telegraph() telegraph.create_account(short_name='1337') response = telegraph.create_page( 'Hey', html_content='

Hello, world!

' ) print(response['url']) ``` ## Async Example ```python import asyncio from telegraph.aio import Telegraph async def main(): telegraph = Telegraph() print(await telegraph.create_account(short_name='1337')) response = await telegraph.create_page( 'Hey', html_content='

Hello, world!

', ) print(response['url']) asyncio.run(main()) ``` %package help Summary: Development documents and examples for telegraph Provides: python3-telegraph-doc %description help # Telegraph [![PyPI](https://img.shields.io/pypi/v/telegraph.svg)](https://pypi.python.org/pypi/telegraph) ![Python Versions](https://img.shields.io/pypi/pyversions/telegraph.svg) ![License](https://img.shields.io/github/license/python273/telegraph.svg) Python Telegraph API wrapper - [Documentation](https://python-telegraph.readthedocs.io/en/latest/) ```bash $ python3 -m pip install telegraph # with asyncio support $ python3 -m pip install 'telegraph[aio]' ``` ## Example ```python from telegraph import Telegraph telegraph = Telegraph() telegraph.create_account(short_name='1337') response = telegraph.create_page( 'Hey', html_content='

Hello, world!

' ) print(response['url']) ``` ## Async Example ```python import asyncio from telegraph.aio import Telegraph async def main(): telegraph = Telegraph() print(await telegraph.create_account(short_name='1337')) response = await telegraph.create_page( 'Hey', html_content='

Hello, world!

', ) print(response['url']) asyncio.run(main()) ``` %prep %autosetup -n telegraph-2.2.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-telegraph -f filelist.lst %dir %{python3_sitelib}/* %files help -f doclist.lst %{_docdir}/* %changelog * Fri Apr 21 2023 Python_Bot - 2.2.0-1 - Package Spec generated