No project description provided
Project description
1.支持列表
序号 | 网盘 | 支持内容 |
---|---|---|
1 | 蓝奏云 | 上传/下载/删除 |
2 | OSS | 上传/下载/删除 |
3 | github | 上传/下载/删除 |
4 | gitee | 上传/下载/删除 |
5 | 百度网盘 | TODO |
6 | 阿里云盘 | TODO |
2.安装
pip install fundrive
或者直接从 gitHub 安装
pip install git+https://github.com/farfarfun/fundrive.git
或者直接从 gitee 安装
pip install git+https://gitee.com/farfarfun/fundrive.git
3 使用说明
- 所有的 drive 都是继承基类,实现登录、上传、下载、删除
- 每个 drive 的函数返回没有做统计,使用需注意
- 部分 drive 需要安装额外的库,不装也行,直接使用时会尝试 import,import 失败会自动安装
这是基类
class DriveSystem:
def __init__(self, *args, **kwargs):
pass
def login(self, *args, **kwargs) -> bool:
raise NotImplementedError()
def mkdir(self, path, *args, **kwargs) -> bool:
raise NotImplementedError()
def delete(self, *args, **kwargs) -> bool:
raise NotImplementedError()
def get_file_list(self, *args, **kwargs) -> List[Dict[str, Any]]:
raise NotImplementedError()
def get_dir_list(self, *args, **kwargs) -> List[Dict[str, Any]]:
raise NotImplementedError()
def get_file_info(self, *args, **kwargs) -> Dict[str, Any]:
raise NotImplementedError()
def get_dir_info(self, *args, **kwargs) -> Dict[str, Any]:
raise NotImplementedError()
def download_file(self, dir_path="./cache", overwrite=False, *args, **kwargs) -> bool:
raise NotImplementedError()
def download_dir(self, dir_path="./cache", overwrite=False, *args, **kwargs) -> bool:
raise NotImplementedError()
def upload_file(self, file_path="./cache", overwrite=False, *args, **kwargs) -> bool:
raise NotImplementedError()
def upload_dir(self, dir_path="./cache", overwrite=False, *args, **kwargs) -> bool:
raise NotImplementedError()
3.1 蓝奏云
# 蓝奏云 额外安装lanzou底层apipip install git+https://github.com/Leon406/lanzou-gui.git --no-deps
登录需要额外两个参数
3.2 OSS
额外安装oss的库OSS2pip install oss2
登录需要参数
3.3 github
3.4 gitee
3.5 百度网盘
3.6 阿里云盘
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
fundrive-1.0.24.tar.gz
(101.5 kB
view hashes)
Built Distribution
fundrive-1.0.24-py3-none-any.whl
(126.8 kB
view hashes)
Close
Hashes for fundrive-1.0.24-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0efb2b7a8bad02080a8e27ccd9a3c20132a820875ee4db6e50e256094ab347c5 |
|
MD5 | 4bcea04e085d271b71a969ce4bb78a92 |
|
BLAKE2b-256 | 8d55c9f6c6c19729e0d8a50763e4926b6949a0e4e3a474aaf8a754aff8ad29a0 |