I actually managed to do it, but i do not know if there is a better way than this :
from rdflib import Graph, URIRef, Literal, BNode
from rdflib.namespace import RDF, XSD
g=Graph()
g.add((URIRef("Obs001"), RDF.type, URIRef("sosa:Observation")))
bn = BNode()
g.add((URIRef("Obs001"), URIRef("sosa:hasResult"), bn))
g.add((bn, RDF.type, URIRef("qudt:QuantityValue")))
g.add((bn, URIRef("qudt:hasUnit"), URIRef("unit:DEG_C")))
g.add((bn, URIRef("qudt:value"), Literal(24.9, datatype=XSD.float)))