I am working on a project that requires infrared communication between 2 Raspberry Pi 2Bs using GPIO and Python. However, I am unable to locate a tutorial on the Internet, as it displays pages on remotes. Could you please point me in the right direction? Thanks in advance.
While using the GPIO directly is interesting and fun to try, there are some physical layer signaling issues you will have to deal with. IR remote communication operates with a modulation that has zero DC offset, allowing the receiver to filter out the DC component of the received signal, thus eliminating constant IR light sources (like stray sunlight).
I recommend using USB IR blasters and receivers. While the programming API will be completely different, I think you will be more successful. Search Google for "USB IR blaster" and "USB IR Receiver" to find suitable components.