Skip to main content

scrapy-mailgun: Hook emails with scrapy.

Project description

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Description: # Scrapy-mailgun: Mailgun integration for Scrapy

A [mailgun](https://mailgun.com) integration for scrapy.

## Quick Start

Install via `pip`:

```
$ pip install scrapy-mailgun
```

What's available right now is an `EmailReport` extension, that allows you to send a report once a spider is done through mailgun.

Configure:

```python
EXTENSIONS = {
'scrapymailgun.extensions.EmailReport': True,
}

SM_DOMAIN = 'api.mailgun.net/v3/XXXXXXXXXXXXXXXX.mailgun.org'
SM_KEY = 'key-XXXXXXXXXXXXXXXXX'
SM_FROM = 'from-email@acme.org'
SM_TO = 'to-email@acme.org' # comma sparated

SM_EMAIL_REPORT_TMPL_SUBJECT = 'Your spider [{{spider.name}}] is done: {{reason}}'
SM_EMAIL_REPORT_TMPL_BODY = 'job stats: {{ spider.crawler.stats._stats }}'
```

### Templates

Currently verbatim template strings are supported for flexible scraper configuration (you can change these remotely with no deploy).

As for template variables, what's available to you is your `spider` and `reason` instances directly. Do what ever you want with those in the templates.


## Developers

Set up a development environment
```
$ pip install -r requirements.txt
```

### Development

* Dependencies: list them in `requirements.txt`

### Release

* Dependencies: list them in `setup.py` under `install_requires`:

```python
install_requires=['peppercorn'],
```

Then:

```
$ make dist && make release
```

# Contributing

Fork, implement, add tests, pull request, get my everlasting thanks and a respectable place here :).


### Thanks:

To all [Contributors](https://github.com/jondot/scrapy-mailgun/graphs/contributors) - you make this happen, thanks!


# Copyright

Copyright (c) 2017 [Dotan Nahum](http://gplus.to/dotan) [@jondot](http://twitter.com/jondot). See [LICENSE](LICENSE) for further details.

Platform: UNKNOWN

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

scrapy-mailgun-0.3.0.tar.gz (3.0 kB view details)

Uploaded Source

Built Distribution

scrapy_mailgun-0.3.0-py2-none-any.whl (5.8 kB view details)

Uploaded Python 2

File details

Details for the file scrapy-mailgun-0.3.0.tar.gz.

File metadata

File hashes

Hashes for scrapy-mailgun-0.3.0.tar.gz
Algorithm Hash digest
SHA256 b898138909b35724fa844b4c2d6256d1fdd6c2c2a92bbd4eebc2d433dca9a723
MD5 68091303b6ee6d2d231703fcfa0f311a
BLAKE2b-256 872f3e5d9567326df8e4894f84fc9957045e2355192e908ca1b1a0aa2616ac56

See more details on using hashes here.

File details

Details for the file scrapy_mailgun-0.3.0-py2-none-any.whl.

File metadata

File hashes

Hashes for scrapy_mailgun-0.3.0-py2-none-any.whl
Algorithm Hash digest
SHA256 83c516b91f51bbfacc266551775ab8cec36631bc29b804aec0f0056a6a9ae4a4
MD5 c92213dcf057be1c0aa4ba2a09bb79d3
BLAKE2b-256 f900c9a37c31b71c4276b0e73cc65ad6ce3a84dcde762eaf62d7e423b969c5f1

See more details on using hashes here.

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