Skip to main content

Unofficial library that provides the API methods of the seafile service

Project description

aseafile

Asynchronous seafile

Unofficial library that provides the API methods of the seafile service

Installation

pip install aseafile --upgrade

Features

This library is asynchronous

At the moment, the library has support several sections of the seafile web api:

Currently, only version 2.1 of the seafile web api is supported

Dependencies

python version 3.10 minimum required

Requirements python libraries:

Getting started

Creating an instance of http client and verifying that the service is running using the "ping" method:

import asyncio
from aseafile import SeafileHttpClient


async def main():
    client = SeafileHttpClient(base_url='http://seafile.example.com')

    result = await client.ping()
    print(result.content)  # pong


if __name__ == '__main__':
    asyncio.run(main())

Obtaining access token and sending "auth ping":

import asyncio
from aseafile import SeafileHttpClient


async def main():
    client = SeafileHttpClient(base_url='http://seafile.example.com')

    token_result = await client.obtain_auth_token(username='my@example.com', password='Test123456')

    result = await client.auth_ping(token=token_result.content)
    print(result.content)  # pong


if __name__ == '__main__':
    asyncio.run(main())

Authorization in the service with automatic token saving and sending "auth ping":

import asyncio
from aseafile import SeafileHttpClient


async def main():
    client = SeafileHttpClient(base_url='http://seafile.example.com')

    await client.authorize(username='my@example.com', password='Test123456')

    result = await client.auth_ping()
    print(result.content)  # pong


if __name__ == '__main__':
    asyncio.run(main())

Contributing

free

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

aseafile-0.1.3a0.tar.gz (11.7 kB view details)

Uploaded Source

Built Distribution

aseafile-0.1.3a0-py3-none-any.whl (17.4 kB view details)

Uploaded Python 3

File details

Details for the file aseafile-0.1.3a0.tar.gz.

File metadata

  • Download URL: aseafile-0.1.3a0.tar.gz
  • Upload date:
  • Size: 11.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.2

File hashes

Hashes for aseafile-0.1.3a0.tar.gz
Algorithm Hash digest
SHA256 8033b6797c0542cee1e4028902e521c8b9100fc07a9feb2c5a7e007e2f1e37cb
MD5 25074ea6f0f06672cef7378a8aa5a9c0
BLAKE2b-256 4bd83c8bfe673224f930614ca25f8717896222d6d3a5142df010c5bc97fd8ae0

See more details on using hashes here.

File details

Details for the file aseafile-0.1.3a0-py3-none-any.whl.

File metadata

  • Download URL: aseafile-0.1.3a0-py3-none-any.whl
  • Upload date:
  • Size: 17.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.2

File hashes

Hashes for aseafile-0.1.3a0-py3-none-any.whl
Algorithm Hash digest
SHA256 37796433b3f601c55a95c05558c544b8a12b8e29cea608221d167e56e739f5f8
MD5 e0f962becf0040247b93547f969b2fa0
BLAKE2b-256 84ab79c10bce024d1ff290e870e24265c47f1cb162d66584c0ff5f5be828e846

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