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 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.0a0.tar.gz (6.8 kB view details)

Uploaded Source

Built Distribution

aseafile-0.1.0a0-py3-none-any.whl (12.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: aseafile-0.1.0a0.tar.gz
  • Upload date:
  • Size: 6.8 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.0a0.tar.gz
Algorithm Hash digest
SHA256 68393defe007acb8c67ec26872442bd243814a9496216646706cb5aa10deaccd
MD5 b7c36712b50701604713d2c9947d93cf
BLAKE2b-256 bf34c89a57c1ced0f1e3ccd0ba97800aa17c47709314c26c93318f026c404837

See more details on using hashes here.

File details

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

File metadata

  • Download URL: aseafile-0.1.0a0-py3-none-any.whl
  • Upload date:
  • Size: 12.1 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.0a0-py3-none-any.whl
Algorithm Hash digest
SHA256 e7a65bd5afb4b30da5766da84cb6655bd2b51f00f2d56b6cf3d1c7c43420c291
MD5 81a5411119eecce8d1127e30a57304fe
BLAKE2b-256 852870ac9effbd50d169199125a2e3761d609a1e49092b8c9542e0e7e9bd1380

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