图床上传工具
Project description
介绍
在上传图片的时候, 经常会用到图床功能.
此工具聚合了一些常用的图床, 以便于快速使用. 免费图床大部分都不支持定义文件名称
说明
因为使用各种免费服务, 稳定性无法保证
若各位在使用过程中碰到问题, 欢迎下列任选一种方式补充:
- 提交
isuse
说明问题 - 将问题写到
DepotType
的对应文档上
如果你有其他优秀的图床推荐, 欢迎提交isuse
或PR
当前支持的所有图床, 可查看文件DepotType
使用
安装:
pip install image-depot
from image_depot import image_depot, DepotType
# 选择图床对象
d = image_depot(DepotType.CatBox)
# 上传图片. 二进制内容
image_content = ''
image_url = d.upload(image_content)
if not image_url: # 图片上传失败, 获取失败原因
print(d.error())
# 上传图片, 使用本地文件路径
file_path = ''
image_url = d.upload_file(file_path)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
image_depot-0.2.0.tar.gz
(5.1 kB
view details)
Built Distribution
File details
Details for the file image_depot-0.2.0.tar.gz
.
File metadata
- Download URL: image_depot-0.2.0.tar.gz
- Upload date:
- Size: 5.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ec80acb5d628df67df927eb93b187825281d50385b5c456102bd02ba8251a771 |
|
MD5 | d3c19304d3cf726a1372ee54f1535a0d |
|
BLAKE2b-256 | 612c2fba3af5ad70e7964fb6f16d3238a42b4ac36bffe87e674da7e466525313 |
File details
Details for the file image_depot-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: image_depot-0.2.0-py3-none-any.whl
- Upload date:
- Size: 8.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0add71f7f12aea357e612caba16095ed9add254c4ce2ad5514c15266fe514619 |
|
MD5 | 3ece0222798cd90c1f62109f15939fc1 |
|
BLAKE2b-256 | 5e4df4b17b200a8c2ffe5c1d6e241003ca1cb4d0d82a96e73efa5ec94c188dc9 |