A little while ago, I backed a Kickstarter campaign to fund the development of the BerryIMU. It’s a (very) small board that gives you access to a gyroscope, magnetometer, accelerometer, pressure/altitude sensor and temperature sensor through the I2C protocol. Mark Williams, creator of the board, has now published a Python library that will help you to get readings out of it (previously he’d developed a C library). Read more about the code and download it here.
You can buy a BerryIMU from his site (although it’s currently out of stock, unfortunately).