Skip to main content

Simple Failover Resolver

Project description

Sfor
====

Simple failover resolver for Python

this is experimental version.
yet, you should not use in large-scale service.



Install
===

pip install sfor

Example
===


from sfor.sfor_simple import SforSimple, SforNodeInfo
import time
import logging

node_list = [
SforNodeInfo("hoge1", 80, "/status.html"),
SforNodeInfo("hoge2", 80, "/status.html"),
]

logging.basicConfig(level=logging.DEBUG, format='%(asctime)s %(message)s', datefmt='%m/%d/%Y %I:%M:%S %p')

sfor = SforSimple(node_list)

for n in range(60):
logging.info(sfor.resolv())
time.sleep(1)

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

python-sfor-0.1.3.tar.gz (1.8 kB view hashes)

Uploaded Source

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