# Python -------------------------------------------------------------------------------- title: "Overview" description: "Catalyst AppSail is a fully-managed PaaS component of Catalyst Serverless that enables you to develop and deploy services in Java, Node.js, and Python in the cloud with ease, and manage your platform instances." last_updated: "2026-03-18T07:41:08.637Z" source: "https://docs.catalyst.zoho.com/en/serverless/help/appsail/help-guides/python/overview/" service: "Serverless" -------------------------------------------------------------------------------- # Python ### Overview Python is one of the leading and most in-demand programming languages in the world, used in a wide variety of domains for numerous applications. Python's popularity is reflected in the vast collection of frameworks available for the programming environment, which can be broadly grouped into full-stack frameworks, microframeworks, or asynchronous frameworks. Each group of frameworks, and each individual framework, serves specific requirements with their unique features and advantages. Python frameworks are equipped with pre-written libraries, templates, plugins, and features upon which you can build your own code. Based on your application needs, you can opt for the right framework. AppSail does not provide any templates for specific Python frameworks, and therefore does not contain any framework restrictions. You can build your app service using any Python technology that you prefer, and incorporate any libraries, plugins, extensions, or dependencies. You can then directly select a Python runtime while initializing the app service in the CLI, and deploy it to AppSail. The Python help guide contains step-by-step instructions on building basic sample apps with some of its most popular frameworks, deploying these apps as AppSail services, and configuring {{%link href="/en/serverless/help/appsail/key-concepts/appsail-execution/#startup-commands" %}}startup commands{{%/link%}} as required. ### Prerequisites {{%link href="https://www.python.org/downloads/" %}}Download{{%/link%}} and install Python on your local machine. -------------------------------------------------------------------------------- title: "Flask" description: "Catalyst AppSail is a fully-managed PaaS component of Catalyst Serverless that enables you to develop and deploy services in Java, Node.js, and Python in the cloud with ease, and manage your platform instances." last_updated: "2026-03-18T07:41:08.638Z" source: "https://docs.catalyst.zoho.com/en/serverless/help/appsail/help-guides/python/flask/" service: "Serverless" -------------------------------------------------------------------------------- # Flask App with zcatalyst-sdk {{%link href="https://flask.palletsprojects.com/en/2.2.x/" %}}Flask{{%/link%}} is a popular, lightweight microframework of Python that developers can use to build highly functional applications. It does not use any libraries or tools, but supports a wide range of extensions for a variety of functionalities. Flask comes with a fast and built-in debugger and development server, as well as offers secure cookies, Unicode support and more. This example illustrates the steps to build a simple Python app with the Flask framework and Catalyst Python SDK. This application will then be bundled and associated with an AppSail service, and deployed to the console. {{%note%}}{{%bold%}}Note:{{%/bold%}} Catalyst offers a built-in support for the Flask framework through the {{%link href="/en/sdk/python/v1/overview" %}}Catalyst Python SDK{{%/link%}}. You can create {{%link href="/en/serverless/help/functions/introduction/" %}}Catalyst serverless functions{{%/link%}} using this SDK package.{{%/note%}} 1. Create a new folder in your local system for the Flask app. 2. Navigate to the directory from your terminal and execute the following command to install Flask and the {{%link href="/en/sdk/python/v1/setup/#installing-the-sdk"%}}Python {{%badge%}}zcatalyst-sdk{{%/badge%}}{{%/link%}}: {{%code class="language-python"%}}python3 -m pip install flask -t . python3 -m pip install --pre zcatalyst-sdk -t . {{%/code%}} 3. You can now create your python index file and name it {{%badge%}}app.py{{%/badge%}} or anything of your choice. Add the logic you require in the application's code. Given below is a sample code for a basic "Hello World" program. {{%code class="language-python"%}}import os from flask import Flask, request app = Flask(__name__) @app.route('/') def hello(): return 'Hello, World!' @app.route('/sdk') def sdk(): try: import zcatalyst_sdk as zcatalyst app = zcatalyst.initialize(req=request) cache_resp = app.cache().segment().put('Key', 'value') return cache_resp, 200 except Exception as e: return 'Got exception: ' + repr(e) if __name__ == '__main__': listen_port = int(os.getenv('X_ZOHO_CATALYST_LISTEN_PORT', 9000)) app.run(host="0.0.0.0", port=listen_port){{%/code%}} 4. You can now {{%link href="/en/cli/v1/initialize-resources/initialize-appsail/" %}}initialize an AppSail service{{%/link%}} in the same directory from the CLI or {{%link href="/en/cli/v1/add-appsail/" %}}add it{{%/link%}} in an existing project directory. The app's source must be your application's directory. Provide the following value while initializing the app service: **Stack**: Python_3_9 5. Ensure all the Python application files along with the {{%badge%}}flask{{%/badge%}} and {{%badge%}}zcatalyst-sdk{{%/badge%}} modules are present in the build directory you specify during initialization. Catalyst will automatically ZIP your app files during deployment to the remote console. 6. {{%link href="/en/cli/v1/deploy-resources/deploy-appsail//" %}}Deploy the app service{{%/link%}} to the console. 7. You can then configure the {{%link href="/en/serverless/help/appsail/key-concepts/appsail-execution/#startup-commands" %}}startup command{{%/link%}} given below from the console: {{%code class="language-python"%}}python3 -u app.py{{%/code%}} You can also configure this in the {{%badge%}}app-config.json{{%/badge%}} file before deploying. <br> Access the deployed app service from its {{%link href="/en/serverless/help/appsail/key-concepts/appsail-execution/#custom-domain-url" %}}endpoint URL{{%/link%}}. -------------------------------------------------------------------------------- title: "Django" description: "Catalyst AppSail is a fully-managed PaaS component of Catalyst Serverless that enables you to develop and deploy services in Java, Node.js, and Python in the cloud with ease, and manage your platform instances." last_updated: "2026-03-18T07:41:08.641Z" source: "https://docs.catalyst.zoho.com/en/serverless/help/appsail/help-guides/python/django/" service: "Serverless" -------------------------------------------------------------------------------- # Django Framework {{%link href="https://www.djangoproject.com/" %}}Django{{%/link%}} is a highly popular, full-stack, open-sourced framework of Python that includes all Python features by default. This high-level framework handles much of the intricacies of web development in a built-in manner, and allows developers to focus on the logic of their apps. Django also offers inherent support for commonly-used database systems and ORM support to map objects to tables, which facilitates easy data migration. This example illustrates the steps to build a simple Python app with the Django framework. This application will then be bundled and associated with an AppSail service, and deployed to the console. 1. Create a new folder in your local system for the Django app. 2. Navigate to the directory from your terminal and execute the following command to install Django: {{%code class="language-python"%}}python3 -m pip install django -t .{{%/code%}} 3. Create a {{%link href="https://docs.djangoproject.com/en/4.1/intro/tutorial01/#creating-a-project" %}}Django project{{%/link%}} by executing the following command. {{%code class="language-python"%}}python3 -m django startproject mysite{{%/code%}} {{%note%}}{{%bold%}}Note:{{%/bold%}} You will need to configure your AppSail domain in {{%badge%}}ALLOWED_HOSTS{{%/badge%}} as mentioned in {{%link href="https://docs.djangoproject.com/en/4.2/ref/settings/#allowed-hosts" %}}this help section{{%/link%}}.{{%/note%}} 4. You can now {{%link href="/en/cli/v1/initialize-resources/initialize-appsail/" %}}initialize an AppSail service{{%/link%}} in the same directory from the CLI or {{%link href="/en/cli/v1/add-appsail/" %}}add it{{%/link%}} in an existing project directory. The app's source must be your application's directory. Provide the following value while initializing the app service: **Stack**: Python_3_9 5. Ensure all the Python application files along with the {{%badge%}}django{{%/badge%}} modules are present in the build directory you specify during initialization. Catalyst will automatically ZIP your app files during deployment to the remote console. 6. {{%link href="/en/cli/v1/deploy-resources/deploy-appsail//" %}}Deploy the app service{{%/link%}} to the console. 7. You can then configure the {{%link href="/en/serverless/help/appsail/key-concepts/appsail-execution/#startup-commands" %}}startup command{{%/link%}} given below from the console: {{%code class="language-python"%}}sh -c 'python3 -u mysite/manage.py runserver 0.0.0.0:${X_ZOHO_CATALYST_LISTEN_PORT}'{{%/code%}} You can also configure this in the {{%badge%}}app-config.json{{%/badge%}} file before deploying. <br> Access the deployed app service from its {{%link href="/en/serverless/help/appsail/key-concepts/appsail-execution/#custom-domain-url" %}}endpoint URL{{%/link%}}. -------------------------------------------------------------------------------- title: "Bottle" description: "Catalyst AppSail is a fully-managed PaaS component of Catalyst Serverless that enables you to develop and deploy services in Java, Node.js, and Python in the cloud with ease, and manage your platform instances." last_updated: "2026-03-18T07:41:08.645Z" source: "https://docs.catalyst.zoho.com/en/serverless/help/appsail/help-guides/python/bottle/" service: "Serverless" -------------------------------------------------------------------------------- # Bottle Framework {{%link href="https://bottlepy.org/docs/dev/" %}}Bottle{{%/link%}} is a fast and simple microframework of Python for building APIs, small-scale personal applications without the requirement of any dependencies. Bottle comes with a host of features like a built-in development server, plugins for various databases, request-dispatching routing, and several utilities. This example illustrates the steps to build a simple Python app with the Bottle framework. This application will then be bundled and associated with an AppSail service, and deployed to the console. 1. Create a new folder in your local system for the Bottle app. 2. Navigate to the directory from your terminal and execute the following command to install Bottle: {{%code class="language-python"%}}python3 -m pip install bottle -t.{{%/code%}} 3. You can now create your python index file and name it {{%badge%}}app.py{{%/badge%}} or anything of your choice. Add the logic you require in the application's code. Given below is a sample code for a basic "Hello World" program. {{%code class="language-python"%}}import os import bottle app = bottle.Bottle() @app.route('/') def hello(): return "Hello, World!" if __name__ == '__main__': listen_port = int(os.getenv('X_ZOHO_CATALYST_LISTEN_PORT', 9000)) bottle.run(app, host='0.0.0.0', port=listen_port){{%/code%}} 4. You can now {{%link href="/en/cli/v1/initialize-resources/initialize-appsail/" %}}initialize an AppSail service{{%/link%}} in the same directory from the CLI or {{%link href="/en/cli/v1/add-appsail/" %}}add it{{%/link%}} in an existing project directory. The app's source must be your application's directory. Provide the following value while initializing the app service: **Stack**: Python_3_9 5. Ensure all the Python application files along with the {{%badge%}}bottle{{%/badge%}} modules are present in the build directory you specify during initialization. Catalyst will automatically ZIP your app files during deployment to the remote console. 6. {{%link href="/en/cli/v1/deploy-resources/deploy-appsail//" %}}Deploy the app service{{%/link%}} to the console. 7. You can then configure the {{%link href="/en/serverless/help/appsail/key-concepts/appsail-execution/#startup-commands" %}}startup command{{%/link%}} given below from the console: {{%code class="language-python"%}}python3 -u app.py{{%/code%}} You can also configure this in the {{%badge%}}app-config.json{{%/badge%}} file before deploying. <br> Access the deployed app service from its {{%link href="/en/serverless/help/appsail/key-concepts/appsail-execution/#custom-domain-url" %}}endpoint URL{{%/link%}}. -------------------------------------------------------------------------------- title: "CherryPy" description: "Catalyst AppSail is a fully-managed PaaS component of Catalyst Serverless that enables you to develop and deploy services in Java, Node.js, and Python in the cloud with ease, and manage your platform instances." last_updated: "2026-03-18T07:41:08.651Z" source: "https://docs.catalyst.zoho.com/en/serverless/help/appsail/help-guides/python/cherrypy/" service: "Serverless" -------------------------------------------------------------------------------- # CherryPy Framework {{%link href="https://cherrypy.dev/" %}}CherryPy{{%/link%}} is an open-source, minimalist microframework of Python used to build web applications similar to writing an object-oriented program. CherryPy offers a highly functional plugin system, built-in support for authentication, encoding, caching, multiple- HTTP servers, and more. 1. Create a new folder in your local system for the CherryPy app. 2. Navigate to the directory from your terminal and execute the following command to install CherryPy: {{%code class="language-python"%}}python3 -m pip install CherryPy -t.{{%/code%}} 3. You can now create your python index file and name it {{%badge%}}app.py{{%/badge%}} or anything of your choice. Add the logic you require in the application's code. Given below is a sample code for a basic "Hello World" program. {{%code class="language-python"%}}import os import cherrypy class HelloWorld: @cherrypy.expose def index(self): return "Hello, World!" if __name__ == "__main__": listen_port = int(os.getenv('X_ZOHO_CATALYST_LISTEN_PORT', 9000)) cherrypy.config.update({ "server.socket_host": "0.0.0.0", "server.socket_port": 9000 }) cherrypy.quickstart(HelloWorld()){{%/code%}} 4. You can now {{%link href="/en/cli/v1/initialize-resources/initialize-appsail/" %}}initialize an AppSail service{{%/link%}} in the same directory from the CLI or {{%link href="/en/cli/v1/add-appsail/" %}}add it{{%/link%}} in an existing project directory. The app's source must be your application's directory. Provide the following value while initializing the app service: **Stack**: Python_3_9 5. Ensure all the Python application files along with the {{%badge%}}cherrypy{{%/badge%}} modules are present in the build directory you specify during initialization. Catalyst will automatically ZIP your app files during deployment to the remote console. 6. {{%link href="/en/cli/v1/deploy-resources/deploy-appsail//" %}}Deploy the app service{{%/link%}} to the console. 7. You can then configure the {{%link href="/en/serverless/help/appsail/key-concepts/appsail-execution/#startup-commands" %}}startup command{{%/link%}} given below from the console: {{%code class="language-python"%}}python3 -u app.py{{%/code%}} You can also configure this in the {{%badge%}}app-config.json{{%/badge%}} file before deploying. <br> Access the deployed app service from its {{%link href="/en/serverless/help/appsail/key-concepts/appsail-execution/#custom-domain-url" %}}endpoint URL{{%/link%}}. -------------------------------------------------------------------------------- title: "Tornado" description: "Catalyst AppSail is a fully-managed PaaS component of Catalyst Serverless that enables you to develop and deploy services in Java, Node.js, and Python in the cloud with ease, and manage your platform instances." last_updated: "2026-03-18T07:41:08.652Z" source: "https://docs.catalyst.zoho.com/en/serverless/help/appsail/help-guides/python/tornado/" service: "Serverless" -------------------------------------------------------------------------------- # Tornado Framework {{%link href="https://www.tornadoweb.org/en/stable/" %}}Tornado{{%/link%}} is a Python web framework and an asynchronous networking library that relies on non-blocking network I/O to serve web applications. This framework is therefore ideal for handling a large number of active server connections, such as in websockets. Tornado also offers built-in internalization, quick request execution, and many other features. This example illustrates the steps to build a simple Python app with the Tornado framework. This application will then be bundled and associated with an AppSail service, and deployed to the console. 1. Create a new folder in your local system for the Tornado app. 2. Navigate to the directory from your terminal and execute the following command to install Tornado: {{%code class="language-python"%}}python3 -m pip install tornado -t.{{%/code%}} 3. You can now create your python index file and name it {{%badge%}}app.py{{%/badge%}} or anything of your choice. Add the logic you require in the application's code. Given below is a sample code for a basic "Hello World" program. {{%code class="language-python"%}}import os import tornado.ioloop import tornado.web class MainHandler(tornado.web.RequestHandler): def get(self): self.write("Hello, World!") if __name__ == "__main__": app = tornado.web.Application([ (r"/", MainHandler), ]) listen_port = int(os.getenv('X_ZOHO_CATALYST_LISTEN_PORT', 9000)) app.listen(listen_port, address='0.0.0.0') tornado.ioloop.IOLoop.current().start(){{%/code%}} 4. You can now {{%link href="/en/cli/v1/initialize-resources/initialize-appsail/" %}}initialize an AppSail service{{%/link%}} in the same directory from the CLI or {{%link href="/en/cli/v1/add-appsail/" %}}add it{{%/link%}} in an existing project directory. The app's source must be your application's directory. Provide the following value while initializing the app service: **Stack**: Python_3_9 5. Ensure all the Python application files along with the {{%badge%}}tornado{{%/badge%}} modules are present in the build directory you specify during initialization. Catalyst will automatically ZIP your app files during deployment to the remote console. 6. {{%link href="/en/cli/v1/deploy-resources/deploy-appsail//" %}}Deploy the app service{{%/link%}} to the console. 7. You can then configure the {{%link href="/en/serverless/help/appsail/key-concepts/appsail-execution/#startup-commands" %}}startup command{{%/link%}} given below from the console: {{%code class="language-python"%}}python3 -u app.py{{%/code%}} You can also configure this in the {{%badge%}}app-config.json{{%/badge%}} file before deploying. <br> Access the deployed app service from its {{%link href="/en/serverless/help/appsail/key-concepts/appsail-execution/#custom-domain-url" %}}endpoint URL{{%/link%}}.