semvec/pypi-packages huggingface dataset:
django-email-tools 0.1.1
A collection of Django email tools
License: MIT
Requires Python: >=3.6

# Django Email Tools

[![CircleCI](https://circleci.com/gh/pennlabs/django-email-tools.svg?style=shield)](https://circleci.com/gh/pennlabs/django-email-tools)
[![Coverage Status](https://codecov.io/gh/pennlabs/django-email-tools/branch/master/graph/badge.svg)](https://codecov.io/gh/pennlabs/django-email-tools)
[![PyPi Package](https://img.shields.io/pypi/v/django-email-tools.svg)](https://pypi.org/project/django-email-tools/)

## Requirements

* Python 3.6+
* Django 2.2+

## Installation

Install with pip `pip install django-email-tools`

Add `email_tools` to `INSTALLED_APPS`

```python
INSTALLED_APPS = (
    ...
    'email_tools.apps.EmailToolsConfig',
    ...
)
```

Add something like the following to `urls.py`

```python
if settings.DEBUG:
    urlpatterns = [
        path("emailpreview/", include("email_tools.urls", namespace="email_tools")),
    ] + urlpatterns
```

## Documentation

All settings are handled within a `EMAIL_TOOLS` dictionary.

Example:

```python
PLATFORM_ACCOUNTS = {
    'FROM_EMAIL': 'example@example.com',
    'TEMPLATE_DIRECTORY': os.path.join(settings.BASE_DIR, "templates", "emails"),
}
```

The available settings are:

`FROM_EMAIL` the email to send from.

`TEMPLATE_DIRECTORY` the path to a directory containing `.html` files used in emails.

## Usage

Django Email Tools contains two main parts.

First, is `email_tools.emails.send_email` a utility to send html emails given a django template and context.

The second is a debugging page that allows you to see what the rendered result of an email template would look like. This page also allows you to get a list of variables used by the template and modify those variables and see results in real-time.

## Changelog

See [CHANGELOG.md](https://github.com/pennlabs/django-email-tools/blob/master/CHANGELOG.md)

## License

See [LICENSE](https://github.com/pennlabs/django-email-tools/blob/master/LICENSE)
acinonyx 0.1.0
Asinoyx is a package which can simplify your multiprocessing implementation
License: MIT
Requires Python: >=3.6.0

# Acinonyx

Asinoyx is a package which can simplify your multiprocessing implementation, also you 
can easily watch the progress of multiprocessing execution.

## Usage

A simple sample:

```python
import time
from random import random
from acinonyx import run

def log(val):
    time.sleep(random())
    return val

values = range(100)
print(run(log, values))
```

It will run with `cpu_count` processes and print progress bar, output is below:

```
1%|█       | 1/100 [00:01<00:40,  2.29it/s]
26%|██       | 26/100 [00:01<00:32,  21.29it/s]
100%|██████████| 100/100 [00:03<00:00, 26.86it/s]
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, ..., 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99]
```

Also you can use multiple args:

```python
import time
from random import random
from acinonyx import run

def add(a, b):
    time.sleep(random())
    return a + b

if __name__ == '__main__':
    values = [(i, i) for i in range(100)]
    print(run(add, values))
```

Also you can use it in other scenario such as web spider:

```python
import requests
from random import random
import time
from acinonyx import irun

def fetch():
    delay = random()
    url = 'https://httpbin.org/uuid'
    time.sleep(delay)
    return requests.get(url).json().get('uuid')

if __name__ == '__main__':
    for result in irun(fetch, range(10), ordered=False):
        print(result)
```

## Trouble Shooting

### NSPlaceholderDate initialize error

```shell script
objc[67206]: +[__NSPlaceholderDate initialize] may have been in progress in another thread when fork() was called
```

Try to set env before execute script:
 
```shell script
export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES
```