A former medical student who raped an unconscious woman at a Calgary party was led away in handcuffs after receiving a sentence of nearly four years.

Prachur Shrivastava, 27, was convicted of sexual assault following a trial last year.

His victim, whom CBC News is calling Laura because her identity is protected by a court-ordered publication ban, says she is relieved Shrivastava won't be able to harm anyone while in prison.

Shrivastava had been partying with fellow medical students and others in Calgary in 2014 when he raped Laura, who had passed out in a friend's living room.

"No sentence will ever be enough after what he did," said Laura after learning of the sentence of three years and nine months. "My life will forever be altered. But knowing that he is behind bars finally after all this time brings me relief.​​​"

Prosecutor Tiffany Dwyer had proposed a four- to five-year sentence while defence lawyer Dale Fedorchuk asked the judge to send his client to jail about nine months.

Shrivastava had to withdraw from the University of Toronto's medicine program when charges were laid but the school did allow him to complete a master's degree in biotechnology. He is now employed by a California-based medical technology firm and has two job offers.

His lawyer had argued he led "an exemplary life" and caved to temptation due to stress.

On Wednesday, Court of Queen's Bench Justice Jolaine Antonio said she would not consider Shrivastava's accomplishments as a mitigating factor in her sentencing decision.

"Positive conduct witnessed by others is of limited utility in sentencing an offence committed in secret," wrote Antonio. "I find no place for the abstract notion that good deeds can create a bank of credit to be drawn on sentencing.

"I do not find in Mr. Shrivastava's status, aptitude, employment or education any circumstances that are exceptional or relevant to principles of sentencing such that they operate in mitigation."