The city council shall have power, subject to any limitations in general state law, to provide for the levying and collection of a business or occupation tax upon any trade, business, profession, or occupation except such as are exempt by law, carried on inside the city limits and upon inhabitants of the city who engage in or offer to engage in any profession, trade, business, or occupation in the city, and on such persons as live outside the limits of the city but who engage in or attempt or off er to engage in any profession, business, grade, or occupation not exempt by law, inside the limits of the city, as the city council may deem expedient for the safety, benefit, convenience, and advantage of the city. This tax shall be in the nature of a license, which must be paid in advance of practicing or engaging in such profession, trade, business, or occupation, and the city council shall provide by ordinance for the punishment of all persons required by ordinance to pay such occupation tax, or take out license for same, who engage in such business, trade, profession, or occupation before paying such tax or taking out such license and complying fully with all the requirements of the city council made in refer• ence thereto.