Choosing transistor for a raspberry pi switch
Something along the lines of this circuit would work:



Simulation:



Any decent logic level P-ch MOSFET with suitable current capability will work. An example is the NDP6020P. The NPN can be almost any small, general purpose NPN (e.g. 2N2222, 2N3904, BC337, etc)