Python-SDK
安装
bash
pip install fastposterpip install fastposter示例代码
token 从应用中心获取
python
from fastposter import Client
client = Client('1f5aa8d75f2d4bc4')
params = {
'name': '中文测试'
}
client.buildPoster("ced9b1d5337d494c", params=params).save()from fastposter import Client
client = Client('1f5aa8d75f2d4bc4')
params = {
'name': '中文测试'
}
client.buildPoster("ced9b1d5337d494c", params=params).save()python
from fastposter import Client
client = Client('1f5aa8d75f2d4bc4', 'http://127.0.0.1:5000')
params = {
'name': '中文测试'
}
client.buildPoster("ced9b1d5337d494c", params=params).save()from fastposter import Client
client = Client('1f5aa8d75f2d4bc4', 'http://127.0.0.1:5000')
params = {
'name': '中文测试'
}
client.buildPoster("ced9b1d5337d494c", params=params).save()生成的海报图片

常见问题
安装失败
有时候国内镜像同步比较慢,使用官方地址即可
bash
pip install fastposter -i https://pypi.org/simplepip install fastposter -i https://pypi.org/simplebash
pip install fastposter -i https://pypi.tuna.tsinghua.edu.cn/simplepip install fastposter -i https://pypi.tuna.tsinghua.edu.cn/simplebash
pip install fastposter -i https://mirrors.aliyun.com/pypi/simplepip install fastposter -i https://mirrors.aliyun.com/pypi/simplebash
pip install fastposter -i https://pypi.douban.com/simplepip install fastposter -i https://pypi.douban.com/simple
fastposter官方文档