DEV Community

Cover image for Save Your Functions to Cloud
Onur Atakan ULUSOY
Onur Atakan ULUSOY

Posted on

Save Your Functions to Cloud

Intro

In python you can use the KOT Cloud Free to save your functions, classes, objects and variables. With this you can access anything from any other python runtime.

Let's Connect to Cloud

Firstly, we will install the KOT library;

pip install kot
Enter fullscreen mode Exit fullscreen mode

Creating an cloud key;

KOT cloud_key
Enter fullscreen mode Exit fullscreen mode

cloud-*********

Sending to Cloud

from kot import KOT_Cloud
cloud = KOT_Cloud("YOUR_CLOUD_KEY")
# -- CONNECTION --

@cloud.active
def get_address():
    return "Hello World I am from KOT Cloud"

price = 15.2
cloud.set("price", price)

Enter fullscreen mode Exit fullscreen mode

Getting from Cloud

from kot import KOT_Cloud
cloud = KOT_Cloud("YOUR_CLOUD_KEY")
# -- CONNECTION --

print(cloud.get("get_address")())
print(cloud.get("price"))
Enter fullscreen mode Exit fullscreen mode

Hello World I am from KOT Cloud
15.2

For more you can read the documentation.

https://kotdatabase.dev/

Top comments (0)