Skip to main content

A simple handy tool for wework text msg sending

Project description

pywework

Handy tool for text message sending in Wechat Work

markdown

Package pywework is a handy tool for text message in Wechat Work which is compatible with python2.7+ and python3.6+.

User Guild

Configuration file: /etc/wework/wework.cfg

  1. {
  2. "corpid": "",
  3. "app": # App container for real app and room
  4. {
  5. "app01": # app name for WeApp instantiation
  6. {
  7. "agentid": "id01",
  8. "secret": "token01"
  9. },
  10. "room01": # room name for WeApp instantiation
  11. {
  12. "agentid": "id01",
  13. "secret": "token01"
  14. }
  15. },
  16. "party": # party container
  17. {
  18. "default": "0",
  19. "party01": "01" # party name: party
  20. },
  21. "user":
  22. [
  23. "dev"
  24. ],
  25. "proxies":
  26. {
  27. "http": "http://ip:port",
  28. "https": "http://ip:port"
  29. }
  30. }

Python Code Sample

  1. from pywework import WeApp
  2. app = WeApp("app01")
  3. app.send_app_msg("Hello world to default party in config")
  4. app.send_app_msg("Hello world to only user01", touser="user01")
  5. app.send_app_msg("Hello world to both user01 and user02", touser=["user01", "user02"])
  6. app.close()
  7. app = WeApp("room01")
  8. app.send_room_msg("Hello world")
  9. app.close()

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

pywework-1.0.9-py3-none-any.whl (423.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