semvec/pypi-packages huggingface dataset:
alpha-filter 0.9.2
differential filter
Requires Python: >=3.8

[![Python 3.6](https://img.shields.io/badge/python-3.8-blue.svg)](https://www.python.org/downloads/release/python-360/) _and greater_

# alpha-filter

When parsing, sometimes it is necessary to reduce the number of requests to the server, for example, our script collects links from pagination to the product every day, and then parses each product separately. But what to do if some time ago we already parsed these goods, why do it twice. alpha-filter will help filter out those ads that have already been read, and will return only new ones.
 
## Getting starting
```sh
pip install alpha-filter
```

### Usage

```python
from alphafilter import filter_ads, mark_as_processed, is_processed

>>> first_parsing_urls = ["https://www.example.com/1", "https://www.example.com/2"]
>>> new, old = filter_ads(first_parsing_urls)
>>> new
["https://www.example.com/1", "https://www.example.com/2"]
>>> old
[]

second_parsing_urls = first_parsing_urls # second parsing same with first

>>> new, old = filter_ads(second_parsing_urls)
>>> new
[]
>>> old
[]

>>>third_parsing_urls = ["https://www.example.com/2", "https://www.example.com/3"]

>>> new, old = filter_ads(third_parsing_urls)
>>> new
["https://www.example.com/3"]
>>> old
["https://www.example.com/1"]
```
Also you can mark your urls for some purposes


```python
>>> urls_for_mark = ["https://www.example.com/2", "https://www.example.com/3"]
>>> mark_as_processed(urls_for_mark)
>>> is_processed("https://www.example.com/2")
True
>>> is_processed("https://www.example.com/4")
False
```


It uses a fast sqlite database to store urls. The database file ('ads.db') will be created in the root directory

__Warning!!! this package has no protection against sql injection, do not use it for the external interface__
py-myaskapi 1.0.0
Simple interface to the MyAsk API.
Requires Python: >=3.6

# py-myaskapi

## Description
This library makes it easy to interface with MyAskAPI's [API](https://myaskai.com/api-docs#!).

## Installation
Simplue install using pip or your favorite package management tools.

    pip install py-myaskapi
This will install the [Requests](https://pypi.org/project/requests/) library.

## Usage
You can initialize it like this:

    ma = myask_api.MyAskAPI(
        api_url='https://myaskai.com/api/1.1/wf/',
        client_id=settings.MYASK_AI_ID,
        api_key=settings.MYASK_AI_API_KEY)
    # Now let's push some content to the API
    ma.content(
        file_url=f'https://example.com/example-page/?version=json',
        meta_title='Example Page 101',
        meta_author='Ed Menendez',
        meta_link=f'https://example.com/example-page/',
    )
*Note*: You should store your API keys outside of the code repository.

## Credits

Thank you to [LearnWPT](https://learnwpt.com/) for permitting publishing of this code.

## License

MIT License

## How to Contribute

Feel free to submit a PR. Test scripts would be nice! Please see [Contributor Covenant](https://www.contributor-covenant.org/version/2/1/code_of_conduct/) for our code of conduct.