The Hammers announced the free-agent signing on New Year's Eve:
Per BBC Sport, Nasri will be free to play again on January 1, having completed an 18-month ban from the game because of the use of an intravenous drip treatment.
The 31-year-old's doping ban prompted his exit from Turkish side Antalyaspor in January 2018, and he began training with West Ham in November.
Nasri said of his decision to join the club:
"You choose a club and a project because of the ambition, and I think that West Ham has everything to be one of the biggest clubs in London, for sure. I mean, 60,000 people every game at home. We play in the Olympic Stadium. The training ground is there and you have owners who wants to invest and have a good team. Everything is there to be doing great things."
West Ham's official Twitter account provided further comments:
Nasri is a familiar face in the Premier League, having made over 200 appearances in England's top flight during nine years with Arsenal and Manchester City.
The Frenchman won two league titles with the latter, the second of which came under West Ham boss Manuel Pellegrini.
Pellegrini said he is "happy to be working with him again" and feels Nasri's technical ability will give his side "another dimension in our attacking play."
The Independent's Jack Pitt-Brooke is looking forward to seeing him back in action, while Football.London's Sam Inkersole believes he could be a good addition to the squad:
There's no denying the playmaker's talent, and at his best he can be a frequent provider of both goals and assists.
However, it could take him time to get up to speed after so long out of the game, and he has to show he can still perform at the top level.