Metadata-Version: 2.1
Name: wallapopupdatewatcher
Version: 0.1.3
Summary: A library to watch for new items at wallapop.es
Home-page: https://github.com/Adair-GA/wallapopUpdateWatcher
License: GNU General Public License v3 (GPLv3)
Author: Adair-GA
Author-email: adairyves@gmail.com
Requires-Python: >=3.7,<4.0
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Classifier: License :: Other/Proprietary License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.11
Classifier: Topic :: Software Development
Requires-Dist: httpx (>=0.23.3,<0.24.0)
Project-URL: Repository, https://github.com/Adair-GA/wallapopUpdateWatcher
Description-Content-Type: text/markdown

# Wallapop update notifier

### This package can be used to provide updates when new products appear on Wallapop. Install it just by using:<br><br>
`pip install wallapopUpdateWatcher`
### Basic usage example
```python
from wallapopUpdateWatcher import updateWatcher,Query,Producto
import asyncio
async def callback(q: Query, l: list[Producto]):
    for prod in l:
        print(prod.msg())


async def main():
    watcher = updateWatcher(callback)
    await watcher.create("Iphone",strategy="price", min_max_sale_price = (15,30))
    # this creates a search for the product "Iphone"
    # between 15€ and 30€. 

    while True:
        await watcher.checkOperation()
        await asyncio.sleep(5)

asyncio.run(main())
```

## Strategies:
Strategies are what decides if a product that has already appeared sometime is going to be notified. There are 3 strategies:
- Price:
This strategy only adds the product if its price has changed. It is the **default** strategy.

- New:
This strategy only notifies new products.

- Any:
This strategy notifies any product, even if it has already been notified.
