The incident happened on 20 May 2020, when officers attended an address in The Grove, Idle on enquiries relating to firearms intelligence.
On gaining entry to the property, the suspect was brandishing a machete and assaulted the attending police officers.
Two of the officers were taken to hospital where they received treatment for serious injuries to their arms and head. Both have recovered from their injuries and are back on full duties.
Corbin Samuels, 28, of The Grove, Idle, was arrested at the scene and taken into custody.
He was later charged with two counts of wounding with intent and another offence of importing a prohibited firearm.
Samuels appeared at Bradford Crown Court and was sentenced to 8 years in prison.
Detective Chief Inspector Andy Farrell, of Bradford District Police, said: “We welcome the sentence that has been passed down to Samuels today for a despicable attack on serving police officers who were simply conducting their duties.
“The incident was incredibly distressing for all officers involved, but thankfully they have all made a full recovery from the physical injuries and have received help and support from Bradford District.
“Any assault on a police officer or staff is completely unacceptable and as a Force we will take a robust action to any individual who carries out such needless and vicious acts of violence.”