An unofficial Python client for the Readwise Reader API.
pip install readwise-api
First, you have to obtain a Readwise access token.
Then, the token has to be stored, either into an .env file or an environment variable using export READWISE_TOKEN=<your_token>
.
import readwise
List all documents:
readwise.get_documents(location="new")
Get a single document by its ID:
readwise.get_document_by_id("<document_id>")
Save a document to Readwise Reader
readwise.save_document("https://www.youtube.com/watch?v=dQw4w9WgXcQ")
List all documents:
readwise list new
Naturally, the output can be saved to a JSON file:
readwise list new > new_documents.json
Get a single document by its ID:
readwise get <document_id>
Save a document to Readwise Reader
readwise save "https://www.youtube.com/watch?v=dQw4w9WgXcQ"