  A Hamiltonian formulation of the classical world-sheet theory in a generic,
geometric or non-geometric, NSNS background is proposed. The essence of this
formulation is a deformed current algebra, which is solely characterised by the
generalised fluxes describing such a background. The construction extends to
backgrounds for which there is no Lagrangian description -- namely magnetically
charged backgrounds or those violating the strong constraint of double field
theory -- at the cost of violating the Jacobi identity of the current algebra.
  The known non-commutative and non-associative interpretation of non-geometric
flux backgrounds is reproduced by means of the deformed current algebra.
Furthermore, the provided framework is used to suggest a generalisation of
Poisson-Lie $T$-duality to generic models with constant generalised fluxes. As
a side note, the relation between Lie and Courant algebroid structures of the
string current algebra is clarified.
