Python SDK and CLI for OpenList API.
pip install openlistFor CLI support:
pip install "openlist[cli]"from openlist import AsyncOpenList
async with AsyncOpenList("http://localhost:5244") as client:
token = await client.login("admin", "password")
files = await client.fs_list(path="/")
for f in files.content:
print(f.name, f.size, f.is_dir)from openlist import OpenList
with OpenList("http://localhost:5244") as client:
token = client.login("admin", "password")
files = client.fs_list(path="/")
for f in files.content:
print(f.name, f.size, f.is_dir)export OPENLIST_URL=http://localhost:5244
export OPENLIST_TOKEN=your-token
openlist ls /
openlist get /path/to/file
openlist mkdir /new/dir
openlist upload /path /local/file
openlist share-create /pathAGPL-3.0