A Cotswolds town has been named among the best places to live in the UK.