Update connectionlib.py

Writing the base.