Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/krzjoa/wolne_lektury
An unofficial REST API client for Wolne Lektury
https://github.com/krzjoa/wolne_lektury
Last synced: 5 days ago
JSON representation
An unofficial REST API client for Wolne Lektury
- Host: GitHub
- URL: https://github.com/krzjoa/wolne_lektury
- Owner: krzjoa
- Created: 2022-07-23T15:06:18.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-07-29T23:27:46.000Z (over 2 years ago)
- Last Synced: 2024-03-15T09:07:31.458Z (10 months ago)
- Language: Python
- Homepage:
- Size: 3.09 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# wolne_lektury
> An unofficial REST API client for [Wolne Lektury](wolnelektury.pl)## Installation
You can install this library from *PyPI*
```bash
pip install wolne_lektury
```or from the GitHub repo:
```bash
pip install git+https://github.com/krzjoa/wolne_lektury.git
```## Usage
```python
import wolne_lektury as wl# Query is automatically slugified, so you can type author names in natural language
wl.get_books(authors = "Juliusz Słowacki")
wl.get_books(authors = "adam-mickiewicz")# Use more complex queries. You can specify language as well
wl.get_books(epoch="Romantyzm", genre="Powieść")
wl.get_books(epoch="Modernizm", kind="Liryka", language="pol")# Get lists of authors, epochs, genres, kinds, themes and collenctions
wl.get_authors()
wl.get_epochs()
wl.get_genres()
wl.get_kinds()
wl.get_themes()
wl.get_collections()# Retrieve full textes or download them as files
books = wl.get_texts(author="Ignacy Krasicki")
print(list(books.values())[4][:60])
'Dwa żółwie\r\n\r\n\r\n\r\nNie żałując sił własnych i ciężkiej fatygi'wl.download("output_dir", author="Henryk Sienkiewicz", book_format=wl.BookFormat.PDF)
```