semvec/pypi-packages huggingface dataset:
Save-to-DB 0.8.0a
This library makes it easy to store data from any source into a database.
License: MIT
Keywords: development scraping mining database

Save-to-DB
----------
This library can be used to store scraped data from the Internet into a
database without much effort. It can create, update and delete records in
database to accommodate new data. It can even configure itself by default by
getting not null, unique and primary key constrains, foreign keys and other info
from the database. It can work with Sqlalchemy and Django ORM models without
much setup. Just throw your data at it and it will take care of storing it
properly in a database.

**Installation**::

    pip install Save-to-DB

----

**Warning:** This library works only with Python 3.

----

|

**Documentation and tutorial:**

- On the Internet: https://save-to-db.readthedocs.io
- Download for offline reading:
  https://readthedocs.org/projects/save-to-db/downloads/


**Project repository:** https://bitbucket.org/mikhail-makovenko/save-to-db
request-ray 0.1.2
a batch based request package with retry stratgy that enables you to send X requests concurrently at rate of Y requests/execution
License: MIT
Keywords: http,async,batch_execution,gevent

# Request Ray

[![PyPI version](https://badge.fury.io/py/request-ray.svg)](https://badge.fury.io/py/request-ray)
[![Build Status:](https://github.com/Kareem-Emad/request-ray/workflows/build/badge.svg)](https://github.com/Kareem-Emad/request-ray/actions)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)


a batch based request package with retry stratgy that enables you to send X requests concurrently at rate of Y requests/execution with max retries for each N

## Setup

```shell
pip install request-ray
```

## How to use

```python
from request_ray import rray

requests = [{
    'method': 'POST',
    'url': 'https://google.com',
    'kwargs': {'data': json.dumps({'hello': 'world'}), 'headers': {'alpha': 'beta'}}
}, {
    'method': 'GET',
    'url': 'https://facebook.com',
    'kwargs': {}
}]

batch_size = 2 # max no of requests to send at a time
retry_policy = 3 # how many times to retry failed requests

responses rray.send_requests(requests, batch_size, retry_policy)
print(responses) # array of expected responses with structure in each element: {'index': 0, 'response': standard_response_object}
```

## How it works

As shown below:

- 6 requests are queued
- first 3 are started
- 1,3 get 200 ok and 2 get 500 so it's enqueued again
- 2 is retried with next requests till it's statisfied or retry max reached

![Diagram](./assets/diagram.png)