New project checklist

This page contains a checklist with all necessary parts that you need, when you start a new project. This checklist assumes you know how to use the library and just need a short recapitulation. If not check out the Getting started page.

  1. Install pynetworking

  2. Override classes:

    2.1 ServerFunctions (Functions classes)

    2.2 ClientFunctions (Functions classes)

    2.3 ServerCommunicator (ServerCommunicator)

    2.4 ClientCommunicator (ClientCommunicator)

  3. Start the server with ClientManager

  4. Start the client with created ServerCommunicator

While you are working on your project, remember to add necessary functions to the Functions classes.

Minimal Code that can be copied

import pynetworking as net

class ServerFunctions(net.ServerFunctions):
    # Import all Server functions here
    # e.g. from server import function1

class ClientFunctions(net.ClientFunctions):
    # Import all Client functions here
    # e.g. from client import function2

class ServerCommunicator(net.ServerCommunicator):
    remote_functions = ServerFunctions
    local_functions = ClientFunctions

class ClientCommunicator(net.ClientCommunicator):
    remote_functions = ClientFunctions
    local_functions = ServerFunctions

#: alias for all server functions
server = ServerCommunicator.remote_functions

def get_client() -> ClientCommunicator:
    """Main purpose is to supply better auto completions"""
    return net.ClientManager().get()

import net_interface

address = ("", 5000)
# Do more stuff

import net_interface
import multiprocessing

client_manager = net.ClientManager(address, net_interface.ClientCommunicator)
# Server is now started
#: One possible way to add an option to stop the server
queue = multiprocessing.Queue()
    while True:
        msg = queue.get()
        if msg == "stop":