MCPcopy Create free account
hub / github.com/O365/python-o365 / __init__

Method __init__

examples/onedrive_example.py:12–22  ·  view source on GitHub ↗
(self, client_id=client_id,
                 client_secret=client_secret, scopes=scopes)

Source from the content-addressed store, hash-verified

10
11class O365Account():
12 def __init__(self, client_id=client_id,
13 client_secret=client_secret, scopes=scopes):
14 self.client_id = client_id
15 self.client_secret = client_secret
16 self.account = Account(credentials=(client_id, client_secret))
17 self.authenticate(scopes)
18
19 self.storage = self.account.storage()
20 self.drives = self.storage.get_drives()
21 self.my_drive = self.storage.get_default_drive() # or get_drive('drive-id')
22 self.root_folder = self.my_drive.get_root_folder()
23
24 def authenticate(self, scopes=scopes):
25 result = self.account.authenticate(scopes=scopes)

Callers

nothing calls this directly

Calls 6

authenticateMethod · 0.95
AccountClass · 0.90
storageMethod · 0.80
get_drivesMethod · 0.80
get_default_driveMethod · 0.80
get_root_folderMethod · 0.45

Tested by

no test coverage detected