microsoftgraph / microsoftgraph/msgraph-sdk-python

How do I use static typing with msgraph-sdk-python

Open
#278 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

question
Dominant language
Python
Stars
630
Forks
96
Avg merge
15h 20m
Merged PRs (30d)
3

Description

If I want to manipulate a DriveItem, I need to define the type:

folder : DriveItem = DriveItem()

is there a way to import DriveItem without doing:

from msgraph.generated.models.drive_item import DriveItem

?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the generated DriveItem import path, msgraph.generated.models.drive_item, and the SDK's public import structure. Determine whether a shorter supported import exists or should be exposed for static typing; done when the supported usage is clear and verified for DriveItem.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, developer-experience
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.