Skip to main content

Add your description here

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底层api
pip install git+https://github.com/Leon406/lanzou-gui.git --no-deps

登录需要额外两个参数

3.2 OSS

额外安装oss的库OSS2
pip install oss2

登录需要参数

3.3 github

3.4 gitee

3.5 百度网盘

3.6 阿里云盘

#参考 百度云盘的 python-api,官方 API
蓝奏云的 python-api 参考

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.2.26.tar.gz (27.6 kB view details)

Uploaded Source

Built Distribution

fundrive-1.2.26-py3-none-any.whl (34.0 kB view details)

Uploaded Python 3

File details

Details for the file fundrive-1.2.26.tar.gz.

File metadata

  • Download URL: fundrive-1.2.26.tar.gz
  • Upload date:
  • Size: 27.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.1

File hashes

Hashes for fundrive-1.2.26.tar.gz
Algorithm Hash digest
SHA256 9cbb15b836fc25b2b24a9eba796228c6079307fe44d357e3cc1fc08472c8cb24
MD5 5d0c605408c94a9c56e510d75a222f4e
BLAKE2b-256 d88bd0b2bb4bfe71d92bb9d46a3bc845c92aca47855565a4c223aff81ac7a94b

See more details on using hashes here.

File details

Details for the file fundrive-1.2.26-py3-none-any.whl.

File metadata

File hashes

Hashes for fundrive-1.2.26-py3-none-any.whl
Algorithm Hash digest
SHA256 c7c8bb02da2e70255545969abfbbbe33d2c64367a234bb4ae4fa088fdf2a30c0
MD5 b76e7842673fdcefd166e970b2c6f106
BLAKE2b-256 9df67573516a0e1de40e74d0cb32162ae416a81a1ca1bba92507a11f7746a021

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page