Common Morpheus API calls for HOL Events
Project description
Morpheus Python Module
Installation
pip install pymorphapi
Usage
Reference at https://bertramdev.github.io/morpheus-apidoc
import pymorphapi
# import and validate/refresh bearer token
bearer_token = pymorphapi.import_token_from_disk(BASE_URI, LOCAL_PATH + TOKEN_FILE, VERIFY_SSL)
# sample get
results = pymorphapi.invoke_api(
BASE_URI + "/api/roles/?max=1000",
"Bearer " + bearer_token,
"get",
None,
VERIFY_SSL
)
# sample post
body = {}
body.update({"group": {"name": current_student}})
pymorphapi.invoke_api(
BASE_URI + "/api/accounts/" + str(new_tenant_id) + "/groups/",
"Bearer " + bearer_token,
"post",
body,
VERIFY_SSL
)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pymorphapi-1.9.5.tar.gz
(8.4 kB
view details)
File details
Details for the file pymorphapi-1.9.5.tar.gz.
File metadata
- Download URL: pymorphapi-1.9.5.tar.gz
- Upload date:
- Size: 8.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8f019fdcf4b04fc267d4229dbe6a7513b8dd0f3982eb101774c18c1c68a91c86
|
|
| MD5 |
e7440483d0a3440aeb874c5515b015a9
|
|
| BLAKE2b-256 |
f2609762fe7bc7478b2892037086545350c09c749cc67c9513565c77d37c7fe5
|