Sometimes, you'd like to have a pet but don't have a lot of room in which to keep a pet. Don't despair - there are a lot of pets that don't require a lot of room or a lot of exercise that might be good company in your small space. Just be sure to be a responsible exotic pet owner: make sure your pets are legal where you live and also make sure pets are permitted by any rental or tenant agreements you've made.
Mice are great pets for small space, particularly if you won't have much time for handling them but want something cute and furry. I find them fun to watch, but make sure you get a pair or small group of females as they are social and will be happiest and most active with company (a pair or trio of females can share a fairly small cage). Males are a bit trickier especially in a small cage as they will usually fight, necessitating separation (and they do tend to have a stronger odor).
2. Hermit Crabs
While hermit crabs don't need a lot of space, don't be taken in by the shops and kiosks that sell hermit crabs with the tiny plastic box -- they need a bit more room than that. Still, a 10 gallon tank can house a couple of medium or a few small hermit crabs, and they can be quite fascinating to watch. Because they are quite social, you should keep at least a pair so they have company.
The cage for hamsters doesn't need to be huge, and these are pets that can be tamed and easily taken out and handled (and allowed to run around for a bit of exercise). A choice can be made between Syrian hamsters (larger, solitary), dwarf hamsters (smaller, can be kept in same sex groupings), or Chinese hamsters (also quite small, sometimes do well in same sex groups too, and are usually very tolerant of handling).
Emperor scorpions are quite happy to live in a small tank and definitely interesting to watch. Like tarantulas they are quiet and clean and pretty easy to care for. They are also not terribly venomous, though a sting would be very painful so handling is not recommended.
Giant Madagascar hissing cockroaches are definitely on the unusual side (a pet cockroach?) but these large cockroaches are quite nice. Their size makes them easy to handle, and like other cockroaches they are sturdy and pretty self sufficient, requiring fairly minimal care.
There are quite a few frogs that are suitable for small spaces. Dwarf clawed frogs are very small and completely aquatic, so a small (but not too small) aquarium set up suits them fine. American green tree frogs are small and can do well in a 10 gallon terrestrial type tank, though being tree frogs a tall tank is preferred. Leopard frogs and oriental fire bellied toads are both semi aquatic and can live in a 10 gallon tank. And, despite their large size, pacman frogs are pretty sedentary and can also do fine in a 10 gallon tank.
These are also definitely non-traditional pets, but they can live in quite a small tank and area quite fascinating. Make sure they are legal where you live, though.
In my opinion, leopard geckos and house geckos are among the best choices for reptile pets, especially for beginners. In addition, they do not need a whole lot of cage space, so they are a good choice if you do not have the room for an elaborate vivarium set up. Still, they will need a decent sized tank (15-20 gallons) so they are not great for really small spaces. Leopard geckos tend to be the most commonly available, but house geckos can also be found.
10. Corn Snake
Among snakes, corn snakes are good for beginners and don't need a huge tank to have a good set-up. However, they do need a larger enclosure than moat of the other pets on this list so will take up a bit more room, but a 20 gallon tank should be fine for an adult. These are also nice snakes that are pretty easy going and easy to care for.