Skip to content

An unofficial Python client for the Readwise Reader API.

License

Notifications You must be signed in to change notification settings

floscha/readwise-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

logo

Readwise API

An unofficial Python client for the Readwise Reader API.

Installation

pip install readwise-api

Usage

Prerequisites

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>.

Python API

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")

CLI

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"

About

An unofficial Python client for the Readwise Reader API.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages