To make all such ordinances, by-laws, rules and regulations, not inconsistent with the Constitution and laws of this Commonwealth, as may be expedient or necessary, in addition to the special powers in this section granted, for the proper management, care and control of the city and its finances, and the maintenance of the peace, good government and welfare of the city, and its trade, commerce and manufactures, and the same to alter, modify and repeal at pleasure; and to enforce all ordinances by inflicting penalties upon inhabitants or other persons for the violation thereof, not exceeding three hundred dollars ($300) for any one offence, recoverable with costs, together with judgment of imprisonment, not exceeding ninety days, if the amount of said judgment and costs shall not be paid.
53 P.S. § 23158