Compare commits

..

9 Commits

Author SHA1 Message Date
1708639776959.sdtroot 6c3bc7150d Update main.py 2024-06-14 02:16:05 +00:00
1708639776959.sdtroot 1619406606 Update main.py 2024-05-21 06:22:04 +00:00
1708639776959.sdtroot 11cdf13d0d Update framework.yaml 2024-05-21 06:21:13 +00:00
1708639776959.sdtroot a2452996fc Commit message 2024-04-23 10:44:01 +09:00
1708639776959.sdtroot fcaa2a5f8c Commit message 2024-04-23 10:43:12 +09:00
1708639776959.sdtroot 249d36ee99 Commit message 2024-04-23 10:34:25 +09:00
1708639776959.sdtroot 00940f7f34 Update framework.yaml 2024-03-26 06:46:46 +00:00
1708639776959.sdtroot 8b6ba2edd5 Update requirements.txt 2024-03-26 06:46:35 +00:00
1708639776959.sdtroot 6443f52adf Update framework.yaml 2024-03-06 08:24:00 +00:00
3 changed files with 10 additions and 8 deletions

View File

@ -1,12 +1,12 @@
version: bwc/v2 # bwc 버전 정보입니다. version: bwc/v2 # bwc 버전 정보입니다.
spec: spec:
appName: mqtt-s3-sdt-sdk-template # 앱의 이름입니다. appName: app-test # 앱의 이름입니다.
runFile: main.py # 앱의 실행 파일입니다. runFile: main.py # 앱의 실행 파일입니다.
env: env:
bin: python3 # 앱을 실행할 바이너라 파일 종류입니다.(장비에 따라 다르므로 확인 후 정의해야 합니다.) bin: python3
virtualEnv: mqtt-s3-env # 사용할 가상환경 이름입니다. virtualEnv: mqtt-s3-env # 사용할 가상환경 이름입니다.
package: requirement.txt # 설치할 Python 패키지 정보 파일입니다.(기본 값은 requirement.txt 입니다.) package: requirements.txt # 설치할 Python 패키지 정보 파일입니다.(기본 값은 requirement.txt 입니다.)
runtime: python3.9
stackbase: stackbase:
userName: sujune@sdt.inc # Stackbase(gitea) ID 입니다. tagName: v1.0.3 # Stackbase(gitea)에 릴리즈 태그명 입니다.
tagName: v1.0.0 # Stackbase(gitea)에 릴리즈 태그명 입니다.
repoName: mqtt-s3-sdt-sdk-template # Stackbase(gitea)에 저장될 저장소 이릅니다. repoName: mqtt-s3-sdt-sdk-template # Stackbase(gitea)에 저장될 저장소 이릅니다.

View File

@ -5,10 +5,12 @@ import uuid
# call sdtcloudpubsub # call sdtcloudpubsub
sdtcloudMqttClient = sdtcloudpubsub.sdtcloudpubsub() sdtcloudMqttClient = sdtcloudpubsub.sdtcloudpubsub()
mqttClient = sdtcloudMqttClient.setClient(f"device-app-{uuid.uuid1()}") # parameter is client ID(string) sdtcloudMqttClient.setClient(f"device-app-{uuid.uuid1()}") # parameter is client ID(string)
# call sdtclouds3 # call sdtclouds3
sdtcloudS3Client = sdtclouds3.sdtclouds3() S3Id = "" # your S3 AWS Access Key
S3Key = "" # your S3 AWS Access Sercet Key
sdtcloudS3Client = sdtclouds3.sdtclouds3(S3Id, S3Key)
@ -20,7 +22,7 @@ def runAction():
"message": "Hello World", "message": "Hello World",
"uploadFile": result "uploadFile": result
} }
sdtcloudMqttClient.pubMessage(mqttClient, msg) sdtcloudMqttClient.pubMessage(msg)
time.sleep(10) time.sleep(10)
if __name__ == "__main__": if __name__ == "__main__":