Geting File storage free space of my quota in python programing


I use the library shutil to get disk spaces:

  def disk_space():
      import shutil
      total, used, free = shutil.disk_usage("/")
      return total // (2 ** 30), used // (2 ** 30), free // (2 ** 30)

When I use this method, I get "63 GiB" free space. It dose not reflect my quota status. I think I get the over all disk space including my pythonanywhere account and others.

How can I get the similar disk information for my account in pythonanywhere?


Your user quota is on /home/aifinancenow and /tmp. The rest of the disk is shared.