If implementation of pso algorithm is not the main purpose, then pyswarm library which is really easy to use may be useful: https://pythonhosted.org/pyswarm/
It just needs an objective function to be minimized (in this case, mean squared errors in terms of the parameters which will be optimized), and lower and upper limits for each parameter. Then, pso(...) method will minimize the objective function according to pso algorithm.