Skip to main content

Client library for the non-existent Narlivs API.

Project description

# pynarlivs

![https://badge.fury.io/py/pynarlivs](http://badge.fury.io/py/pynarlivs.png)

Ever wanted to interact with ![http://www.narlivs.se](Narlivs) using an API?
Yep, there is none. We are here to make your life easier! This library aims
to provide a Pythonic interface for some basic functionalities on Narlivs,
i.e. retrieving product information (or, in future, automating the order
process).

## What do we use pynarlivs for?

When receiving a delivery from Narlivs, we get a delivery receipt both on paper
and in PDF format. We parse the PDF file programatically in order to automatically
update the in-stock product quantities.

## Quickstart guide

Install using pip:

```bash
pip install pynarlivs
```

Retrieve product information using its EAN code:
```python
>>> from narlivs import Narlivs
>>> client = Narlivs('username', 'password')
>>> product = client.get_product(ean='7310350109265')
>>> product
<Product sku=100102201 name=BRIO FRUKT PÅSE >
>>> product.data
{'ean': '7310350109265',
'image': '(...)/product/products/images/7310350109265.jpg',
'name': 'BRIO FRUKT PÅSE',
'price': Decimal('3.99'),
'sku': '100102201'}
```

## License

MIT License. Please see the LICENSE file.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pynarlivs-0.9.0.tar.gz (4.2 kB view hashes)

Uploaded Source

Built Distribution

pynarlivs-0.9.0-py3-none-any.whl (5.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page