I think it would be if you have a good instructor who gives you good cues to make modifications. Unfortunately, I went post-partum and hurt my back after one class. you have to be very careful that your back is supported.
If you are out of shape, I would recommend getting more in shape first and if you are interested, doing somethig like Pilates to strengthen your core to help prevent injury.