Skip to main content

Python client library that proxies reminder operations to the main Reminder API Gateway (Lambda backend).

Project description

reminder-main-api-client

메인 Reminder API Gateway(CRUD Lambda)로 요청을 전달하는 Python 클라이언트입니다.

기존 프로젝트에서 pip install 후, 객체 생성 시 x-api-key를 주입해서 메인 Lambda에서 실제 처리를 수행하도록 사용할 수 있습니다.

Installation

pip install reminder-main-api-client

Usage

from reminder_main_api_client import ReminderMainApiClient

client = ReminderMainApiClient(
    api_base_url="https://<api-id>.execute-api.ap-northeast-2.amazonaws.com/prod",
    api_key="<issued-x-api-key>",
)

# 시간 입력 규칙:
# - "2026-05-20T10:00:00" 처럼 타임존이 없으면 한국시간(KST)으로 간주
# - "2026-05-20T10:00:00+09:00", "2026-05-20T01:00:00Z" 같은 값도 허용
# - 내부적으로 UTC("...Z")로 변환되어 메인 API에 전달됨

# EventBridge 스케줄 생성(메인 Lambda의 POST /reminders 호출)
create_res = client.create_event_bridge(
    user_id="20240001",
    title="회의 준비",
    scheduled_at="2026-05-20T10:00:00",  # KST 오전 10시
    early_alert_minutes=10,
)

# EventBridge 스케줄 삭제(메인 Lambda의 DELETE /reminders/{id} 호출)
delete_res = client.delete_event_bridge(
    reminder_id="<reminder-id>",
    user_id="20240001",
)

# Teams 즉시 발송(메인 Lambda의 POST /alerts/send 호출)
# 주의: 이 라우트는 백엔드에 구현되어 있어야 동작합니다.
send_res = client.send_teams(
    user_id="20240001",
    title="즉시 알림",
    scheduled_at="2026-05-20T10:00:00",  # KST 오전 10시
)

# 특정 리마인더 최신 상태 조회
item = client.get_reminder(user_id="20240001", reminder_id="<reminder-id>")
status = client.get_reminder_status(user_id="20240001", reminder_id="<reminder-id>")
print(item["isCompleted"])

Notes

  • 이 패키지는 Teams API/EventBridge를 직접 호출하지 않습니다.
  • 모든 동작은 메인 API에 위임됩니다.
  • 따라서 권한/감사/로깅/서비스 매핑(x-api-key)은 메인 Lambda 정책을 그대로 따릅니다.
  • get_reminder는 단건 조회 API(GET /reminders/{id})를 우선 사용하고, 구버전 백엔드에서는 목록 조회(GET /reminders) fallback으로 동작합니다.

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

reminder_main_api_client-0.1.3.tar.gz (5.4 kB view details)

Uploaded Source

Built Distribution

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

reminder_main_api_client-0.1.3-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file reminder_main_api_client-0.1.3.tar.gz.

File metadata

File hashes

Hashes for reminder_main_api_client-0.1.3.tar.gz
Algorithm Hash digest
SHA256 3a64fca51824b3f92edcde2591b8965ad622656fdffbf5e5e8a40bd331e21a79
MD5 2aff3269c3c7270e3796fd3c5cbe14a9
BLAKE2b-256 812d01fffd5027960c14696c6dcf437d5519ea1b6f6ba366b0be7f9a8b964157

See more details on using hashes here.

File details

Details for the file reminder_main_api_client-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for reminder_main_api_client-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 324f5ebd9308cacef3cd77d991387cf98aa4f3dcbfee1c30c50e52095a1b944c
MD5 9ae8c2bb20dc196003f139110b7ef96a
BLAKE2b-256 c9fa1828c3d6371b939beda1f4d877b453f75cd3d12837ecc9f8eeefcbe9eedc

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