Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slack magic? #29

Open
psychemedia opened this issue Dec 5, 2018 · 3 comments
Open

Slack magic? #29

psychemedia opened this issue Dec 5, 2018 · 3 comments

Comments

@psychemedia
Copy link

Have you looked at creating some IPython line or block magic (%slack or %%slack) to support issuing Slack commands from notebook code cells?

I'm think that your Interacting with Slack.ipynb probably contains many of the necessary ingredients already?

@WillKoehrsen
Copy link
Owner

That is a brilliant idea! It doesn't appear to be very hard to write your own cell magic so I'll give it a shot. Thanks for the recommendation!

@psychemedia
Copy link
Author

@WillKoehrsen This magic — https://github.com/catherinedevlin/ipython-sql — is quite a rich one (I think a Slack magic could be easier), but it demonstrates a feature that might be useful for a Slack magic, specifically persisting the connection so that you only need to set it once.

I've also wondered about a complementary approach - defining a Slack slash command that could send a code fragment to a Jupyter kernel launched on Binderhub, and get the response back into Slack? Something like the ThebeLab js package might provide a clue as to how to do this?

@psychemedia
Copy link
Author

psychemedia commented Dec 7, 2018

Here's another thought on the side... In terms of notification-style working, jupyter-notify provides "Jupyter magic for browser notifications of cell completion". Just prefix a long running cell with %%notify and you'll get a notification when it completes via a browser push notification.

So if a browser notification, why not a Slack channel notification?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants