Skip to main content

kakao-skill-template-builder

kakao i openbuilder skill response template builder โš’ for python ๐Ÿ

ํŒŒ์ด์ฌ์—์„œ ์นด์นด์˜ค i ์˜คํ”ˆ๋นŒ๋”์˜ ์‘๋‹ต ํƒ€์ž…๋ณ„ JSON ํฌ๋งท์„ ์ƒ์„ฑํ•˜๋Š” ๋„๊ตฌ ์ž…๋‹ˆ๋‹ค.

ํŠน์ง•

๐Ÿ‘Œ ์˜คํ”ˆ๋นŒ๋” ๋„์›€๋ง์˜ ๋ชจ๋“  ์‘๋‹ต ํƒ€์ž…๋ณ„ JSON ํฌ๋งท์„ ๋งŒ๋“ค ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ๋ชจ๋‘ ๋‹ค ํ…Œ์ŠคํŠธ ํ•ด๋ดค์–ด์š”! ๐Ÿ˜Š tests/test_builder.py๋ฅผ ์ฐธ๊ณ !

โš’ SkillResponseBuilder ๋ฅผ ์ด์šฉํ•ด์„œ ์›ํ•˜๋Š”๋Œ€๋กœ ์ด๊ฒƒ์ €๊ฒƒ ์„ž์ธ ๋Œ€๋‹ต์„ ๋งŒ๋“ค ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค!

๐Ÿ ํŒŒ์ด์ฌ์˜ local ๋ณ€์ˆ˜๋ฅผ ์ด์šฉํ•ด์„œ ์ฝ”๋“œ๊ฐ€ ์—„์ฒญ ์งง์•„์š”! ๊ณ ์น˜๊ธฐ ์‰ฝ๋‹ค๋Š” ๋œป์ด์ฃ .

Installation

$ pip install kakaosb

Example

  1. SimpleText
from kakaosb import SkillResponseBuilder, SimpleText

sb = SkillResponseBuilder([SimpleText('Hello Kakao!')])
res_dict = sb.to_dict()  # ์‚ฌ์ „ ํ˜•์‹ ๋ณ€ํ™˜
res_json = sb.to_json(indent=4)  # json ํ˜•์‹ ๋ณ€ํ™˜
  1. ๋ฒ ์ด์ง ์นด๋“œ
from kakaosb import SkillResponseBuilder, BasicCard, Thumbnail, Profile, Social, MessageButton, WeblinkButton

sb = SkillResponseBuilder()
basicCard = BasicCard(
    thumbnail=Thumbnail('http://k.kakaocdn.net/dn/83BvP/bl20duRC1Q1/lj3JUcmrzC53YIjNDkqbWK/i_6piz1p.jpg'),
    title='๋ณด๋ฌผ์ƒ์ž',
    description='๋ณด๋ฌผ์ƒ์ž ์•ˆ์—๋Š” ๋ญ๊ฐ€ ์žˆ์„๊นŒ',
    profile=Profile('๋ณด๋ฌผ์ƒ์ž', 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcT4BJ9LU4Ikr_EvZLmijfcjzQKMRCJ2bO3A8SVKNuQ78zu2KOqM'),
    social=Social(1238, 8, 780),
    buttons=[
        MessageButton('์—ด์–ด๋ณด๊ธฐ', '์งœ์ž”! ์šฐ๋ฆฌ๊ฐ€ ์ฐพ๋˜ ๋ณด๋ฌผ์ž…๋‹ˆ๋‹ค'),
        WeblinkButton('๊ตฌ๊ฒฝํ•˜๊ธฐ', 'https://e.kakao.com/t/hello-ryan')
    ])
sb.append(basicCard)
res_dict = sb.to_dict()  # ์‚ฌ์ „ ํ˜•์‹ ๋ณ€ํ™˜
res_json = sb.to_json(indent=4)  # json ํ˜•์‹ ๋ณ€ํ™˜
  1. mix
from kakaosb import SkillResponseBuilder, SimpleText, SimpleImage

sb = SkillResponseBuilder()
sb.append(SimpleText('Hello Kakao!'))
sb.append(SimpleImage('http://k.kakaocdn.net/dn/83BvP/bl20duRC1Q1/lj3JUcmrzC53YIjNDkqbWK/i_6piz1p.jpg', '๋ณด๋ฌผ์ƒ์ž์ž…๋‹ˆ๋‹ค'))
sb.append(SimpleText('Bye Bye ๐Ÿงค'))
res_dict = sb.to_dict()  # ์‚ฌ์ „ ํ˜•์‹ ๋ณ€ํ™˜
res_json = sb.to_json(indent=4)  # json ํ˜•์‹ ๋ณ€ํ™˜

Metadata

Release files for kakaosb 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for kakaosb 1.0.0
File Size Uploaded Provenance Actions
kakaosb-1.0.0.tar.gz 8.1 kB Without provenance Details for kakaosb-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for kakaosb 1.0.0
File Interpreter ABI Platform Actions
kakaosb-1.0.0-py3-none-any.whl Python 3 none any Details for kakaosb-1.0.0-py3-none-any.whl

Total release size: 22.4 kB

Release files / kakaosb-1.0.0.tar.gz

Download URL kakaosb-1.0.0.tar.gz
Size 8.1 kB
Tags Source
SHA-256 checksum
How to use checksums
1aeaae2309295e83b1dae576c74b65f2c0c2aadfc911de9a284438e0479b488f
BLAKE2b-256 checksum
How to use checksums
11d8692651c0d5e6290b65cb3039a90dc45a7cf0be4f5d3899dae6965a6f6e51
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.2.0.post20200210 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.6

Release files / kakaosb-1.0.0-py3-none-any.whl

Download URL kakaosb-1.0.0-py3-none-any.whl
Size 14.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
39996ec12562d10cc8337e7cb770fb4fa6b331a024f154dab4bb3f9dabce1bda
BLAKE2b-256 checksum
How to use checksums
b684a2fa04261d3b8bc77075295bfb1a70ad2831e79ca5e327ebedefc9dec510
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.2.0.post20200210 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.6

Security for kakaosb 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page