Skip to main content

No project description provided

Project description

RCS-PYDANTIC

Test Coverage Package version Supported Python versions

Introduce

한국 통신사 rcs 를 위한 pydantic 구조체

Installation

pip install rcs-pydantic

Quick start

from rcs_pydantic import MessageInfo, RcsMessage

message_info = {
    "replyId": "B01RDSFR.KcNNLk67ui.FDSAF432153214",
    "eventType":"message",
    "messageBody": {"textMessage": "안녕하세요?"},
    "userContact":"01012341234",
    "chatbotId":"0212351235",
    "timestamp": "2020-03-03T04:43:55.867+09"
}

rcs = {
    "message_base_id": "SCS00000",
    "service_type": "RCSSMS",
    "header": "0",
    "cdr_id": "KT_rcsid",
    "body": {
        "title": "타이틀",
        "description": "일반 RCSSMS 테스트 메시지 입니다."
    }
}


rcs_message = RcsMessage(message_info=MessageInfo(**message_info), **rcs)
>>> print(rcs_message.send_info)
common=CommonInfo(
    msgId='B01RDSFR.KcNNLk67ui.FDSAF432153214',
    userContact='01012341234',
    scheduleType=<ScheduleTypeEnum.IMMEDIATE: 0>,
    msgGroupId=None,
    msgServiceType=<MessageServiceTypeEnum.RCS: 'rcs'>
)
rcs=RcsInfo(
    chatbotId='0212351235',
    agencyId='ktbizrcs',
    messagebaseId='SCS00000',
    serviceType=<ServiceTypeEnum.SMS: 'RCSSMS'>,
    expiryOption=<ExpiryOptionEnum.AFTER_SETTING_TIMES: 2>,
    header=<HeaderEnum.NOT_ADVERTISE: '0'>,
    footer=None,
    cdrId='KT_rcsid',
    copyAllowed=True,
    body=RcsSMSBody(title='타이틀', description='일반 RCSSMS 테스트 메시지 입니다.'),
    buttons=None,
    chipLists=None,
    replyId=None
)
>>>

Features

TODO

Contribution

TODO

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

rcs-pydantic-0.1.22.tar.gz (23.5 kB view hashes)

Uploaded Source

Built Distribution

rcs_pydantic-0.1.22-py3-none-any.whl (23.4 kB view hashes)

Uploaded Python 3

Supported by

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