简体   繁体   English

如何将数据从 AWS 上的脚本发送到(Wix)网站?

[英]How to send data from script on AWS to a (Wix) website?

I'm just facing an issue as I've written a code in python that is executing every minute on AWS (Amazon web server) and I want to send what's written to my Wix website.我刚刚遇到一个问题,因为我在 python 中编写了一个代码,该代码在 AWS(Amazon web 服务器)上每分钟执行一次,我想将写入的内容发送到我的 Wix 网站。 Do you have an idea of how I can deal with it?你知道我该如何处理吗?

An example could be the following one (this is just an example):一个例子可能是以下一个(这只是一个例子):

I'm executing a script in python on AWS server which returns the current hour every 10 minutes and I want to send this value to my website in order to display it on this website我正在 AWS 服务器上的 python 中执行一个脚本,它每 10 分钟返回一次当前小时,我想将此值发送到我的网站以便在此网站上显示它

Thank you in advance!先感谢您!

If you have the python script running in AWS already, then you need some sort of endpoint on your Wix website to retrieve the request.如果您已经在 AWS 中运行了 python 脚本,那么您需要 Wix 网站上的某种端点来检索请求。

For Example: yourwebsite.com/api/receive-time例如:yourwebsite.com/api/receive-time

And your python script would post some JSON to it like so:你的 python 脚本会像这样向它发布一些 JSON :

{
   "time" : 1621712481
}

To make HTTP requests in Python, check out this link: https://www.geeksforgeeks.org/get-post-requests-using-python/要在 Python 中发出 HTTP 请求,请查看此链接: https://www.geeksforgeeks.org/get-post-requests-

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM