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

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 src.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 src.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 src.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.1a0.tar.gz (2.7 kB view details)

Uploaded Source

Built Distribution

aseafile-0.1.1a0-py3-none-any.whl (2.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: aseafile-0.1.1a0.tar.gz
  • Upload date:
  • Size: 2.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.1a0.tar.gz
Algorithm Hash digest
SHA256 636a078c05d6a5fd0af38f9cbeb67650649025cdf8df7f2c8f6aaf06452fb245
MD5 d70a86512050398a430b943e0aa6575f
BLAKE2b-256 5fd75235eaa44ea7e4a72d23ab131551ec48627b6914afe067714e0152cfe98b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: aseafile-0.1.1a0-py3-none-any.whl
  • Upload date:
  • Size: 2.8 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.1a0-py3-none-any.whl
Algorithm Hash digest
SHA256 12d53ebc81f20d6650c2b4b14b6f39d76a3e119bb8658446b367ac5efd24346d
MD5 32543c67b45dee4f8ac6a99b3b3ffd8f
BLAKE2b-256 a2ced08ef07f1640c76c077efda1da05d909efa7f79e03b06439ac1885072158

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