Skip to main content

Kakaowork Python client

Project description

kakaowork-py

(Unofficial) Kakaowork Python client

PyPI PyPI - Python Version Downloads GitHub Documentation Status CI codecov

Table of Contents

Prerequisites

  • Python >= 3.7

Installation

Use the package manager pip to install kakaowork-py

pip install kakaowork

If you want to use CLI, install with the extras 'cli'

pip install kakaowork[cli]

Usages

from kakaowork import Kakaowork


def main():
  client = Kakaowork(app_key="your_app_key")
  r = client.users.list(limit=10)  # get a response of users using limit
  print(r.users)
  while r.cursor:  # loop until it does not to exist
    print(r.users)
    r = client.users.list(cursor=r.cursor)  # get a response of users using cursor

if __name__ == '__main__':
  main()
import asyncio

from kakaowork import AsyncKakaowork


async def main():
    client = AsyncKakaowork(app_key="your_app_key")
    r = await client.users.list(limit=10)  # get a response of users using limit
    print(r.users)
    while r.cursor:  # loop until it does not to exist
        print(r.users)
        r = await client.users.list(cursor=r.cursor)  # get a response of users using cursor

if __name__ == '__main__':
    loop = asyncio.get_event_loop()
    loop.run_until_complete(main())

If you have installed it with the extras 'cli', you can use the command line below in your shell.

$ kakaowork --help
Usage: kakaowork [OPTIONS] COMMAND [ARGS]...

Options:
  -k, --app-key TEXT
  --help              Show this message and exit.

Commands:
  bots
  conversations
  departments
  messages
  spaces
  users

$ kakaowork -k <your_app_key> bots info
ID:     1
Name:   Test
Status: activated

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

Copyright (c) 2021 Sung-Kyu Yoo.

This project is MIT license.

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

kakaowork-0.8.0.tar.gz (19.2 kB view hashes)

Uploaded Source

Built Distribution

kakaowork-0.8.0-py3-none-any.whl (20.0 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