Skip to content

HW618/py-openlist

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

py-openlist

Python SDK and CLI for OpenList API.

Installation

pip install openlist

For CLI support:

pip install "openlist[cli]"

SDK Usage

Async

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)

Sync

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)

CLI Usage

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 /path

License

AGPL-3.0

py-openlist

py-openlist

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages