<p>I am working on developing a pair of libraries to work with a REST API.  Because I need to be able to use the API in very different settings I'm currently planning to have a version in PHP (for web applications) and a second version in Python (for desktop applications, and long running processes).  Are there any best practices to follow in the development of the libraries to help maintain my own sanity?</p>

Well, the obvious one would be to keep your naming consistent.  Functions and classes should be named similarly (if not identically) in both implementations.  This usually happens naturally whenever you implement an API separately in two different languages.  The big ticket item though (at least in my book) is to follow language-specific idioms.  For example, let's assume that I were implementing a REST API in two languages I'm more familiar with: Ruby and Scala.  The Ruby version might have a class
```
MyCompany::Foo
```
which contains method
```
bar_baz()
```
.  Conversely, the Scala version of the same API would have a class
```
com.mycompany.rest.Foo
```
with a method
```
barBaz()
```
.  It's just naming conventions, but I find it goes a long way to helping your API to feel "at home" in a particular language, even when the design was created elsewhere.
Beyond that I have only one piece of advise: document, document, document.  That's easily the best way to keep your sanity when dealing with a multi-implementation API spec.