
Security News
Vite Releases Technical Preview of Rolldown-Vite, a Rust-Based Bundler
Vite releases Rolldown-Vite, a Rust-based bundler preview offering faster builds and lower memory usage as a drop-in replacement for Vite.
This is a small(-ish) Python library for wrapping interactions with Microsoft's Graph API, specifically with respect to populating and interrogating SharePoint sites safely.
Why msgraph2
? Because PyPi.org doesn't allow the package name
msgraph
because it is too similar to other (unspecified)
packages also on the index. It was okay with msgraph2, however...
import msgraph2
sp = msgraph2.SafeSharePoint(
host='yours.sharepoint.com',
site='SITE-NAME',
library='A Document Library',
token=msgraph2.file_token('path/to/token.json')
)
sp.mkdir("/Incoming/Uploaded Documents", make_parents=True)
Where /path/to/token.json
looks something like this:
{
"access_token": "... your access token ..."
}
The msgraph2.file_token
function causes the token to be re-read
from the file every time it is needed. Other keys in the token
JSON file will be explicitly ignored, so if you have a system of
refreshing access tokens that rewrites the on-disk file every
refresh, everything Just Works(TM).
If you are running a copy of Oauth-Taker, you can point
msgraph2 there with the msgraph2.oauth_taker_token()
helper
instead:
import msgraph2
sp = msgraph2.SafeSharePoint(
host='yours.sharepoint.com',
site='SITE-NAME',
library='A Document Library',
token=msgraph2.oauth_taker_token(
endpoint='https://ot.example.com/t/handler/t0',
shared_key='my-sekrit-key-for-getting-tokens'
)
)
sp.mkdir("/Incoming/Uploaded Documents", make_parents=True)
FAQs
A Pythonic interface to Microsoft's Graph API
We found that msgraph2 demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Vite releases Rolldown-Vite, a Rust-based bundler preview offering faster builds and lower memory usage as a drop-in replacement for Vite.
Research
Security News
A malicious npm typosquat uses remote commands to silently delete entire project directories after a single mistyped install.
Research
Security News
Malicious PyPI package semantic-types steals Solana private keys via transitive dependency installs using monkey patching and blockchain exfiltration.