https://github.com/reubano/swutils
ScraperWiki box utility library
https://github.com/reubano/swutils
data library
Last synced: 5 months ago
JSON representation
ScraperWiki box utility library
- Host: GitHub
- URL: https://github.com/reubano/swutils
- Owner: reubano
- License: mit
- Archived: true
- Created: 2015-11-02T17:21:02.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2016-01-07T09:12:27.000Z (over 10 years ago)
- Last Synced: 2025-11-27T17:08:47.781Z (7 months ago)
- Topics: data, library
- Language: Python
- Homepage:
- Size: 36.1 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGES.rst
- Contributing: CONTRIBUTING.rst
- License: LICENSE
Awesome Lists containing this project
README
# swutils
## Introduction
swutils is a Python library for interacting with [ScraperWiki](https://scraperwiki.com/products/data-science-platform) boxes.
With swutils, you can
- Schedule jobs to run on daily basis
- Get email notifications if a job fails
- and much more...
## Requirements
swutils has been tested on the following configuration:
- MacOS X 10.9.5
- Python 2.7.10
swutils requires the following in order to run properly:
- [Python >= 2.7](http://www.python.org/download) (MacOS X comes with python preinstalled)
## Installation
(You are using a [virtualenv](http://www.virtualenv.org/en/latest/index.html), right?)
pip install swutils
## Usage
```python
import swutils
job = lambda: 'Code to update SW database'
exc_handler = swutils.ExceptionHandler('reubano@gmail.com').handler
swutils.run_or_schedule(job, True, exc_handler)
```
## Scripts
swutils comes with a built in task manager `manage.py` and a `Makefile`.
### Setup
pip install -r dev-requirements.txt
### Examples
*Run python linter and nose tests*
```bash
manage lint
manage test
```
Or if `make` is more your speed...
```bash
make lint
make test
```
## Contributing
View [CONTRIBUTING.rst](https://github.com/reubano/swutils/blob/master/CONTRIBUTING.rst)
## License
swutils is distributed under the [MIT License](http://opensource.org/licenses/MIT).