Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

Default conf. files and conf. file generator for `zeo_connector`.

Project Description


Default configuration files and configuration file generator for zeo_connector.


This project provides generators of the testing environment for the ZEO-related tests. It also provides generator, for the basic ZEO configuration files.

This script simplifies the process of generation of ZEO configuration files.

ZEO tests

Typically, when you test your program which is using the ZEO database, you need to generate the database files, then run new thread with runzeo program, do tests, cleanup and stop the thread.

This module provides two functions, which do exactly this:

  • zeo_connector_defaults.generate_environment()
  • zeo_connector_defaults.cleanup_environment()

This function will create temporary directory in /tmp and copy template files for ZEO client and server into this directory. Then it starts new thread with runzeo program using the temporary server configuration file.

Names of the files may be resolved using tmp_context_name() function.

This function works best, if added to setup part of your test environment.

Function, which stops the running runzeo thread and delete all the temporary files.

This function works best, if added to setup part of your test environment.
Context functions

There is also two temp environment access functions:

  • tmp_context_name()
  • tmp_context()

Both of them take one fn argument and return name of the file (tmp_context_name()) or content of the file (tmp_context()) in context of random temporary directory.

For example:


returns the absolute path to the file zeo_client.conf, which may be for example /tmp/tmp1r5keh/zeo_client.conf.

You may also call it without the arguments, which will return just the name of the temporary directory:


which should return something like /tmp/tmp1r5keh.

Tests example

Here is the example how your test may look like:

#! /usr/bin/env python
# -*- coding: utf-8 -*-
# Interpreter version: python 2.7
# Imports =====================================================================
import pytest

from zeo_connector_defaults import generate_environment
from zeo_connector_defaults import cleanup_environment
from zeo_connector_defaults import tmp_context_name

# Setup =======================================================================
def setup_module(module):

def teardown_module(module):

# Fixtures ====================================================================
def zeo_conf_wrapper():
    return ZEOConfWrapper(

# Tests =======================================================================
def test_something(zeo_conf_wrapper):


Module is hosted at PYPI, and can be easily installed using PIP:

sudo pip install zeo_connector_defaults

Source code

Project is released under the MIT license. Source code can be found at GitHub:



  • Small bugfix.
  • Removed unused files.


  • Switched to complete randomly generated ZEO environment (random name in /tmp, and random ports for ZEO server process).


  • Bugfix of path parsing.


  • Project created.
Release History

Release History

This version
History Node


History Node


History Node


History Node


Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
zeo_connector_defaults-0.2.2.tar.gz (6.5 kB) Copy SHA256 Checksum SHA256 Source Nov 24, 2015

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting