You don’t need a weatherman to know which way the wind blows. You just need Mayor Bill de Blasio.

The far-left true believer made a spectacle of himself when he hesitated to endorse his old boss Hillary Clinton in the 2016 primaries over Sen. Bernie Sanders, the self-styled socialist who sings all Hizzoner’s favorite tunes. When he finally came around, the New York Times’ Michael Grynbaum called it de Blasio’s “slow, awkward march toward endorsing Hillary Rodham Clinton — the woman who jump-started his political career.”

His eventual endorsement was flat and dismissed as cynical. It was clear de Blasio was merely pretending to think Clinton was still the Democrats’ future, when he and so many others obviously were feeling the Bern.

Well, now he doesn’t have to pretend: The Post reports de Blasio, who was sworn in for his first term by Bill Clinton, has decided that on New Year’s Day, as he begins his second term, Sanders will be given the honor of honoring Hizzoner.

It tells us something about Blas, but it’s also a good illustration of the Democratic Party’s own transition from nose-holding Clintonites to proud pseudo-socialists.

Donald Trump’s defeat of Hillary Clinton did more than make the Democratic Party a tool for cool bumper-sticker “resistance” sloganeering. As a few remaining Clinton holdouts gripe on social media over Vanity Fair asking Hillary to find a new hobby in 2018, the writing is on the wall in big letters: We’re moving on, and that special brand of foggy centrism that both Clintons perfected is as dead as that groundhog de Blasio goofily fumbled onto the cold concrete.

The far left has staged a coup that would make the Sandinistas jealous: When de Blasio is sworn in by Sanders on Jan. 1, it’s a formal announcement that the inmates are officially in charge of the asylum.

Not that de Blasio has ever pretended not to be an inmate. He’s been peddling his particular brand of progressivism around the country for years.

In 2015, de Blasio flew to Washington, DC, to lay out a 13-point progressive contract with America. This month found him back in Iowa — yes, back: He’s been acting an awful lot like a future candidate for president.

Just as de Blasio rode the Clintons’ coattails to Gracie Mansion, he’ll now attempt to ride Bernie’s straight to the White House.

The destruction of the Clinton machine at the hands of President Trump has finally allowed the loony left to shed their masks, don their red berets and march proudly through the streets — and de Blasio can barely contain his own excitement over it. The best thing for the far left wing of the party was a Hillary Clinton loss, and they know it. A Hillary presidency might very well have snuffed out the populist, Occupy Wall Street, anti-capitalist activist wing of the party in its sleep.

Now, riding the wave of “resistance” and co-opting the populist rhetoric of the right, Sanders and de Blasio believe they can redress their party’s failed promises to the white working-class and union voters who turned their backs on the Dems in 2016.

De Blasio will praise Sanders on New Year’s Day and the duo will smile for the cameras, but make no mistake, there’s a real fight over who will get to lead the political left’s bold new revolution come 2020. De Blasio, Sanders and Massachusetts Sen. Elizabeth Warren will all most likely throw their ushankas into the ring. Blas knows that despite his very real general-election handicap of being yet another far-left, upper-East Coast faux intellectual, at least he’s not as old as the Ark of the Covenant.

De Blasio turning his back on the Clintons and fully embracing Sanders is the first in a long line of stunts to come. He’ll go wherever the party message is, though he prefers that message to be so far left, it takes the party right off a cliff.

But at this point, what do they have to lose? Onward, comrades!

Stephen Miller lives in New York and writes about politics and culture. Twitter: @redsteeze