A software development kit used by Orodha services to interface with the Orodha user service.
Project description
orodha-user-sdk
Description
The Orodha User SDK is a Software Development Kit used in order to interact with the Orodha User Service.
Usage
In order to use the SDK you need to have an environment variable that contains the base url for the running user service. This variable is named
ORODHA_USER_SERVICE_BASE_URL
To use the SDK you must import the client class from the orodha_user_client module, like so:
from orodha_user_client import OrodhaUserClient
After importing the module, you simply instantiate the client with a special credentials object which you can create using orodha-keycloak.
The credentials object is called OrodhaCredentials and is an object containing the information needed to communicate with keycloak via orodha-keycloak.
Methods
The only available method currently is the bulk_get method.
This method will return a list of objects with the following structure:
{
"_id": str,
"keycloak_id": str,
"username": str,
}
It accepts a dictionary called request_args that contains the arguments for the request to the Orodha User Service.
The expected shape of the dictionary is as so:
{
"pageSize": int,
"pageNum": int,
"targets": list[str]
}
The targets list is used to query only for specific usernames and their values; if the targets list is empty, the query will be for all users in the database.
A dictionary is required to be passed into the function, but the dictionary need not contain any values; this is because the user service contains default values for this call.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file orodha_user_client-1.0.tar.gz.
File metadata
- Download URL: orodha_user_client-1.0.tar.gz
- Upload date:
- Size: 5.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4213ce145136060bfb94d695b17c31f38e12886527ab7ab9bb4db3436525c6c5
|
|
| MD5 |
fdb5bda97c9ee0532928486fce9e30dc
|
|
| BLAKE2b-256 |
55293d38838de94b96cc966539740a5722446bb01e3e14e103b6ab9bb5ed67a7
|
File details
Details for the file orodha_user_client-1.0-py3-none-any.whl.
File metadata
- Download URL: orodha_user_client-1.0-py3-none-any.whl
- Upload date:
- Size: 5.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4fbbac89442f0664b9ea31b0f149c8fdb244b6da069b2ae6fa056f5165d9955b
|
|
| MD5 |
08c0bfb43ff9980d0b8cf03b5880f5e8
|
|
| BLAKE2b-256 |
446389a40ddae8f855dbaf6011236606f9512551e83d8c95b7b28d5940bbc87c
|