图床上传工具
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.3.0.tar.gz
(5.2 kB
view details)
Built Distribution
File details
Details for the file image_depot-0.3.0.tar.gz
.
File metadata
- Download URL: image_depot-0.3.0.tar.gz
- Upload date:
- Size: 5.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a0f009d9c8f133857cc440f20e7d8d01077d7a2ff2f0027e7a231b07e4c7a84a |
|
MD5 | 4315437556f6dc0c7900bec263606f60 |
|
BLAKE2b-256 | f7573d6e333623b14c4da78d5d881c6e00c09b6a8012d31d71364fdc13ceb4c0 |
File details
Details for the file image_depot-0.3.0-py3-none-any.whl
.
File metadata
- Download URL: image_depot-0.3.0-py3-none-any.whl
- Upload date:
- Size: 9.1 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 | 194a8b7ad24a98a11bc3cf26c94e2336c73de998743f64eb39af37a654201b20 |
|
MD5 | 0081351150193b671e8a6caa80894825 |
|
BLAKE2b-256 | ec60033e171ef3c75903bdfd41043970d0c618fa7fce06ff3e94f26ddda99a13 |