Skip to main content

Run python in slack

Project description

django-slappy

PyPI version PyPI pyversions

This is a django app that allows you to run python interactively in slack. It requires an existing server running django.

Features

Variable Persistence

persist

Shared Scope

allows interactivity between users

shared-scope

Multi-liners

multi-liner

Fool Proof

Long running code will be terminated code-timeout

Exit prevention prevents-exit

Installation

Need an already running django site

pip install django-slappy

  1. Add "django_slappy" to your INSTALLED_APPS setting like this

        INSTALLED_APPS = [
            ...
            'django_slappy',
        ]
    
  2. Include the URLconf in your project urls.py like this

    path('slappy/', include('django_slappy.urls'))
  1. Create a slack app and add command with url 'http://your-server/slappy/'

  2. Install to workspace. Slack will give you an OAUTH secret. Paste to your settings.py like following

    SLACK_OAUTH_SECRET = "abab-1231231231232-sfasfasdf-12312312"
    

    A better practice is to use environment variable.

Note

Of course you'll expose your server to remote-exploitation.

Make sure your have nice people in your workspace, otherwise prepare to get your entire server deleted

Project details


Download files

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

Files for django-slappy, version 0.0.2
Filename, size File type Python version Upload date Hashes
Filename, size django-slappy-0.0.2.tar.gz (6.6 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page