Skip to content

Instantly share code, notes, and snippets.

from bson.objectid import ObjectId
from loaders.constants import *
"""
This simplifies managing an ever changing NoSQL database by versioning objects
and providing a simple way to update old version via update scripts.
The best way to use this is to create a new object and have it inherit from
ObjectData then provide the structure in the `versions` variable starting with
version 1. Then when you update the object structure, you can add in the
@Magnie
Magnie / load_balancer.py
Last active October 24, 2015 23:46
Simple, single threaded, multi-source IP address load balancer in Python.
# A simple load balancer developed in Python.
# - Supports multiple source IP addresses
# - Single threaded
# - Uses select so it only uses the necessary amount of CPU.
# Forward Motion Load Balancer
import socket
import select
import logging
import time