mozilla-services/ip-reputation-python-client

Name: ip-reputation-python-client

Owner: Mozilla Services

Description: A Python client to the tigerblood IP reputation service

Created: 2016-12-01 14:35:45.0

Updated: 2018-02-13 04:54:46.0

Pushed: 2017-04-20 17:56:08.0

Homepage: null

Size: 13

Language: Python

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

ip-reputation-python-client

A Python client to the tigerblood IP reputation service

Installation

pip install ipreputation

Usage:

Create a client:

 ipreputation.client import IPReputationClient

nt = IPReputationClient(
hawk_id='<a hawk ID>',
hawk_key='<a hawk key>',
host='<tigerblood service IP address>',
port='<tigerblood service port>',
timeout=<float or int in seconds>)

Get the reputation for an IP:

nt.get('127.0.0.1').json()

Set the reputation for an IP:

nt.add('127.0.0.1', 70)

Update the reputation for an IP:

nt.update('127.0.0.1', 20)

Remove an IP:

nt.remove('127.0.0.1')

Send a violation for an IP:

nt.send_violation('127.0.0.1', 'rate-limit-exceeded')

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.