Brian C. Lane
Brian C. Lane
clortho - A simple key/value server

clortho is a very simple key/value server written using python 3.4 and aiohttp

key namespace is per-client IP address, and there is no authentication. It supports direct connections from clients, and the X-Forwarded-For header for use with proxies. I shouldn’t have to mention that running this on an open network isn’t a good idea.

Get a key value by requesting http://server/keystore/<key>

curl http://server/keystore/louis

If the key has been set it will return a 200 status with the value. If the key is not set it will return a 404 and a message:

louis doesn't exist for 192.168.1.100

set a key value by POST to http://server/keystore/<key> with value=<value>

curl --http1.0 --F value=keymaster http://server/keystore/louis
OK

If the key was set it will return a 200 and an OK message. If there was a problem it will return a 404 and ERROR as the response.

One key, version, is hard-coded. This can be used to check to see if the keyserver is running, or which API version it is using.

curl http://server/keystore/version
version: 0.1

The key store is read from the file specified by --keystore or from clortho.dat in the current directory. It is written on shutdown (SIGINT or SIGTERM). The store is simply a pickle of the keystore dict.

The IP address and port to listen to can be set with --host and --port and default to 127.0.0.1 and 9001


NASCAR Countdown for iPhone

The NASCAR Countdown app displays a countdown to the next NASCAR race, the name of the race and the television network carrying the race. On the flip side all of the races for the season are listed, and tapping on one of them will go to the nascar.com website …

Read More
ALMS Countdown for iPhone

The ALMS Countdown app displays a countdown to the next American Le Mans Series race, the name of the race and the television network carrying the race. On the flip side all of the races for the 2010 season are listed, and tapping on one of them will go to …

Read More
Hygrosens Python Library

Hygrosens manufactures a number of sensors for measuring temperature, humidity, light level, pressure. Their devices use a common serial data format for a wide variety of sensors, include 1-wire sensors from Dallas. This library reads the output from Hygrosens devices and passes it to a calling function as a hash …

Read More
NASCAR Countdown Dashboard Widget

This is a simple countdown widget for the OSX Dashboard. It is a pure javascript implementation so it will also run inside a web browser as you can see above. This widget will display the time until the next NASCAR Broadcast, the countdown takes into account your local timezone. This …

Read More
SharePics for iPhone

SharePics is a simple application that uses Bluetooth to share pictures between two iPhone or iPod Touch (2nd gen) devices. You can also take pictures using the app and share them immediately. There is no need for a wireless access point or even a 3G connection. You can select your …

Read More
System Health Monitoring Software

System Health Monitor for Linux is a handy Python program that will setup your system to generate RRD Graphs of network interface traffic, system load, memory usage, disk space and inode usage and graphs of the number of running processes. It features a user-friendly interactive configuration mode and auto-generated html …

Read More
  • 1
  • 2

Receive Updates

ATOM

Contacts