Skip to content

Commit 24b9872

Browse files
committed
Start working on new README file
1 parent 3d0e076 commit 24b9872

1 file changed

Lines changed: 39 additions & 0 deletions

File tree

README.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Python-Picnic-API
2+
3+
Fork of the Unofficial Python wrapper for the [Picnic](https://picnic.app) API. While not all API methods have been implemented yet, you'll find most of what you need to build a working application are available.
4+
5+
This library is not affiliated with Picnic and retrieves data from the endpoints of the mobile application. **Use at your own risk.**
6+
7+
## Credits
8+
9+
A big thanks to @MikeBrink for building the first versions of this library.
10+
11+
@maartenpaul and @thijmen-j continously provided fixes that were then merged into this fork.
12+
13+
## Getting started
14+
15+
The easiest way to install is directly from pip:
16+
17+
```bash
18+
$ pip install python-picnic-api2
19+
```
20+
21+
Then create a new instance of `PicnicAPI` and login using your credentials:
22+
23+
```python
24+
from python_picnic_api import PicnicAPI
25+
26+
picnic = PicnicAPI(username='username', password='password', country_code="NL")
27+
```
28+
29+
The country_code parameter defaults to `NL`, but you have to change it if you live in a different country than the Netherlands (ISO 3166-1 Alpha-2). This obviously only works for countries that picnic services.
30+
31+
## Searching for a product
32+
33+
```python
34+
picnic.search('coffee')
35+
```
36+
37+
```python
38+
[{'items': [{'id': 's1019822', 'name': 'Lavazza Caffè Crema e Aroma Bohnen', 'decorators': [], 'display_price': 1799, 'image_id': 'aecbf7d3b018025ec78daf5a1099b6842a860a2e3faeceec777c13d708ce442c', 'max_count': 99, 'unit_quantity': '1kg', 'sole_article_id': None}, ... ]}]
39+
```

0 commit comments

Comments
 (0)