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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 636a078c05d6a5fd0af38f9cbeb67650649025cdf8df7f2c8f6aaf06452fb245 |
|
MD5 | d70a86512050398a430b943e0aa6575f |
|
BLAKE2b-256 | 5fd75235eaa44ea7e4a72d23ab131551ec48627b6914afe067714e0152cfe98b |
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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 12d53ebc81f20d6650c2b4b14b6f39d76a3e119bb8658446b367ac5efd24346d |
|
MD5 | 32543c67b45dee4f8ac6a99b3b3ffd8f |
|
BLAKE2b-256 | a2ced08ef07f1640c76c077efda1da05d909efa7f79e03b06439ac1885072158 |