[![PyPi Version](https://img.shields.io/pypi/v/alexflipnote.py.svg)](https://pypi.python.org/pypi/alexflipnote.py/)
[![Downloads](https://pepy.tech/badge/alexflipnote-py)](https://pepy.tech/project/alexflipnote-py)
[![MIT License](https://img.shields.io/apm/l/atomic-design-ui.svg?)](https://github.com/tterb/atomic-design-ui/blob/master/LICENSEs)
# Alexflipnote.py
An easy to use Python Wrapper for the AlexFlipnote API
# Requirements
- Python 3.6 or above
- aiohttp (python3 -m pip install -U aiohttp)
- url_regex (python3 -m pip install -U url_regex)
# installation
### Using pip (recommended):
Install the package by doing one of the following commands:
- `pip install alexflipnote.py`
- `python -m pip -U install alexflipnote.py`
# Documentation
---
See the full and detailed [docs here](https://github.com/Soheab/alexflipnote.py/blob/master/docs.md)
# Examples
#### Get a random cat pic:
```py
import alexflipnote
afa = alexflipnote.Client()
print(await afa.cats())
>>> https://api.alexflipnote.dev/cats/grRlHyi-AL8_cats.jpg
```
#### Make a custom supreme logo:
```py
import alexflipnote
afa = alexflipnote.Client()
print(await afa.supreme("#some text, yes", dark=True)) # making it dark, there is also light option.
>>> https://api.alexflipnote.dev/supreme?text=%23some%20text,%20yes&dark=true
```
#### Minecraft achievement using [discord.py](https://github.com/Rapptz/discord.py)
```py
import alexflipnote
from typing import Union
# just a example, alexflipnote client doesn't have to be under bot.
bot = commands.Bot(command_prefix="!")
alex_api = alexflipnote.Client()
@bot.command()
async def achievement(ctx, text, icon: Union[int, str] = None):
achivement = await alex_api.achievement(text=text, icon=icon)
achivement_bytes = await achivement.read() # BytesIO
await ctx.send(f"Rendered by {ctx.author}",
file=discord.File(achivement_bytes, filename="achievement.png")
)
# we did a Union[int, str] since the wrapper accepts a number or string for the icon,
see the icon section in docs to see what it accepts.
# invoke: !achievement "nice job!" diamond_sword
bot.run("TOKEN")
```
# Made by
This wrapper is made Soheab_#6240, contact me for anything related to this wrapper.
You can join my discord [server here](https://discord.gg/yCzcfju) or
AlexFlipnote's [server here](https://discord.gg/alexflipnote) (recommended)
Please report any bugs in the servers above or dm.
Suggestions are also welcome.
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
共13个文件
py:5个
txt:4个
pkg-info:2个
资源分类:Python库 所属语言:Python 资源全名:alexflipnote.py-1.2.6.tar.gz 资源来源:官方 安装方法:https://lanzao.blog.csdn.net/article/details/101784059
资源推荐
资源详情
资源评论
收起资源包目录
alexflipnote.py-1.2.6.tar.gz (13个子文件)
alexflipnote.py-1.2.6
PKG-INFO 4KB
alexflipnote
classes.py 4KB
http.py 853B
client.py 11KB
__init__.py 116B
alexflipnote.py.egg-info
PKG-INFO 4KB
requires.txt 18B
SOURCES.txt 305B
top_level.txt 13B
dependency_links.txt 1B
setup.cfg 38B
setup.py 616B
README.md 2KB
共 13 条
- 1
资源评论
挣扎的蓝藻
- 粉丝: 13w+
- 资源: 15万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功