A Python library for the Strongarm/DNSWatch API
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
strongarm
tasks
tests
.gitignore
.travis.yml
AUTHORS.rst
HISTORY.rst
LICENSE
MANIFEST.in
README.rst
requirements.txt
setup.cfg
setup.py
tox.ini

README.rst

stronglib

stronglib is an Apache2 licensed Python library for the strongarm.io API.

https://travis-ci.org/percipient/stronglib.svg?branch=master https://coveralls.io/repos/percipient/stronglib/badge.svg?branch=master

features

  • token authentication
  • get, create, and delete blackholed domains

installation

The latest release can be installed from PyPI:

$ pip install --upgrade stronglib

The latest development version can be installed directly from GitHub:

$ pip install --upgrade https://github.com/percipient/stronglib/tarball/master

usage

import strongarm

# token authentication
strongarm.api_key = 'your_api_token'

# get (ie, search) a single Domain
domain = strongarm.Domain.get('example.com')
print(domain.name)

# list all blackholed domains
for domain in strongarm.Domain.all():
    print(domain.name)

# list just blacklisted domains
for domain in strongarm.Domain.filter(statuses=strongarm.Domain.BLACKLISTED):
    print(domain.name)

# create a new blackholed domain
domain = strongarm.Domain.create(name='example.com')

# create a new whitelisted domain
domain = strongarm.Domain.create(name='my-company.com',
                                 status=strongarm.Domain.WHITELISTED,
                                 description='Our Company Website')

# delete a blackholed domain
domain.delete()

development

In order to develop stronglib you must install the requirements files.

pip install -r requirements.txt

Use pytest to run the test suite:

py.test

contribute

  1. Check for open issues or open a fresh issue to start a discussion around a feature idea or a bug.
  2. If you feel uncomfortable or uncertain about an issue or your changes, feel free to email support@percipientnetworks.com and we will happily help you.
  3. Fork the repository on GitHub to start making your changes to the master branch (or branch off of it).
  4. Write a test which shows that the bug was fixed or that the feature works as expected.
  5. Send a pull request and bug the maintainer until it gets merged and published. :) Make sure to add yourself to AUTHORS.