Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rwxd/pyreadwise
Python Module to use the Readwise API
https://github.com/rwxd/pyreadwise
python readwise
Last synced: 2 months ago
JSON representation
Python Module to use the Readwise API
- Host: GitHub
- URL: https://github.com/rwxd/pyreadwise
- Owner: rwxd
- License: mit
- Created: 2023-03-06T21:35:27.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-11-08T18:19:52.000Z (2 months ago)
- Last Synced: 2024-11-08T19:26:20.560Z (2 months ago)
- Topics: python, readwise
- Language: Python
- Homepage: https://rwxd.github.io/pyreadwise/
- Size: 919 KB
- Stars: 16
- Watchers: 3
- Forks: 1
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-readwise - pyreadwise - A Python module for using the Readwise API. (Client Libraries)
README
# Python Module to use the Readwise API
This module is a wrapper for the Readwise API.
It allows you to easily access your Readwise data in Python.
## Installation
```bash
pip install -U readwise
```## How to use
### Readwise API
```python
from readwise import Readwiseclient = Readwise('token')
books = client.get_books(category='articles')
for book in books:
highlights = client.get_book_highlights(book.id)
if len(highlights) > 0:
print(book.title)
for highlight in highlights:
print(highlight.text)
```### Readwise Readwise API
```python
from readwise import ReadwiseReaderclient = ReadwiseReader('token')
response = client.create_document('https://www.example.com')
response.raise_for_status()
```## Documentation
The latest documentation can be found at
If you've checked out the source code (for example to review a PR), you can build the latest documentation by running `make serve-docs`.