Closed Midnighter closed 10 years ago
import beanstalkc, yaml
def cload_yaml(x):
return yaml.load(x, Loader=yaml.CLoader)
q = beanstalkc.Connection(parse_yaml=cload_yaml)
Does that help?
Cheers. I noticed that the appendix section applies to my problem just before going to bed last night but this is even more helpful.
Just wanted to show you this IPython Notebook. It might be interesting as an example.
Thanks. If you're interested in serialisation performance, you might want to look into msgpack as well.
Added umsgpack
to the notebook. It's a pure Python implementation so it can't really compare speed-wise but I added length checks and it's a clear winner there. Just follow the link again and it should show the new notebook.
It's not quite clear to me how to get beanstalkc to use the
CLoader
andCDumper
libyaml classes instead of the pure Python versions. Could you elaborate on that in the Tutorial, please?