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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: aseafile-0.1.2a0.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.2a0.tar.gz
Algorithm Hash digest
SHA256 db319227185beca661cc78001b7c09a7fb2661b57036ffc10f935ae52b4415a2
MD5 56979613dba94d8816f58e376a41113d
BLAKE2b-256 726bce0ac96f32e4a28f8312dbd2564b91281a7429d18d35c957c59eeeeff804

See more details on using hashes here.

File details

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

File metadata

  • Download URL: aseafile-0.1.2a0-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.2a0-py3-none-any.whl
Algorithm Hash digest
SHA256 ecfaa1c0d6f62db12a4ba62354be063da9f2783124162eecb0a7bd2ae5de4191
MD5 86d1c888c4414de77d6e4ed93b8576c3
BLAKE2b-256 c2cd23b24c3a8b4eda71b2593e4a871c3041042e60e62b39b0f5b3b20f50cc1f

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