The Swans were well on top but they were pegged back by two goals in three minutes from the visitors.
Jay Bothroyd netted in the 32nd minute and Cardiff skipper Mark Hudson headed in at the far post to level the scores.
Swansea piled the pressure on in the second half and Pratley volleyed home the winner in the 59th minute.
All Cardiff had to offer in that second period was a Ross McCormack free-kick that hammered against the home woodwork.
Sousa was delighted with his side's success.
"We played very well, were well organised and showed great energy from the start. We never lost focus and concentrated for the whole game," he said.
"At half-time we knew we had to control the match to win and when we don't make mistakes we know we will win games.
"We try to start each match positively. Making the right decisions but we have to keep our concentration as we gave away two simple goals.
"We must work on that to be stronger as a team and that will be our aim as we believe in ourselves.
"I have seen what it means to be a supporter of this club."
It was all Swansea in the opening stages and the Cardiff defence buckled under the constant pressure.
They failed to clear a Pratley free-kick and Dyer, the smallest player on the pitch, looped a header over the defenders and into the Cardiff net.
Worse was to follow for the Bluebirds as a Craig Beattie shot ended up with Pratley, who promptly hammered it into the net from close range.
When Cardiff pulled one back just after the half-hour it was totally against the run of play as Bothroyd raced on to a Chris Burke through-ball to slot home.
Two minutes later Hudson rose highest at the far post to head an Adam Matthews free-kick into the net from an oblique angle.
Both sides went looking for the winner in the second half and it went deservedly to the Swans when Pratley met a Federico Bessone cross to volley in from close range.
Cardiff boss Dave Jones bemoaned his side's poor start.
"We never started well and gave two silly goals away and we have to be much better than that," he moaned. "We came out stronger in the second half but then gave away another bad goal.
"We never had any creativity about us and couldn't get any tempo going but full credit to Swansea who have the points and now we must wait until the return match to get this one out of our system.
"Any time you lose you let the fans down but we have to put up with it today and the season doesn't end with two derby matches so we have to fight back in our next game.
"After being back in the game we should have gone on to get something out of it but it wasn't to be.
"We missed three big players for us and all those that came in did their best but it wasn't a good enough team performance."