graphplug 0.2.2__tar.gz → 0.2.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. {graphplug-0.2.2 → graphplug-0.2.3}/PKG-INFO +13 -13
  2. {graphplug-0.2.2 → graphplug-0.2.3}/README.md +12 -12
  3. {graphplug-0.2.2 → graphplug-0.2.3}/graphplug/__init__.py +1 -1
  4. {graphplug-0.2.2 → graphplug-0.2.3}/graphplug.egg-info/PKG-INFO +13 -13
  5. {graphplug-0.2.2 → graphplug-0.2.3}/LICENSE +0 -0
  6. {graphplug-0.2.2 → graphplug-0.2.3}/graphplug/_auth.py +0 -0
  7. {graphplug-0.2.2 → graphplug-0.2.3}/graphplug/_errors.py +0 -0
  8. {graphplug-0.2.2 → graphplug-0.2.3}/graphplug/_http.py +0 -0
  9. {graphplug-0.2.2 → graphplug-0.2.3}/graphplug/_log.py +0 -0
  10. {graphplug-0.2.2 → graphplug-0.2.3}/graphplug/_operations.py +0 -0
  11. {graphplug-0.2.2 → graphplug-0.2.3}/graphplug/_request.py +0 -0
  12. {graphplug-0.2.2 → graphplug-0.2.3}/graphplug/_resources/__init__.py +0 -0
  13. {graphplug-0.2.2 → graphplug-0.2.3}/graphplug/_resources/base.py +0 -0
  14. {graphplug-0.2.2 → graphplug-0.2.3}/graphplug/_resources/calendar.py +0 -0
  15. {graphplug-0.2.2 → graphplug-0.2.3}/graphplug/_resources/files.py +0 -0
  16. {graphplug-0.2.2 → graphplug-0.2.3}/graphplug/_resources/mail.py +0 -0
  17. {graphplug-0.2.2 → graphplug-0.2.3}/graphplug/_resources/teams.py +0 -0
  18. {graphplug-0.2.2 → graphplug-0.2.3}/graphplug/_resources/users.py +0 -0
  19. {graphplug-0.2.2 → graphplug-0.2.3}/graphplug/_scopes.py +0 -0
  20. {graphplug-0.2.2 → graphplug-0.2.3}/graphplug/py.typed +0 -0
  21. {graphplug-0.2.2 → graphplug-0.2.3}/graphplug.egg-info/SOURCES.txt +0 -0
  22. {graphplug-0.2.2 → graphplug-0.2.3}/graphplug.egg-info/dependency_links.txt +0 -0
  23. {graphplug-0.2.2 → graphplug-0.2.3}/graphplug.egg-info/requires.txt +0 -0
  24. {graphplug-0.2.2 → graphplug-0.2.3}/graphplug.egg-info/top_level.txt +0 -0
  25. {graphplug-0.2.2 → graphplug-0.2.3}/pyproject.toml +0 -0
  26. {graphplug-0.2.2 → graphplug-0.2.3}/setup.cfg +0 -0
  27. {graphplug-0.2.2 → graphplug-0.2.3}/tests/test_errors_and_logging.py +0 -0
  28. {graphplug-0.2.2 → graphplug-0.2.3}/tests/test_files_teams_users.py +0 -0
  29. {graphplug-0.2.2 → graphplug-0.2.3}/tests/test_operations.py +0 -0
  30. {graphplug-0.2.2 → graphplug-0.2.3}/tests/test_redirect_and_construction.py +0 -0
  31. {graphplug-0.2.2 → graphplug-0.2.3}/tests/test_requests.py +0 -0
  32. {graphplug-0.2.2 → graphplug-0.2.3}/tests/test_resources.py +0 -0
  33. {graphplug-0.2.2 → graphplug-0.2.3}/tests/test_signin.py +0 -0
  34. {graphplug-0.2.2 → graphplug-0.2.3}/tests/test_transport.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: graphplug
3
- Version: 0.2.2
3
+ Version: 0.2.3
4
4
  Summary: Plug-and-play Graph API for Python: mail, calendar, files, teams, users and generic requests.
5
5
  Author-email: Vikram Balaji <vikram.x.balaji@gmail.com>
6
6
  License-Expression: MIT
@@ -80,7 +80,7 @@ async def main():
80
80
 
81
81
  async with graph:
82
82
  await graph.mail.send(
83
- to="alice@contoso.com",
83
+ to="alice@example.com",
84
84
  subject="Quarterly report",
85
85
  body="<p>Attached.</p>", html=True,
86
86
  attachments=["report.pdf"],
@@ -255,8 +255,8 @@ Delegated access. Works on the signed-in person's mailbox.
255
255
 
256
256
  ```python
257
257
  await graph.mail.send(
258
- to=["alice@contoso.com", "bob@contoso.com"],
259
- cc="team@contoso.com",
258
+ to=["alice@example.com", "bob@example.com"],
259
+ cc="team@example.com",
260
260
  subject="Build finished",
261
261
  body="<b>All green.</b>", html=True,
262
262
  attachments=["results.csv"],
@@ -275,12 +275,12 @@ async for message in graph.mail.inbox(search="invoice"):
275
275
 
276
276
  # Reply and forward
277
277
  await graph.mail.reply(message_id, "Thanks, on it.", reply_all=True)
278
- await graph.mail.forward(message_id, to="carol@contoso.com", comment="FYI")
278
+ await graph.mail.forward(message_id, to="carol@example.com", comment="FYI")
279
279
 
280
280
  # Send many at once; each entry takes the same arguments as send()
281
281
  results = await graph.mail.send_many([
282
- {"to": "a@contoso.com", "subject": "Hi A", "body": "..."},
283
- {"to": "b@contoso.com", "subject": "Hi B", "body": "..."},
282
+ {"to": "a@example.com", "subject": "Hi A", "body": "..."},
283
+ {"to": "b@example.com", "subject": "Hi B", "body": "..."},
284
284
  ])
285
285
  failed = [r for r in results if r["status"] >= 400]
286
286
  ```
@@ -327,14 +327,14 @@ start = datetime(2026, 10, 1, 14, 0, tzinfo=timezone.utc)
327
327
  event = await graph.calendar.schedule(
328
328
  subject="Design review",
329
329
  start=start, end=start + timedelta(minutes=45),
330
- attendees=["alice@contoso.com", "bob@contoso.com"],
330
+ attendees=["alice@example.com", "bob@example.com"],
331
331
  online=True,
332
332
  reminder_minutes=10,
333
333
  )
334
334
  print(event["onlineMeeting"]["joinUrl"])
335
335
 
336
336
  # Let Graph pick a time that suits everyone
337
- suggestions = await graph.calendar.find_times(["alice@contoso.com", "bob@contoso.com"],
337
+ suggestions = await graph.calendar.find_times(["alice@example.com", "bob@example.com"],
338
338
  duration_minutes=30)
339
339
  best = suggestions[0]["meetingTimeSlot"]
340
340
 
@@ -455,7 +455,7 @@ print(me["displayName"], me["jobTitle"])
455
455
  async for person in graph.users.find("smith"):
456
456
  print(person["displayName"], person["mail"])
457
457
 
458
- alice = await graph.users.by_email("alice@contoso.com")
458
+ alice = await graph.users.by_email("alice@example.com")
459
459
  boss = await graph.users.manager(alice["id"])
460
460
 
461
461
  async for report in graph.users.reports():
@@ -580,7 +580,7 @@ gave**.
580
580
 
581
581
  | Request form | Example |
582
582
  |---|---|
583
- | A tuple | `("GET", "/users/alice@contoso.com")` |
583
+ | A tuple | `("GET", "/users/alice@example.com")` |
584
584
  | A dict | `{"method": "PATCH", "url": "/me/messages/ID", "body": {"isRead": True}, "headers": {"Content-Type": "application/json"}}` |
585
585
 
586
586
  Each result has `id`, `status`, `body` and sometimes `headers`. Failures are reported in place,
@@ -636,7 +636,7 @@ or sign-in.
636
636
  from graphplug import GraphError
637
637
 
638
638
  try:
639
- await graph.users.by_email("nobody@contoso.com")
639
+ await graph.users.by_email("nobody@example.com")
640
640
  except GraphError as e:
641
641
  if e.code == "itemNotFound":
642
642
  print("no such user")
@@ -702,7 +702,7 @@ logged.
702
702
  import asyncio
703
703
 
704
704
  async with GraphClient.from_env(max_concurrency=8) as graph:
705
- ids = ["alice@contoso.com", "bob@contoso.com", "carol@contoso.com"]
705
+ ids = ["alice@example.com", "bob@example.com", "carol@example.com"]
706
706
  people = await asyncio.gather(*(graph.users.get(i) for i in ids))
707
707
  ```
708
708
 
@@ -51,7 +51,7 @@ async def main():
51
51
 
52
52
  async with graph:
53
53
  await graph.mail.send(
54
- to="alice@contoso.com",
54
+ to="alice@example.com",
55
55
  subject="Quarterly report",
56
56
  body="<p>Attached.</p>", html=True,
57
57
  attachments=["report.pdf"],
@@ -226,8 +226,8 @@ Delegated access. Works on the signed-in person's mailbox.
226
226
 
227
227
  ```python
228
228
  await graph.mail.send(
229
- to=["alice@contoso.com", "bob@contoso.com"],
230
- cc="team@contoso.com",
229
+ to=["alice@example.com", "bob@example.com"],
230
+ cc="team@example.com",
231
231
  subject="Build finished",
232
232
  body="<b>All green.</b>", html=True,
233
233
  attachments=["results.csv"],
@@ -246,12 +246,12 @@ async for message in graph.mail.inbox(search="invoice"):
246
246
 
247
247
  # Reply and forward
248
248
  await graph.mail.reply(message_id, "Thanks, on it.", reply_all=True)
249
- await graph.mail.forward(message_id, to="carol@contoso.com", comment="FYI")
249
+ await graph.mail.forward(message_id, to="carol@example.com", comment="FYI")
250
250
 
251
251
  # Send many at once; each entry takes the same arguments as send()
252
252
  results = await graph.mail.send_many([
253
- {"to": "a@contoso.com", "subject": "Hi A", "body": "..."},
254
- {"to": "b@contoso.com", "subject": "Hi B", "body": "..."},
253
+ {"to": "a@example.com", "subject": "Hi A", "body": "..."},
254
+ {"to": "b@example.com", "subject": "Hi B", "body": "..."},
255
255
  ])
256
256
  failed = [r for r in results if r["status"] >= 400]
257
257
  ```
@@ -298,14 +298,14 @@ start = datetime(2026, 10, 1, 14, 0, tzinfo=timezone.utc)
298
298
  event = await graph.calendar.schedule(
299
299
  subject="Design review",
300
300
  start=start, end=start + timedelta(minutes=45),
301
- attendees=["alice@contoso.com", "bob@contoso.com"],
301
+ attendees=["alice@example.com", "bob@example.com"],
302
302
  online=True,
303
303
  reminder_minutes=10,
304
304
  )
305
305
  print(event["onlineMeeting"]["joinUrl"])
306
306
 
307
307
  # Let Graph pick a time that suits everyone
308
- suggestions = await graph.calendar.find_times(["alice@contoso.com", "bob@contoso.com"],
308
+ suggestions = await graph.calendar.find_times(["alice@example.com", "bob@example.com"],
309
309
  duration_minutes=30)
310
310
  best = suggestions[0]["meetingTimeSlot"]
311
311
 
@@ -426,7 +426,7 @@ print(me["displayName"], me["jobTitle"])
426
426
  async for person in graph.users.find("smith"):
427
427
  print(person["displayName"], person["mail"])
428
428
 
429
- alice = await graph.users.by_email("alice@contoso.com")
429
+ alice = await graph.users.by_email("alice@example.com")
430
430
  boss = await graph.users.manager(alice["id"])
431
431
 
432
432
  async for report in graph.users.reports():
@@ -551,7 +551,7 @@ gave**.
551
551
 
552
552
  | Request form | Example |
553
553
  |---|---|
554
- | A tuple | `("GET", "/users/alice@contoso.com")` |
554
+ | A tuple | `("GET", "/users/alice@example.com")` |
555
555
  | A dict | `{"method": "PATCH", "url": "/me/messages/ID", "body": {"isRead": True}, "headers": {"Content-Type": "application/json"}}` |
556
556
 
557
557
  Each result has `id`, `status`, `body` and sometimes `headers`. Failures are reported in place,
@@ -607,7 +607,7 @@ or sign-in.
607
607
  from graphplug import GraphError
608
608
 
609
609
  try:
610
- await graph.users.by_email("nobody@contoso.com")
610
+ await graph.users.by_email("nobody@example.com")
611
611
  except GraphError as e:
612
612
  if e.code == "itemNotFound":
613
613
  print("no such user")
@@ -673,7 +673,7 @@ logged.
673
673
  import asyncio
674
674
 
675
675
  async with GraphClient.from_env(max_concurrency=8) as graph:
676
- ids = ["alice@contoso.com", "bob@contoso.com", "carol@contoso.com"]
676
+ ids = ["alice@example.com", "bob@example.com", "carol@example.com"]
677
677
  people = await asyncio.gather(*(graph.users.get(i) for i in ids))
678
678
  ```
679
679
 
@@ -35,7 +35,7 @@ from ._scopes import Scopes
35
35
 
36
36
  __all__ = ["GraphClient", "GraphError", "PendingSignIn", "Scopes"]
37
37
 
38
- __version__ = "0.2.2"
38
+ __version__ = "0.2.3"
39
39
 
40
40
 
41
41
  class PendingSignIn:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: graphplug
3
- Version: 0.2.2
3
+ Version: 0.2.3
4
4
  Summary: Plug-and-play Graph API for Python: mail, calendar, files, teams, users and generic requests.
5
5
  Author-email: Vikram Balaji <vikram.x.balaji@gmail.com>
6
6
  License-Expression: MIT
@@ -80,7 +80,7 @@ async def main():
80
80
 
81
81
  async with graph:
82
82
  await graph.mail.send(
83
- to="alice@contoso.com",
83
+ to="alice@example.com",
84
84
  subject="Quarterly report",
85
85
  body="<p>Attached.</p>", html=True,
86
86
  attachments=["report.pdf"],
@@ -255,8 +255,8 @@ Delegated access. Works on the signed-in person's mailbox.
255
255
 
256
256
  ```python
257
257
  await graph.mail.send(
258
- to=["alice@contoso.com", "bob@contoso.com"],
259
- cc="team@contoso.com",
258
+ to=["alice@example.com", "bob@example.com"],
259
+ cc="team@example.com",
260
260
  subject="Build finished",
261
261
  body="<b>All green.</b>", html=True,
262
262
  attachments=["results.csv"],
@@ -275,12 +275,12 @@ async for message in graph.mail.inbox(search="invoice"):
275
275
 
276
276
  # Reply and forward
277
277
  await graph.mail.reply(message_id, "Thanks, on it.", reply_all=True)
278
- await graph.mail.forward(message_id, to="carol@contoso.com", comment="FYI")
278
+ await graph.mail.forward(message_id, to="carol@example.com", comment="FYI")
279
279
 
280
280
  # Send many at once; each entry takes the same arguments as send()
281
281
  results = await graph.mail.send_many([
282
- {"to": "a@contoso.com", "subject": "Hi A", "body": "..."},
283
- {"to": "b@contoso.com", "subject": "Hi B", "body": "..."},
282
+ {"to": "a@example.com", "subject": "Hi A", "body": "..."},
283
+ {"to": "b@example.com", "subject": "Hi B", "body": "..."},
284
284
  ])
285
285
  failed = [r for r in results if r["status"] >= 400]
286
286
  ```
@@ -327,14 +327,14 @@ start = datetime(2026, 10, 1, 14, 0, tzinfo=timezone.utc)
327
327
  event = await graph.calendar.schedule(
328
328
  subject="Design review",
329
329
  start=start, end=start + timedelta(minutes=45),
330
- attendees=["alice@contoso.com", "bob@contoso.com"],
330
+ attendees=["alice@example.com", "bob@example.com"],
331
331
  online=True,
332
332
  reminder_minutes=10,
333
333
  )
334
334
  print(event["onlineMeeting"]["joinUrl"])
335
335
 
336
336
  # Let Graph pick a time that suits everyone
337
- suggestions = await graph.calendar.find_times(["alice@contoso.com", "bob@contoso.com"],
337
+ suggestions = await graph.calendar.find_times(["alice@example.com", "bob@example.com"],
338
338
  duration_minutes=30)
339
339
  best = suggestions[0]["meetingTimeSlot"]
340
340
 
@@ -455,7 +455,7 @@ print(me["displayName"], me["jobTitle"])
455
455
  async for person in graph.users.find("smith"):
456
456
  print(person["displayName"], person["mail"])
457
457
 
458
- alice = await graph.users.by_email("alice@contoso.com")
458
+ alice = await graph.users.by_email("alice@example.com")
459
459
  boss = await graph.users.manager(alice["id"])
460
460
 
461
461
  async for report in graph.users.reports():
@@ -580,7 +580,7 @@ gave**.
580
580
 
581
581
  | Request form | Example |
582
582
  |---|---|
583
- | A tuple | `("GET", "/users/alice@contoso.com")` |
583
+ | A tuple | `("GET", "/users/alice@example.com")` |
584
584
  | A dict | `{"method": "PATCH", "url": "/me/messages/ID", "body": {"isRead": True}, "headers": {"Content-Type": "application/json"}}` |
585
585
 
586
586
  Each result has `id`, `status`, `body` and sometimes `headers`. Failures are reported in place,
@@ -636,7 +636,7 @@ or sign-in.
636
636
  from graphplug import GraphError
637
637
 
638
638
  try:
639
- await graph.users.by_email("nobody@contoso.com")
639
+ await graph.users.by_email("nobody@example.com")
640
640
  except GraphError as e:
641
641
  if e.code == "itemNotFound":
642
642
  print("no such user")
@@ -702,7 +702,7 @@ logged.
702
702
  import asyncio
703
703
 
704
704
  async with GraphClient.from_env(max_concurrency=8) as graph:
705
- ids = ["alice@contoso.com", "bob@contoso.com", "carol@contoso.com"]
705
+ ids = ["alice@example.com", "bob@example.com", "carol@example.com"]
706
706
  people = await asyncio.gather(*(graph.users.get(i) for i in ids))
707
707
  ```
708
708
 
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes