Catalyst AppSail

Catalyst AppSail is a fully-managed, independent, Platform-as-a-service (PaaS) component of Catalyst Serverless that enables you to develop and deploy services in the cloud with ease. AppSail applications can be built independently of Catalyst-specific coding structures, and Catalyst provides you with a powerful and highly-scalable platform for this purpose. AppSail supports all frameworks of Python such as Flask, Django, Bottle, or CherryPy.

Implement Python SDK in AppSail

You can implement the Catalyst Python SDK in the codebase of your AppSail service with ease. The SDK will need to be initialized with the request object before each request.

Given below is an example of importing and initializing the Python SDK in a Flask web app.

    
copy
from flask import Flask, request, g import os import zcatalyst_sdk from zcatalyst_sdk.catalyst_app import CatalystApp app = Flask(__name__) @app.before_request def before_request(): if request.path.startswith('/admin'): return 'Unauthorized', 401 # if authorized user g.zc_app = zcatalyst_sdk.initialize(req=request) @app.route('/') def index(): return 'Web App with Python Flask!' @app.route('/cache') def cache(): app: CatalystApp = g.zc_app resp = app.cache().segment().put('key', 'value') return resp, 200 listen_port = os.getenv('X_ZOHO_CATALYST_LISTEN_PORT', 9000) app.run(host='0.0.0.0', port = listen_port)
Info : Refer to the SDK Scopes table to determine the required permission level for performing the above operation.

Last Updated 2025-06-02 18:47:38 +0530 +0530

ON THIS PAGE

RELATED LINKS

AppSail Help