Nathan Flynn (19) of 21 Millbrook, Portlaoise appeared before the local court last week charged with possession of drugs for the purpose of selling or supply and possession for personal use on May 26, 2020.
Sgt JJ Kirby told the court that Mr Flynn was stopped on a bike at Harpurs Lane on the date in question.
He had a package.
Cannabis herb to the value of €1,426 was found in the package.
Defending solicitor Josephine Fitzpatrick said that Mr Flynn had an entrenched drug habit and was unable to progress because of it.
Judge Catherine Staines sentenced him to ten months in the Midlands Prison and suspended the last six months of it.