How to get current user in DocType Controller

I have Doctype Project with Fields

Project Name: Data
Created By: Link (its Linked to User Doctype) and read only .

how I put current user in that field when ever project is created.

Basic solution to get user and put it somewhere. Would need more context/details to flesh it out.

let user = frappe.session.user
frm.set_value("data", user);

This works

class Project(Document):
	def before_save(self):
		print("User -> ",get_user().doc)
		self.created_by = get_user().doc