-
Notifications
You must be signed in to change notification settings - Fork 84
Closed
Description
Take the following example:
const options = { authProvider };
const client = Client.init(options);
let users = await client.api('/users')
.header('ConsistencyLevel','eventual')
.filter("endswith(mail,'[email protected]')")
.orderby('userPrincipalName')
.get();In Python this becomes:
from msgraph import GraphServiceClient
from msgraph.generated.users.users_request_builder import UsersRequestBuilder
from kiota_abstractions.base_request_configuration import RequestConfiguration
from=snippets&tabs=python
query_params = UsersRequestBuilder.UsersRequestBuilderGetQueryParameters(
filter = "endswith(mail,'[email protected]')",
orderby = ["userPrincipalName"],
count = True,
)
request_configuration = RequestConfiguration(
query_parameters = query_params,
)
request_configuration.headers.add("ConsistencyLevel", "eventual")
result = await graph_client.users.get(request_configuration = request_configuration)This objectively is much more complex and verbose that it needs to be. Why is the Python SDK that way and not written in a similar way to the above, or e.g., the Django ORM?
users = await graph_client.Users \
.filter("endswith(mail,'[email protected]')") \
.orderby("userPrincipalName") \
.header('ConsistencyLevel','eventual')samuelcm-bflexion, laneparton and chooseanother
Metadata
Metadata
Assignees
Labels
No labels