While Hulu’s new series “Harlots” looks at two brothels in 18th-century London, the show isn’t simply a costume drama with sex.

Still, it may seem surprising that one of the show’s creators Moira Buffini points to HBO series “The Sopranos” and “The Wire” as an inspiration for the series.

“There are so many clichés in dramas about prostitutes or whores where they either get saved, married, redeemed or they die a horrible tragic death,” says Buffini. “We wanted to do none of those. We really wanted to show ordinary people surviving in a really brutal economy.”

How brutal? According to the series and historians, as many as one in five young women were prostitutes in London during the Georgian era, which spanned from 1714 to 1830. Females at the time had precious few choices in life — basically, menial laborer or wife. The average prostitute could make something like 80 times in a year what a charwoman, or cleaning woman, would make.

Prostitution was even encouraged in English society, according to historian Dan Cruickshank, the author of “The Secret History of Georgian London: How the Wages of Sin Shaped the Capital.” Men of wealth often led dual lives — one with their wife and families and one spent visiting brothels. Many of those houses of ill-repute were in Covent Gardens, the epicenter of sex trade then and now, a bit ironically, a famed tourist site known for its lovely Georgian architecture.

The sex trade in the Georgian era was anything but secret, however. Famous artists, writers and, of course, royalty all took part.

“It was like two different societies,” says Buffini. “Men could move between both, but women were stuck in their own half of that society. Like, there could be no way that a harlot would ever be accepted in decent society.”

What drew Buffini — a playwright and screenwriter (“Tamara Drewe,” “Jane Eyre,” “Byzantium”) — to the subject was, however, something much racier. Producer and co-creator of “Harlots” Alison Owens (“Elizabeth”) gave her a copy of the infamous “Harris’s List of Covent Garden Ladies,” telling her she should write about it.

The anonymously written directory of London prostitutes began circulating yearly in the late 1740s and continued until the late 1790s. It contained descriptions of sex workers such as this one: “She can cast her lover to a pleasing height, and receive him again with the utmost dexterity. Her price is one pound one.”

“Moira has written something that’s true if you ever read ‘Harris’s List,’” which is a hilarious read,” insists Lesley Manville, who plays Lydia Quigley, the Lady Macbeth of brothel owners in “Harlots.” The actress describes the character as “so deliciously vile and power crazed.”

Samantha Morton portrays Margaret Wells, Lydia’s rival, a prostitute who has risen from the streets to run her own house and is deeply ambitious for her two daughters. “This city is made of our flesh. Every beam, every brick,” Margaret snarls at one point.

Jessica Brown Findlay, known as Lady Sybil Crawley on “Downton Abbey,” is the elder of Margaret’s daughters, Charlotte, who producer Debra Haywood (“Les Misérables”) calls the “it” girl of London. The fiery Charlotte is the kept woman of a wealthy patron who likes to show her off around the city.

“There were places where everybody met, and the theater was one of those places where decent society and indecent society would come together,” explains Buffini. “The top courtesans were real stars. People would be looking at the courtesans in the boxes more than the actresses on the stage, who were also courtesans.”

Margaret’s other daughter is the teen Lucy (Eloise Smyth). Born into the profession, her mother is auctioning off Lucy’s virginity to the highest bidder. According to historians, “deflowering rights” would fetch huge amounts of money and the sex trade was a driving force in London’s economy at the time.

“The Georgian period was right out there like the ’20s, like the ’60s,” notes Hayward. “It was a rich … more flamboyant, more colorful and less moralistic period. And we wanted to reflect that, make something that is also incredibly entertaining as well.”

Rather than being prurient and titillating, Owen says, “Our rule from the beginning was ‘everything from the whore’s eye view.’”

As for her inspirations, Buffini saw that while “The Sopranos” involved criminal activities it was the family dynamics that fascinated audiences. So while sex may be a selling point for her series, she hopes viewers will become interested in the characters’ relationships.

As for “The Wire,” she says, “It’s about its citywide view of the economy. In ‘The Wire’s’ case, it was about drugs. In our case it’s sex, but you still follow the money.”

As evident from the art and the fashion, the Georgian era was very colorful.

“The outfits were absolutely preposterous,” says Buffini. “We just embraced the craziness. The men wear yellow and pink and have bows on their shoes, and they wore wigs that make them look like Coco the Clown. To our eyes, they look utterly ridiculous and quite unmasculine.”

Since London was the trading capital of the world, it was also a cosmopolitan city. Although slavery had not been abolished in England, there were a number of free blacks as well as numbers of Chinese and Indian people.

“It was really a multicultural city,” says Buffini, “and so we wanted to write about that. It brings something fresh to costume drama to see a black man dressed as a Georgian dandy,” referring to Danny Sapani who plays Margaret’s lover and partner, William North.

“Harlots” also brings a contemporary soundtrack to the show.

“What are you going to do — play harpsichords?” asks Manville, who adds that the music brings a present-day feeling to the show.

While “Harlots” tried to be rigorous about the history, Buffini stresses, “Even if you are doing a period drama, the story has to be about now. You are really writing for a contemporary audience, and we are looking at our world and our relationships with each other through the prism of history.”