An 11-week-old golden retriever puppy was seconds away from becoming a python's breakfast after it was strangled in a residential Sunshine Coast backyard.

Frederick Cogez was woken up about 8.30am on Saturday to the sounds of the family's new dog, Patapouf, barking.

When Mr Cogez ran downstairs in his Marcus Beach home, he found a 2-metre carpet python fully wrapped around his dog, which had a bite to its foreleg.

Mr Cogez's wife, Shamin, called police who advised he should hit the python on the head with a broom.

"I opened my window and the kids were yelling and in a little bit of panic," Mr Cogez said.

"I saw a big python around the body of my puppy.

"By the time I got down with a broom, the dog was out of breath and the python was attacking him.

"I'm not so familiar with pythons as in France, we don't have them."

Mr Cogez moved to Brisbane from France five years ago, but had only made the move to the Sunshine Coast one month ago.

While he had had snake encounters, there had never been one this close.

"I managed to stick the snake's head under the broom, but its tail was still around my dog — it was still strangling my dog.

The python was easily hidden in the Noosa garden and has since been relocated by a snake catcher. ( Supplied: Frederick Cogez )

"It was like that for another 30 seconds and my doggy was jumping all over the place, trying to get rid of the strangulation.

"The police said to keep banging on its neck."

The python finally let go.

"My pooch, he jumped away, it was a big relief, but it was still in shock and it was bitten on the leg."

Frederick Cogez is very relieved that Patapouf is safe and well after its ordeal. ( Supplied: Frederick Cogez )

'Unusual' attack

Mr Cogez took the puppy to the Noosa District Animal Hospital to see vet Stephanie Zurek.

Dr Zurek said it was common for pythons to try and eat kittens, but she had not heard of one attacking a dog.

What if your pet has been bitten by a snake? Signs of snake bite include:

Sudden weakness followed by collapse

Sudden weakness followed by collapse Shaking or twitching of the muscles and difficulty blinking

Shaking or twitching of the muscles and difficulty blinking Vomiting

Vomiting Loss of bladder and bowel control

Loss of bladder and bowel control Dilated pupils

Dilated pupils Paralysis

Paralysis Blood in urine Source: RSPCA

"This is a little bit far-fetched as the puppy is about 8 kilos, but the snake just wanted to eat it and saw it as an opportunity for a long-lasting dinner," she said.

Dr Zurek said it would have been very difficult for the owners to pull the python off the dog.

Due to the hot weather the veterinary practice has been seeing a lot of snake envenomations to pets, but strangulations by a non-venomous snake was atypical.

"A non-venomous snake trying to kill an animal that way and eat it is unusual," she said.

Dr Zurek said cats did not come off as well as dogs because they were "softer boned" and could get strangulated and asphyxiated very quickly.

Fortunately for Patapouf, the puppy survived the incident relatively unscarred.

"It has had a good meal and a good bowl of water and plenty of hugs and kisses from the family," Mr Cogez said.

He has also had the comfort of its best friend, a kitten called Tigrou, which even accompanied Patapouf to the veterinary practice.

Mr Cogez said he always went everywhere with the dog and it was inside when the attack occurred.

The family called a snake catcher and the snake has since been relocated to search for its meals elsewhere.