A little background first...
I have been working on
Mathics, a open-source implementation of the Wolfram Language.
Mathics relies heavily on sympy.
I couldn't find anything so initially I was generating all of the partitions using sympy.utilities.iterables.partitions and then taking the length.
This is horribly inefficent. Therefore I thought, I'd use the algorition in Skiena's book which makes use of Euler's recurrence for the number of partitions.
It took a little bit of tweaking to get it to be reasonably efficient in Python. The current impelemtation is
here.
This might be of interest and use in sympy as well, so I'd like to mention it here.
And if there is already such a routine in sympy, I'd would be grateful to know about.
Thanks.