Skip to main content

client for tolino cloud

Project description

pytolino

A client to interact (login, upload, delete ebooks, etc..) with the tolino cloud with python. Most of the code is forked from https://github.com/darkphoenix/tolino-calibre-sync

One difference is that I aim to create a python package from it and to put it on pypi, so that one can use this python module in other projects.

Installation

pip install pytolino

Usage

Before being able to send requests, you need to register your computer on which you will run the code:

from pytolino.tolino_cloud import Client, PytolinoException
client = Client()
client.login(USERNAME, PASSWORD)
client.register() # do this only once!
client.logout()

You can then upload, add to a collection or delete ebook on your cloud:

from pytolino.tolino_cloud import Client, PytolinoException
client = Client()
client.login(USERNAME, PASSWORD)
ebook_id = client.upload(EPUB_FILE_PATH) # return a unique id that can be used for reference
client.add_collection(epub_id, 'science fiction') # add the previous book to the collection science-fiction
client.add_cover(epub_id, cover_path) # to upload a cover on the book.
client.delete_ebook(epub_id) # delete the previousely uploaded ebook
inventory = client.get_inventory() # get a list of all the books on the cloud and their metadata
client.upload_metadata(epub_id, title='my title', author='someone') # you can upload various kind of metadata
client.logout()

if you want to unregister your computer:

from pytolino.tolino_cloud import Client, PytolinoException
client = Client()
client.login(USERNAME, PASSWORD)
client.register() # now you will not be able to upload books from this computer
client.logout()

By default, it will connect to ‘www.buecher.de’. In principle you could change the partner with:

client = Client(server_name='www.orelfuessli') # for example if you have an account at orel fuessli.

To get a list of the supported partners:

from pytolino.tolino_cloud import PARTNERS
print(PARTNERS)

Unfortunately, the only supported partner now is ‘www.buecher.de’, because it has a different way of connection… So for now, the only solution is to create an account there and link it to your original account.

Features

  • login to tolino partner (for now works only with buecher.de)

  • register device

  • unregister device

  • upload ebook

  • delete ebook from the cloud

  • add a book to a collection

  • download inventory

  • upload metadata

  • more to come…

License

The project is licensed under GNU GENERAL PUBLIC LICENSE v3.0

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

pytolino-1.7.tar.gz (22.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pytolino-1.7-py3-none-any.whl (20.0 kB view details)

Uploaded Python 3

File details

Details for the file pytolino-1.7.tar.gz.

File metadata

  • Download URL: pytolino-1.7.tar.gz
  • Upload date:
  • Size: 22.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for pytolino-1.7.tar.gz
Algorithm Hash digest
SHA256 47e03937d4daae22666e9f6a59678e8264900f9c418cbcb7390430598cb70b32
MD5 c46af38dbfb1be2de1f7e4398656dea0
BLAKE2b-256 98a09a0b7bce63af68192dda7b2be324a9d8e042508bf425901759d935fa1de0

See more details on using hashes here.

File details

Details for the file pytolino-1.7-py3-none-any.whl.

File metadata

  • Download URL: pytolino-1.7-py3-none-any.whl
  • Upload date:
  • Size: 20.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for pytolino-1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 ff6f56688a1bf34d64dde06aa02f0524a1826688f934029a438f8be5cceebfc4
MD5 01c7c0a2f569e2deb1201930e39b2f39
BLAKE2b-256 8c52ffaac9de46e2e7ed4114a736e9db08d42d83ae6f1e434e61d5713c991485

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page