Did you hear the one about the housewife who walks into a comedy club?

On a summer day in a park in Brooklyn, the sun savaged a swarm of actors in sturdy wool coats and pert hats. The men were sweating. The women were sweating. Even the carousel horses looked hot.

The overdressed crowd had gathered to shoot the season finale of “The Marvelous Mrs. Maisel,” the Amazon series created by Amy Sherman-Palladino available now for streaming. As set decorators and wardrobe crew remodeled summer 2017 into fall 1958, Midge Maisel (Rachel Brosnahan), the show’s strong-willed heroine, hosted a birthday party for Ethan, her 4-year-old son, while discussing divorce with Joel (Michael Zegen), her man-child husband.

Not that she could do much of anything until Matteo Pascale, the child actor playing Ethan, said his line, “Go away!” The boy, perched on a carousel pony, didn’t want to say it.

Brosnahan tried sympathy: “I know you would never say that to your mom, but I’m only pretend.”

Be the first to know.

No one covers what is happening in our community better than we do. And with a digital subscription, you'll never miss a local story.

That’s a controversial statement. As the latest show from Sherman-Palladino, who created “Gilmore Girls” and “Bunheads,” “The Marvelous Mrs. Maisel” is predicated on the great pleasure of hearing brainy, mouthy women talk until their lips ache.

Brassy, raw and riotously confessional, Midge is a dedicated homemaker and accidental comedian who can hold her own against even the gab-gifted Gilmores. In the pilot episode, Midge’s comfortable life on the Upper West Side collapses. Rain-wet and grief-drunk (drunk from kosher wine, too), she finds herself onstage at the Gaslight Cafe, a grimy Greenwich Village club. And she seizes the mic.

The next few minutes, a mix of caustic anecdotes and off-color zingers, earn her a standing ovation and a public indecency arrest. A foremother that modern comedy should have had, Midge is a reverse-engineered ancestor of contempory female comedians Ali Wong or a Tig Notaro.

On a weekday morning in early fall, Sherman-Palladino, mouth and all, sat next to her husband, Daniel Palladino, a director, writer and executive producer on the show. They had crammed together onto a couch in a corner of the Chelsea sound studio where they had met to edit the first-season finale. On the street below, a woman walked by wearing a tank top that read, “Oy with the poodles already,” a beloved “Gilmore” catchphrase. “It’s funny what people pick up on,” Palladino said.

As in Sherman-Palladino’s previous shows, “The Marvelous Mrs. Maisel” pals around with a woman after a domestic cataclysm sort of just happens. Lorelai Gilmore, a Harvard-bound debutante, has a kid at 16 and flees her upper-class family for an unglamorous job at an inn. Michelle Simms, the protagonist of “Bunheads,” goes from Vegas showgirl to beach town widow. Midge Maisel puts down the Pyrex and picks up a mic.

Like Lorelai, like Michelle, Midge finds herself “in a whole other life that she hadn’t really thought about or considered,” Sherman-Palladino said.

As compared with those other shows, that life is a lot more artfully rendered. Midge has a knockout period wardrobe in sea green and paradise pink. Midcentury New York cleans up well, too.

Amazon’s investment, combined with the reasonable success of “Gilmore Girls: A Year in the Life,” which has streamed on Netflix since 2015, signals a return to form for the couple after a wobbly decade. A contract dispute pushed them out of “Gilmore Girls” after six seasons. The 2008 sitcom “The Return of Jezebel James” ran for only three episodes. “The Wyoming Story,” a pilot for CW, was not picked up. Even “Bunheads,” which delighted critics and obsessed fans, was canceled by ABC Family after a single season.

But as Palladino described it, “Those were golden years for us, are you kidding? We like not working.” (Like the husbands in the shows they create, Palladino speaks a lot less volubly than his wife.)

It’s a pleasure they haven’t been indulging. For the first season of “The Marvelous Mrs. Maisel,” they wrote and directed seven of the eight episodes. They chose the chirpy music (heavy on the Peggy Lee), they oversaw the jewel-tone design, they masterminded the editing and the sound mixing.

Though they usually can’t sort out which of them does what, Sherman-Palladino, who as a teenager sold cigarettes at the Comedy Store, the famed Los Angeles club, tasked herself with writing all of Midge’s stand-up routines. She didn’t do much research into the women of late-1950s comedy. (There isn’t much research to do.) But she did snatch inspiration from Totie Fields, a no-filter regular on “The Mike Douglas Show,” and from Joan Rivers, who lobbed lines like “No man has put his hand up a woman’s dress looking for a library card.”

“Which is a racy joke and one of the best jokes ever,” Sherman-Palladino said.

In searching for someone to land Midge’s punch lines, she and Palladino auditioned several comic actresses but went for Brosnahan, a dramatic actress who played a flinty prostitute on “House of Cards,” a disaffected physicist’s wife on “Manhattan” and a sympathetic Desdemona opposite Daniel Craig in an off-Broadway “Othello.” During her audition, Brosnahan nailed the stand-up scene, intuiting how Midge derives her comedy from confusion and distress. “She leaned into the anger,” Sherman-Palladino said.

Palladino added, “That’s what all stand-up comics do.”

Brosnahan said she doesn’t think of herself as a comedian. She has never tried stand-up, except while filming, and she doesn’t plan to. “The idea of doing an open mic makes me throw up,” she said, sitting in a West Village cafe near the clubs where Midge would have performed. (Rain had curtailed a walk past those clubs.)

To play Midge, Brosnahan consulted a stack of vintage Good Housekeeping magazines, clipping articles about wifely deportment. She also studied the routines of the pioneering comic Jean Carroll, “this beautiful, graceful woman who wore pearls and gorgeous dresses and sang a little,” Brosnahan said.

Shooting the pilot, she felt “horrified, just petrified” about the stand-up sequence. Having shot seven more episodes, she added, “I remain completely petrified in a really satisfying way, you know?”

What else might satisfy?

Midge herself, who Sherman-Palladino describes as “pure energy and pure light and such strength,” which makes her sound like a lot of Sherman-Palladino’s talky, resilient women.

But there’s a key difference. Midge, Sherman-Palladino said proudly, has found “a much bigger audience to mouth off at.”

Golden Globes tonight

“The Marvelous Mrs. Maisel” has been nominated for Golden Globes for best television series, musicial or comedy, and Rachel Brosnahan for best actress.

The Golden Globes will be broadcast tonight at 6 on NBC. The “arrivals” show is at 5 p.m., also on NBC.

Inside: A list of the nominees - D7

“Marvelous” winner

“The writers take their time getting Midge out of the house and onto the comedy stage, but that enables them to develop the character naturalistically. It wouldn’t be credible at all if Midge became an overnight comedy star in the first episode. She gets funny when she’s drunk and angry at some aspect of her life. She’s also wary of whether she has what it takes to push her way up from the bottom in the world of standup. Bit by bit, she’s finding her “c: (as in “comedy”) legs, though, and we can happily wait for the punch line.”