Blender related python snippets to get you started. Learn blender bpy today.
http://www.blender.org/api/blender_python_api_current/ As of 10/11 november 2015 we can now link to the current api docs and not be worr...
For a less refined solution, add a circle mesh and apply a screw modifier :D
Please use Blender.StackExchange.com for python scripting questions unrelated to this post.