A young boy sits on the python and goes for a ride. Photo: Viralhog@YouTube.

A video showing a toddler playing with a giant python has gone viral on the internet, with many outraged that the young boy’s parents allowed him to play with the large reptile.

The video, reportedly filmed in East Java, Indonesia, shows the boy laughing and playing with the python. He even sits on it and goes for a ride on its back.

In a move many thought would provoke an attack by the large snake, the boy grabs the snake by the neck and tries to lift it, Metro reported.

The boy was too young to speak full sentences, according to the video. Fortunately, the python did not hurt the youngster and instead was trying to slither away from him.

The video was believed to have been taken by the child’s parents, who were criticized for putting their child in danger.

In May, a video showing two girls riding on the back of a huge python in Indonesia triggered a debate on the internet. Some slammed the parents for being irresponsible, while some others said it was good to let children experience wildlife.

In June, a woman’s body was retrieved from a 27-foot python after it swallowed her whole while she was gardening in Indonesia. The rising trend of python attacks could be due to the expansion of oil palm plantations in the country, Times Now reported.

Read: Video of girls riding on python triggers online debate

Read: Woman swallowed by 23-foot python in Indonesia

Asia Times Financial is now live. Linking accurate news, insightful analysis and local knowledge with the ATF China Bond 50 Index, the world's first benchmark cross sector Chinese Bond Indices. Read ATF now.