 This paper proposes a local flexibility market framework which enables multiple participants to buy and sell flexibility services such as prosumer or community self-balancing, congestion management and time of use optimization. The local market operator supervises these transactions within the local energy community with the distribution system operator, balance responsible party and end-users participating voluntarily. The local market can be used to sell loads, generators, storage units and electric vehicles, while interactions between all stakeholders, inputs and outputs of the local market algorithm and a case study are presented. The proposed local flexibility market framework has the potential to postpone grid upgrades, reduce energy costs and increase distribution grids hosting capacity. This article was authored by Paul Olivelle Roselle, Paul Lauret Gallego, Ingrid Montcalado and others.