Skip to main content

Package description here.

Project description

github-bot-api

API for creating GitHub bots and webhooks in Python.

Quickstart

  1. Create a new Smee channel on https://smee.io

  2. Install smee-client (e.g. yarn global add smee-client)

  3. Run smee -u <SMEE_CHANNEL_URL> -P /event-handler -p 5000

  4. Create a Python script with the below contents and run it

    from github_bot_api import Event, Webhook
    from github_bot_api.flask import create_flask_app
    
    webhook = Webhook(secret=None)
    
    @webhook.on('*')
    def on_any_event(event: Event) -> bool:
      print(event)
      return True
    
    create_flask_app(__name__, webhook).run(debug=True)
    

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

github-bot-api-0.1.0.tar.gz (6.8 kB view hashes)

Uploaded Source

Built Distribution

github_bot_api-0.1.0-py3-none-any.whl (7.6 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