Created
January 25, 2014 22:25
-
-
Save Atothendrew/8624590 to your computer and use it in GitHub Desktop.
An example on how to use Parse.com's backend in Python Get the required python module from here: https://github.com/dgrtwo/ParsePy
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
__author__ = 'Andrew Williamson' | |
from parse_rest.connection import register | |
from parse_rest.datatypes import Object | |
register("YOUR_APP_ID", "YOUR_REST_API_KEY", master_key=None) | |
class Score(Object): | |
pass | |
# Save an object | |
player_score = Score(score = 1000, player_name = "John Doe") | |
player_score.save() | |
# Retrieve the object | |
returned_score = Score.Query.get(player_name = "John Doe") | |
player_score = returned_score.score | |
print player_score |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment