ServerModule1.py 549 B

12345678910111213141516171819202122
  1. import anvil.tables as tables
  2. import anvil.tables.query as q
  3. from anvil.tables import app_tables
  4. import anvil.server
  5. import yaml
  6. import json
  7. # This is a server module. It runs on the Anvil server,
  8. # rather than in the user's browser.
  9. #
  10. # To allow anvil.server.call() to call functions here, we mark
  11. # them with @anvil.server.callable.
  12. # Here is an example - you can replace it with your own:
  13. #
  14. @anvil.server.callable
  15. def parse_yaml(text):
  16. return yaml.safe_load(text)
  17. #
  18. @anvil.server.callable
  19. def parse_yaml(text):
  20. return yaml.safe_load(text)