Someone Please Help Fix My Python App

I am making Snap! Extensions Made Using Python, and I am working on cloud vars. Here is my current code: when I try to get the value of a var, it just return a 404 (Not using replit, it is on the server website that is created). I also need a way to access it in Snap! as well.

I think a better title for the thread might help...

How is that?

I would have said "my Python cloud var server" so we understand that it's a web server you're talking about.


Quick glance- you don't seem to have initialised your variable db

Yes, dictionary must be initialised.
Method definitions must be aligned to the left.
"[ ]" are obsolete.

def gt(name): 
  return value

@cymplecy and @dardoro, thanks! I tried dardoro's solution but it only fixed set. I read the docs, but they weren't very helpful. And this is my VERY FIRST EVER python program, so that is why I am kind of a noob.

Did you look at the link I posted that shows how to import the module to handle databases?

If your more familiar with JavaScript, maybe use a node.js server solution instead?

I don't Darek's is the right solution in this case

I couldnt quite understand it :slight_smile:


Hmm, I thought I did that already...

Hmm, still not working.

Have you removed the suggestion that Darek made yet?

Hmm, it still not working :frowning:

aah - your currently trying to return [value] rather than just value

Try this


IT WORKS! :smiley:

Let me solution


One more question:
untitled script pic (10)
I want to be able to get the value in Snap!