llamazure.msgraph : Microsoft Graph client
The llamazure.azgraph package provides a usable client for the Microsoft Graph.
Benefits:
- no boilerplate
- easily navigate paginated queries
msgraph
Usage
Create a Graph with the from_credential and any of the standard Azure credentials.
from azure.identity import DefaultAzureCredential
from llamazure.msgraph.msgraph import Graph
g = Graph.from_credential(DefaultAzureCredential())
Querying
Make a simple query with the q method, which will return your data directly:
>>> g.q("me")
Res(req=Req(query='me', options=QueryOpts(count=None, expand=set(), filter=None, format=None, orderby=None, search=None, select=None, skip=None, top=None)), odata={'@odata.context': 'https://graph.microsoft.com/v1.0/$metadata#users/$entity'}, value={...}, nextLink=None)
Or specify options with the query method, which will return the full result object:
>>> from llamazure.msgraph.models import Req
>>> g.query(Req("me", options=QueryOpts(expand={"memberOf"})))
Res(req=Req(query='me', options=QueryOpts(count=None, expand={'memberOf'}, filter=None, format=None, orderby=None, search=None, select=None, skip=None, top=None)), odata={'@odata.context': 'https://graph.microsoft.com/v1.0/$metadata#users(memberOf())/$entity'}, value={...}, nextLink=None)
Retries
Every query can be automatically retried by the retry policy. You can modify this by setting the Graph.retry_policy attribute:
g.retry_policy = RetryPolicy(retries=10)
Pagination
Pagination is handled automatically. If you want to manually paginate, you can manually walk the pages:
req = Req(query="users")
res0 = g.query_single(req)
res1 = g.query_next(req, res0)
res2 = g.query_next(req, res1)
Metadata
Release files for llamazure.msgraph 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| llamazure_msgraph-0.1.1.tar.gz | 5.0 kB | Without provenance | Details for llamazure_msgraph-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| llamazure_msgraph-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for llamazure_msgraph-0.1.1-py3-none-any.whl |
Total release size: 10.8 kB
Release files / llamazure_msgraph-0.1.1.tar.gz
| Download URL | llamazure_msgraph-0.1.1.tar.gz |
|---|---|
| Size | 5.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4426765171141c2ecb94a0e2dd1a3137a5df1abe2faf3919abbc6cd30486fd50
|
|
BLAKE2b-256 checksum How to use checksums |
08897f59937ab351c120319b903a47324abe85eae93493fc0a7f1722ee0ac8e6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Release files / llamazure_msgraph-0.1.1-py3-none-any.whl
| Download URL | llamazure_msgraph-0.1.1-py3-none-any.whl |
|---|---|
| Size | 5.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e7d1e60d6c0323a0872ce10812264efcfa5beba94682959aa4da32273bab928d
|
|
BLAKE2b-256 checksum How to use checksums |
defe0104deae8813c5b67dfd95265dd89c52f9f971cb20af0cec3fe33fd6f6c6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Security for llamazure.msgraph 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.