图床上传工具
Project description
介绍
在上传图片的时候, 经常会用到图床功能.
此工具聚合了一些常用的图床, 以便于快速使用. 免费图床大部分都不支持定义文件名称
使用
安装:
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)
当前支持的上传
- 公共图床
CatBox
- 网站
Ai58
: 58同城客服系统
其他
如果你有其他优秀的图床推荐, 欢迎提交isuse
或PR
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.1.0.tar.gz
(4.6 kB
view details)
Built Distribution
File details
Details for the file image_depot-0.1.0.tar.gz
.
File metadata
- Download URL: image_depot-0.1.0.tar.gz
- Upload date:
- Size: 4.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8ebea6b1aebabc78a1a3293db52424980d91531d8e709fedc94b3c43b5a7fc4e |
|
MD5 | c044a862b17298d70eb61dc8944eaa12 |
|
BLAKE2b-256 | 4f788a6bbee9f603e890ff778bceb267f7b881ba8a5a2d4a9bd7f3dacd109791 |
File details
Details for the file image_depot-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: image_depot-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.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 | b94adf9ea4e6cdf00aa7e95e9056143a08a21868b30b4db56f4e12cf6edb5470 |
|
MD5 | bca385e93906b3065615250166330de8 |
|
BLAKE2b-256 | b127f74d2d95f8dab08238bf0b66d5f74d94ae1041a69420505880620cb0eb85 |