How to get docname of the doctype on the server side

I have a doctype name Library Dashboard. it is single page doctype and in this doctype i want to set the value of this doctype particular filed. In order to achieve the same i have implemented the below code, I do have all parameter except docname and i am stuck here and i am not able to figured out the docname. I have tried to explore docs but it was not helpful for me the only thing

i want to know how do i get this docname parameter?

from __future__ import unicode_literals

import frappe

from frappe import _

from frappe.model.document import Document

from frappe.utils import date_diff, nowdate, formatdate, add_days

class LIbraryDashboard(Document):

    def totalBooks():

        totalBookCopy = 0

        bookNumberCopies = frappe.get_list("Book List", fields = ["no_book_copy", "book_name"], limit_page_length = 50000)

        bookNumberCopiesList = list(map(lambda keyValue:keyValue["no_book_copy"] , bookNumberCopies))

        totalBookNumber = sum(bookNumberCopiesList)


        frappe.db.set_value("LIbrary Dashboard",, 'total_no_books', totalBookCopy);

anyone having idea?

While defining a function in a class pass the self argument

def totalBooks(self)

Then you can simply set any field with
self.fieldname = value

Thanks for the reply of this question
I have tried this but its not working… but I have resolved this issue in the place of docname (“LIbrary Dashboard”) we will use the doctype name(“LIbrary Dashboard”) .