A power supply comprises a rack, a circuit board, a switch
assembly and a bolt lock
assembly. The rack is provided with an
open hole, a first open groove and a second open groove. The circuit board is arranged in the rack. The switch
assembly comprises a button part, a body and a
coupling part. The body is embedded in the
open hole, the button part is arranged on the body and located on the outer side of the rack, and the
coupling part is arranged on the body and can be selectively connected with or disconnected from the circuit board. The bolt-lock assembly comprises an operating piece and a bolt-lock piece. The operating member has a pressing portion and an extending portion. The pressing part is connected with the extending part and provided with a first groove in a protruding mode, and the extending part is connected with the bolt-lock piece. The bolt-lock piece is connected with the
machine frame and provided with a buckling part, and the buckling part protrudes out of the
machine frame from the second open groove. When the button part is far away from the rack and the
coupling part forms an open circuit, the pressing part moves towards the hole along the first open groove under the action force, and the buckling part is driven to move towards the interior of the rack.