Skip to main content

API for bed solution capston project

Project description

Bed Solution API

침대 압력 모니터링 솔루션을 위한 API 라이브러리입니다.

설정

API를 사용하기 전에 .env 파일을 프로젝트 루트 디렉토리에 생성하고 다음 환경 변수들을 설정해야 합니다:

# 서버 API 설정 (필수)
API_KEY=your_api_key_here
API_URL=https://your-api-server.com

# 로깅 설정
ENABLE_DEBUGGING=False
ENABLE_LOG_CONSOLE=True
ENABLE_LOG_FILE=True
LOG_DIR_PATH=./logs

# 압력 데이터 전송 간격 (분 단위)
MIN_INTERVAL=5

환경 변수 설명

변수명 필수 여부 설명 기본값 예시
API_KEY 필수 서버 API 인증 키 - abc123xyz789
API_URL 필수 서버 API 엔드포인트 URL - https://api.bedsolution.com
ENABLE_DEBUGGING 선택 디버깅 모드 활성화 여부 False True 또는 False
ENABLE_LOG_CONSOLE 선택 콘솔 로그 출력 활성화 여부 True True 또는 False
ENABLE_LOG_FILE 선택 파일 로그 저장 활성화 여부 True True 또는 False
LOG_DIR_PATH 선택 로그 파일 저장 디렉토리 경로 ./logs ./logs 또는 /var/log/bedsolution
MIN_INTERVAL 선택 압력 데이터 전송 최소 간격 (분) 30 30, 60, 120

사용법

from bed_solution_api import BedSolutionAPI
from pressure_info import PressureInfo

# API 인스턴스 생성
api = BedSolutionAPI()

# 장비 등록
device_id = api.register_device()

# 압력 정보 기록
pressure_data = PressureInfo(occipu=50, scapula=60, elbow=30, hip=80)
api.record_pressure_info(pressure_data)

# 서버로 데이터 전송
api.send()

# 장비 등록 해제
api.deregister_device()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bed_solution_api-0.1.1.tar.gz (8.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bed_solution_api-0.1.1-py3-none-any.whl (9.1 kB view details)

Uploaded Python 3

File details

Details for the file bed_solution_api-0.1.1.tar.gz.

File metadata

  • Download URL: bed_solution_api-0.1.1.tar.gz
  • Upload date:
  • Size: 8.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.6

File hashes

Hashes for bed_solution_api-0.1.1.tar.gz
Algorithm Hash digest
SHA256 243861db30794d7c3ced0ae50597d44ee5f4a0035f0dae45c8823ebf284b0911
MD5 7c61c8b8e2850373a8936470c1b85d81
BLAKE2b-256 0538f3bca087477b931cbbd72db5dc68f2af4cdf4ec3f814b351169e989a9518

See more details on using hashes here.

File details

Details for the file bed_solution_api-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for bed_solution_api-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8acd3b57fc162cc841a0abbe7d2ce24f4aef935f124476a0db22303e43c8b0cd
MD5 0c1f1bd72be9a0f7e47e1524be6b42f8
BLAKE2b-256 6ae8a4f47cd11e0c3922652994ba598d4b289ece49327e12823230e841ec0217

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page