Skip to main content

An unofficial CLI tool and higher-level Python API client for 115.com cloud storage service

Project description

115cli

PyPI version test codecov

An unofficial CLI tool and Python library for 115.com cloud storage. It provides a command-line interface for common file operations and a higher-level Python API client that can be used as a library in your own code.

Read disclaimer carefully before using this tool.

中文版 README

Installation

pip install 115cli

Usage

CLI

After authenticating with 115cli auth, you can use the 115cli command to interact with your 115 cloud storage. Here are some examples of available commands:

# Account info
115cli account

# List files
115cli ls /
115cli ls /path/to/dir -l

# File operations
115cli mkdir /new-folder
115cli cp /src/file.txt /dst/
115cli mv /old/path /new/path
115cli rm /path/to/file
115cli rm -r /path/to/dir
115cli find /search/path keyword

# File info and download
115cli info /path/to/file
115cli download-info /path/to/file
115cli download-info --format aria2c /path/to/file

# Download a file to local disk
115cli fetch /path/to/file.mp4
115cli fetch /path/to/file.mp4 -o /local/save/path.mp4

# Upload (support instant upload)
115cli upload /local/file.txt /remote/dir/file.txt
# Upload with instant upload only
115cli upload --instant-only /local/file.txt /remote/dir/file.txt

# Cloud download (offline download)
115cli download quota
115cli download list
115cli download add "https://example.com/file.mp4"
115cli download delete <info_hash>

Note: Creating cloud download tasks may trigger a captcha challenge. This is currently not supported by the client.

Authentication

115cli currently only supports cookie-based authentication. Obtain your cookies from the browser after logging into 115.com. You need the UID, CID, SEID, and KID cookie values.

115cli auth cookie <user_name> "UID=xxx; CID=xxx; SEID=xxx; KID=xxx"

Python API

The package also exposes a higher-level Python API client that you can use in your own projects:

from cli115.auth import CookieAuth
from cli115.client import create_client

auth = CookieAuth(
    uid="xxx",
    cid="xxx",
    seid="xxx",
    kid="xxx"
)
client = create_client(auth)

# List directory
entries, pagination = client.file.list("/")
for entry in entries:
    print(entry.name, entry.id)

# Get file info
info = client.file.info("/path/to/file.txt")
print(info.name, info.size, info.sha1)

# Download info
dl = client.file.download_info("/path/to/file.txt")
print(dl.url)

# Fetch a remote file as a lazy file-like object
with client.file.fetch("/path/to/file.txt") as rf:
    data = rf.read(1024)   # only downloads the first 1024 bytes

# Upload
result = client.file.upload("/remote/dir/", "/local/file.txt")

# Cloud download
client.download.add_url("https://example.com/file.mp4")
tasks, _ = client.download.list()

This project is in an early stage of development, it may subject to breaking changes in the future.

Future Plans

The project aims to cover the core features of 115 cloud storage. Planned additions include:

  • Cloud download management: Full management of offline download tasks including captcha support.
  • Multi-threaded download: Multi-thread acceleration for the 115cli fetch command.
  • Recycle bin management: List, restore, and permanently delete items from the recycle bin.
  • Mobile phone authentication: SMS-based login in addition to cookie auth.

Disclaimer

This is an unofficial client for 115.com and is not affiliated with, endorsed by, or associated with 115.com or its parent company in any way.

Use at your own risk. The authors are not responsible for any account suspension, data loss, or other consequences arising from the use of this software. The API may change at any time without notice, which could break this tool.

You may encounter Aliyun WAF blocks when using the library, the mechanism and consequences are currently unknown. It may relate to the frequency of API calls. After being blocked, you may need to wait for a while before retrying, the official web interface may also be affected during the block period.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

115cli-0.1.1.tar.gz (39.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

115cli-0.1.1-py3-none-any.whl (36.4 kB view details)

Uploaded Python 3

File details

Details for the file 115cli-0.1.1.tar.gz.

File metadata

  • Download URL: 115cli-0.1.1.tar.gz
  • Upload date:
  • Size: 39.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for 115cli-0.1.1.tar.gz
Algorithm Hash digest
SHA256 7a3ad1485e507dbb31e8e8873fde0dbe9253a748557869f9c8d6684df6a61dfa
MD5 3983390613bc42ec2a79903cdabf9636
BLAKE2b-256 665731ae3bcb5660b9165fe9ba13686612e15a30a65c3d77a03b2930235b8fc4

See more details on using hashes here.

File details

Details for the file 115cli-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: 115cli-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 36.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for 115cli-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a637225af54892233b30f89c9e5e7a3d973ccee7c8e5d218d66269d6ddf8622f
MD5 035d579027f6da72aa2e3880b27e3ad3
BLAKE2b-256 fb3236d6820bc652a935361f892ed931511549853cc7afd41030bb313783a8ef

See more details on using hashes here.

Supported by

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