Slackipy is a little web server which helps you automate user invites to your Slack team. It is written using Flask and for templating it uses Jinja2, hence it is very easy to customise and add new features like captcha, password requirement etc on top of it.
You need following:
Slack Team ID (
SLACK_TEAM_ID): Your Slack team ID or sub domain. For example in
superheroes is the Slack team ID.
Slack API Token (
SLACK_API_TOKEN): You need to generate API token from your admin account. Go to https://api.slack.com/web and generate one.
Flask Secret Key (
FLASK_SECRET_KEY): Any random string, it will be used to protect the app from CSRF attacks. It will also come handy if you want to sign cookies.
Once you have installed and setup
rhc, run the following:
rhc create-app slackipy python-3.3 --from-code https://github.com/avinassh/slackipy SLACK_API_TOKEN="your-token-here" SLACK_TEAM_ID="team-id" FLASK_SECRET_KEY="some-random-key"
Check Flask Deployment if you want to do custom deployment. You can serve app from
from wsgi import application
FLASK_SECRET_KEY should be set as environment variables.
To install locally, clone the repo, install the requirements and run
$ git clone https://github.com/avinassh/slackipy $ cd slackipy $ pyvenv venv $ source venv/bin/activate $ pip install -r requirements.txt $ python wsgi.py
The app will be available at localhost:8051
The mighty MIT license. Please check
LICENSE for more details.