The Apache Custos Python SDK for third party clients to integrate with Custos middleware
custos
Includes gRPC stubs generated by a protoc compiler. Mainly contains data model and functions. You may need to import data model packages to integrate with clients.
clients
Includes integration clients, which you want to import and integrate with your code to access Custos middleware.
samples
Includes set of sample implementation of integration clients to demo the integration with Custos middleware
transport
Includes connection handling classes
Create a virtual environment
python3 -m venv venv
Activate the virtual environment
source venv/bin/activate
Install dependencies
pip install -r requirements.txt
Create a INI file containing server configuration details. For more information refer to default settings file
You can generate *.tar.gz or .whl distribution and install to any external project.
Create a virtual environment
python3 -m venv venv
Activate the virtual environment
source venv/bin/activate
Make sure you have the latest versions of setuptools and wheel installed
pip install wheel
Now run this command from the same directory where setup.py is located
python3 setup.py sdist bdist_wheel
This command should output a lot of text and once completed should generate two files in the dist directory
dist/ custos_python_sdk-1.0.0-py3-none-any.whl custos-python-sdk-1.0.0.tar.gz
You should be able to install those packages into your project.
There are three types of tokens used for access custos APIs.
Client Token (Base64 encoded Custos_Client_Id +“:”+ Custos_Client_Sec)
Admin Token (Access Token of Admin User)
User Token (Access Token of Generic User)
Sample implementations can be found at tenant_management_samples
Sample implementations can be found at identity_management_sample
Sample implementations can be found at user_management_samples
super_tenant_management_client