Python Libraries

by jesse in ,


Does anyone have any good "guides" for build nicely self contained Python Libraries? I'm converting a few thousand lines of code from application-specific libraries to thing that will be dropped into site-packages. While I have a really good idea about what has to be done, I'm looking around for something that says something akin to "good idea, bad idea". For example:

  • Logging to the screen, or stderr (unless raising an error) : Bad Idea
  • Not properly checking for dependencies : Bad Idea
  • Properly raising exceptions (and providing custom ones) : Good Idea
  • Unit Tests and PyDoc : Good Idea

I'm still scouring for information, but any suggestions and pointers are welcome.