High-voltage direct current (HVDC) systems are increasingly incorporated into today's AC power grids, necessitating optimal power flow (OPF) tools for the analysis, planning, and operation of such hybrid systems. To this end, we introduce hynet, a Python-based open-source OPF framework for hybrid AC/DC grids with point-to-point and radial multi-terminal HVDC systems. hynet's design promotes ease of use and extensibility, which is supported by the particular mathematical model and software design presented in this paper. The system model features a unified representation of AC and DC subgrids as well as a concise and flexible converter model, which enable the compact description of a hybrid AC/DC power system and its OPF problem. To support convex relaxation based OPF solution techniques, a state space relaxation is introduced to obtain a unified OPF formulation that is analogous to the OPF of AC power systems. This enables the direct generalization of relaxation-related results for AC grids to hybrid AC/DC grids, which is shown for the semidefinite and second-order cone relaxation as well as associated results on exactness and locational marginal prices. Finally, hynet's object-oriented software design is discussed, which provides extensibility via inheritance and standard design patterns, and its robust and competitive performance is illustrated with case studies.