Saravanan666/pypi-org huggingface dataset:
Package: slackbot-queue
Slackbot QueueSlackbot with a celery queue for long running tasksThis can be run even without a celery queue as long as you do not try and add things to the worker. Just run the listener and all the features (besides having a worker queue) will still work.Installpip install slackbot-queueUsageTheexamplefolder has a lot more to show and is ready to runfromslackbot_queueimportslack_controller,queuefromexampleimportExample# Import the example command class# Set up the celery configsqueue.conf.task_default_queue='custom_slackbot'queue.conf.broker_url='amqp://guest:guest@localhost:5672//'# The token could also be set by the env variable SLACK_BOT_TOKENslack_controller.setup(slack_bot_token='xxxxxxxx')# Set up the command by passing in the slack_controller to itex=Example(slack_controller)# Set up the example command to only work in the `general` channel or as a direct messageslack_controller.add_commands({'__direct_message__':[ex],'__all__':[],'general':[ex],})# Either start the listenerslack_controller.start_listener()# Or the worker:# The argv list is celery arguments used to start the workerslack_controller.start_worker(argv=['celery','worker','--concurrency','1','-l','info'])A full example can be found in theexampledir.Slacks api docs:https://api.slack.com/methodsIf the command function returnsNone, that means that the bot will continue to check the rest of the commands.But if the command does return something, no other commands will be checked. Meaning that if there are 2 commands that are looking for the same message regex, the command listed first in the channel list will be the only one triggered.If you want multiple commands to get triggered by the same message, you can have them returnNone, but sill post to slack inside you function by doingself.slack.slack_client.api_call(**message_data).message_datais the same as you would normally return but with the added keys (which are normally added when the data gets returned):'method': 'chat.postMessage',  # or any other method slack supports
'channel': full_event['channel']['id'],
'as_user': True,
Package: slack-bots
Collection of simple and reusable Slack bot prototypes.ContentsIntroductionDetailsRequirementsSimilar projectsIntroductionThis package is in design phase. Contributions at design level are welcome.DetailsTBD.fromslack_botsimportSlackEventBot,SlackRtmBotRequirementsPython version 3.11 or later.Python libraries as specified inrequirements.txt.Similar projectshttps://github.com/lins05/slackbothttps://github.com/nkouevda/slack-rtm-bot
Package: slack-bulkdelete
For free tier memberships, Slack has a limit of 5gb for file uploads, this
program wipes out old files.Installationpip3 install slack-bulkdeletewill create a new commandslack-bulkdeleteConfigurationCreate a configuration file with the Slack API token for a personal
account that has administrative privileges. (Bot accounts will not work.)Acquire a WEB API token for the Group Manager account.https://api.slack.com/docs/oauth-test-tokensThe API token is of the formxoxp-nnnnnnnnnn-nnnnnnn-nnnnnnnnn-aaaaaa.Put the token, in quotes, in$HOME/.slack_api_tokenor the configuration
file you specify on the command line.  This file is a json format file, but
only has the one entry.UseBefore letting it run for real, try using–dry-runto see what files
will be deleted and saved.usage: __init__.py [-h] [-C CONFIG_PATH] [-n] [-u USERS] [-a MAX_AGE]
                   [-s MIN_SIZE] [-p]

optional arguments:
  -h, --help            show this help message and exit
  -C CONFIG_PATH, --config-path CONFIG_PATH
                        configuration info (default: ~/.slack_api_token)
  -n, --dry-run         just simulate the deletes
  -u USERS, --user USERS
                        limit delete to user
  -a MAX_AGE, --max-age MAX_AGE
                        maximum age in days (default: 30)
  -s MIN_SIZE, --min-size MIN_SIZE
                        minimum size (in kb) of file to delete (default: 200)
  -p, --pinned          include pinned files (you don't want this!)NotesPython 3 has some issues with Unicode encoding if theLANGenvironment variable is not set properly before the interepreter
executes code. Make sure thatLANGis set to a utf-8 encoding such
asC.utf-8orEN_us.utf-8.
Package: slackcat
<p align="center"><img src="https://s3.amazonaws.com/assets.nickficano.com/slackcat.svg" height="64"><h2 align="center">SlackCat</h3><p align="center">Concatenate files(s), or <code>stdin</code>, directly to Slack.<br>3-minute setup & no third-party integration required.<p align="center"><a href="https://pypi.python.org/pypi/slackcat/"><img src="https://img.shields.io/pypi/pyversions/slackcat.svg" alt="pypi"></a><a href="https://pypi.python.org/pypi/slackcat/"><img src="https://img.shields.io/pypi/v/slackcat.svg" alt="pypi"></a><img src="https://img.shields.io/badge/pip_dependencies-0-brightgreen.svg" alt="pip dependencies"></p></p>### Get SlackCatDownload using pip via pypi.```bashpip install slackcat```Next, head to the [Slack Incoming WebHooks Configuration](https://slack.com/apps/A0F7XDUAZ-incoming-webhooks), clickthe ``Add Configuration`` button and set the default configuration values to yourliking. Once complete, copy the Webhook URL which we'll need in the next step.Open your ``~/.bash_profile`` file add following:```bashexport SLACKCAT_WEBHOOK_URL="https://hooks.slack.com/services/TXXX/BXXXX/XXXXXXXXXXXXXXXXXXXXXXXX"```_Make sure to replace the "https://hooks.slack.com/services/..." with the one provided above._### Usage```bash# - "Hey what's your public key dog?"slackcat @doug ~/.ssh/id_rsa.pub# - "Do we still use that crypto library written by the Cheese Cake Factory?"grep -r 'from cheesecake.factory import x509' ./ | slackcat @paul# - "Are you sure it's on your path?"echo $PATH | slackcat "#general"# - "These queries filling up in syslog look suspicious"tail -f /var/log/syslog | slackcat "#general" -f```### CustomizationIf you would like to override the bot's username, add the following line to your ``~/.bash_profile`` file:```bashexport SLACKCAT_USERNAME="abraham-linksys"```If you would like to override the bot's icon image, add the following line to your ``~/.bash_profile`` file:```bashexport SLACKCAT_ICON_URL="http://via.placeholder.com/500x500.png"```### DevelopmentDevelopment of "SlackCat" is facilitated exclusively on GitHub. Contributions in the form of patches, tests and feature creation and/or requests are very welcome and highly encouraged. Please open an issue if this tool does not function as you'd expect.**How to release updates**If this is the first time you're releasing to pypi, you'll need to run: ``pip install -r tests/dev_requirements.txt``.Once complete, execute the following commands:```bashgit checkout master# Increment the version number and tag the release.bumpversion [major|minor|patch]# Upload the distribution to PyPipython setup.py sdist bdist_wheel upload# Since master often contains work-in-progress changes, increment the version# to a patch release to prevent inaccurate attribution.bumpversion --no-tag patchgit push origin master --tags```
Package: slack-channeler
slack-channelerPower a Slack bot with Django Channels v2Installationpipinstallslack-channelerUsageslack-channeler relies on the channel layer. First, ensure it's setup.channels-redisis recommended.# settings.pyCHANNEL_LAYERS={'default':{'BACKEND':'channels_redis.core.RedisChannelLayer','CONFIG':{"hosts":[('localhost',6379)],},},}Create a consumer to handle Slack events# consumers.pyfromchannels.consumerimportAsyncConsumer,get_handler_nameclassSlackConsumer(AsyncConsumer):asyncdefdispatch(self,message):handler=getattr(self,get_handler_name(message),None)ifhandler:awaithandler(**message['data'])asyncdefslack_message(self,channel,text,**kwargs):# Simply echo back messageawaitself.channel_layer.send('slack',{'type':'message','channel':channel,'text':text,})Route Slack events to the consumer# routing.pyfromchannels.routingimportProtocolTypeRouter,ChannelNameRouterfrom.consumersimportSlackConsumerapplication=ProtocolTypeRouter({'channel':ChannelNameRouter({'slack':SlackConsumer,}),})Start a Channels worker to handle Slack events from the channel layerpythonmanage.pyrunworkerslackLastly, run slack-channelerSLACK_CHANNELER_TOKEN=xoxb-12345678900-098765432100-DeadBeefFeed90iIJjYsf3ayslack_channelerBuilding packageCurrently, poetry does not support dynamic generation of version files, nor custom hooks to do so. To keeppyproject.tomlthe source of authority for version numbers, a custombuild.pyscript is used to dynamically generateversion.py.To build slack-channeler, runpython build.py. This has the same semantics aspoetry build.
Package: slack-cli-hooks
Python Slack HooksThis library defines the contract between theSlack CLIandBolt for Python.OverviewThis library enables inter-process communication between theSlack CLIand applications built with Bolt for Python.When used together, the CLI delegates various tasks to the Bolt application by invoking processes ("hooks") and then making use of the responses provided by each hook'sstdout.For a complete list of available hooks, read theSupported Hookssection.RequirementsThe latest minor version ofBolt v1is recommended.UsageA Slack CLI-compatible Slack application includes a./slack.jsonfile that contains hooks specific to that project. Each hook is associated with commands that are available in the Slack CLI. By default,get-hooksretrieves all of thesupported hooksand their corresponding scripts as defined in this library.The CLI will always use the version of thepython-slack-hooksthat is specified in the project'srequirements.txt.Supported HooksThe hooks currently supported for use within the Slack CLI includecheck-update,get-hooks,get-manifest, andstart:Hook NameCLI CommandFileDescriptioncheck-updateslack updatecheck_update.pyChecks the project's Slack dependencies to determine whether or not any libraries need to be updated.get-hooksAllget_hooks.pyFetches the list of available hooks for the CLI from this repository.get-manifestslack manifestget_manifest.pyConverts amanifest.jsonfile into a valid manifest JSON payload.startslack runstart.pyWhile developing locally, the CLI manages a socket connection with Slack's backend and utilizes this hook for events received via this connection.Overriding HooksTo customize the behavior of a hook, add the hook to your application's/slack.jsonfile, and provide a corresponding script to be executed.When commands are run, the Slack CLI will look to the project's hook definitions and use those instead of what's defined in this library, if provided.Below is an example/slack.jsonfile that overrides the defaultstart:{"hooks":{"get-hooks":"python3 -m slack_cli_hooks.hooks.get_hooks","start":"python3 app.py"}}ContributingContributions are always welcome! Please review thecontributing guidelinesfor more information.
Package: slackclipper
SlackClipperCopy the contents of a Slack thread.DescriptionGreat conversations happen in Slack. But once the conversation is over, how do you use what you've learned? You could rely on your memory, so your precious insights are as easy to find as your car keys. Or you could extract the content and store it in your favourite knowledge-management system, like Notion, Confluence, Obsidian or JIRA.Unfortunately, when it comes to sharing data, Slack is pretty stubborn. Simply highlighting the text of a thread and copying it results in mostly garbage. If all your Slack administrators are similarly motivated, they might have installed third-party apps that tie into a corporate workflow.So what if you just want the text of a Slack thread your way? You needslackclipper.slackclipperuses your personal Slack account to copy the text you want in the format you prefer. Want to add a discussion to a JIRA issue? Store some golden knowledge in Obsidian? Reference some colleagues in your Notion?slackclipperenables it all. Simply provide it the thread you want to clip and it will return the content, formatted ready for its new life.By default the clipped content will be neatly formatted in Markdown. But the data is yours! Customise the format, or even export to any format with an API. Prefer PDF, or Google Docs or even dictated audio? Go for it!This project is not endorsed or authorised in any way by Slack Technologies LLC.Installationpip install slackclipperThis will install theslackclipperlibrary for advanced use within Python, but also installs a convenience executable by the same name, so you can run it directly from the command line.UsageCopy the link to the thread in Slack.Runslackclipperin your Terminal.Paste the result into the destination of your choice.Extracting Slack CredentialsWhenslackclipperis run for the first time, it will attempt to extract your Slack credentials usingslacktokens. You may be prompted for your password.If extraction is successful, these credentials will be stored (in~/.config/slackclipper/) for future use. To replace the store with freshly extracted credentials, runslackclipperwith the-uor-update-credentialsflag.Shortcomingsslackclipperrelies onslacktokensto extract your Slack credentials.slacktokenscurrently only supports macOS and Linux.If credentials extraction fails for this or any other reason, credentials can be provided manually using Python like so:>>>fromslackclipperimportupdate_credentials_store>>>update_credentials_store(creds)# where "creds" is in the format produced by slacktokensMessage authors are given as a user ID. This is easy to improve by doing a user lookup to turn them into a useful name.Timestamps are not yet included in the output. Just need to come up with a suitable format.Some things aren't formatted well. For example:links are oddly formatted;mentions and emoticons aren’t;and multimedia won’t come through well.Only exports in MarkDown format for now.
Package: slackdump
Slack DumpDump slack data via chrome browser, and do analytics on itscraper.pyscrapes a slack channelchrome.pystarts a temporary chrome process on osxInstall$pipinstallslackdumpUsageBefore running theslackdumpcommand you need tobe logged into slack in chromeclose chrome completelyfor osx$slackdump--ROOTURL=https://somewhere.slack.com/messages/66666666>output.json
Package: slackelot
Simple wrapper around the Slack Web API to post messages.DetailsSlackelot contains a single function:send_message(message, webhook_url,pretext='',title='',author_name='',color=None)webhook_urlshould be in the following format:'https://hooks.slack.com/services/TEAM_ID/BOT_OR_CHANNEL_ID/AUTH_TOKEN'Examplefrom slackelot import send_message


webhook_url = 'https://hooks.slack.com/services/TXXXXXXXX/BXXXXXXXX/XXXXXXXXXXXXXXXXXXXXXXXX'
message = 'Who wants to push the pram?\n@lancelot @percival'
pretext = 'Knights of the Round Table'
title = 'Spamelot'
author_name = 'Arthur'
color = '#663399'

send_message(message, webhook_url, pretext=pretext, title=title, author_name=author_name, color=color)https://github.com/Chris-Graffagnino/slackelot/blob/master/slackelot_example.pngExtra GoodnessPaid teams have the option to mention other subteams, (ie. channel). In
that case, you might append something like this to your message:'\n<!subteam^ID|HANDLE>'(replaceIDandHANDLEwith your
subteam’s id and name, respectively).For more information on message formatting, see theSlack API
docsFAQWhere do I find my Slack team
id?Where do I find my Slack channel
ids?How do I create the url
(webhook)?
Package: slacken
IntroductionContains the RESTAccess class for calling endpoints including tools for
accessing both json and xml data. Also included are tools for accessing this
information as an AttrDict (attribute dictionary) - a dictionary where keys can
also be accessed as attributes, in javascript style - accessing a value of this
class of type dict will return another AttrDict, however the original object is
always accessible by calling ._as_dict() on an AttrDict objectInstallation RequirementsThe following modules are required:None currentlyInstallationJust run the following command at the command prompt:$sudopipinstallslackenUsagefromslackenimportRESTaccess,XMLAccessor,AttrDictrest_accessor=RESTaccess(rest_root)response_data=rest_accessor(endpoint)response_dict=response_data.to_dict()\ifisinstance(response_data,XMLAccessor)else\AttrDict(response_data)LicenseThe MIT License (MIT)Copyright (c) 2013 Alistair BroomheadPermission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the “Software”), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
Package: slacker
AboutSlacker is a full-featured Python interface for theSlack API.Installation$pipinstallslackerExamplesfromslackerimportSlackerslack=Slacker('<your-slack-api-token-goes-here>')# Send a message to #general channelslack.chat.post_message('#general','Hello fellow slackers!')# Get users listresponse=slack.users.list()users=response.body['members']# Upload a fileslack.files.upload('hello.txt')# If you need to proxy the requestsproxy_endpoint='http://myproxy:3128'slack=Slacker('<your-slack-api-token-goes-here>',http_proxy=proxy_endpoint,https_proxy=proxy_endpoint)# Advanced: Use `request.Session` for connection pooling (reuse)fromrequests.sessionsimportSessionwithSession()assession:slack=Slacker(token,session=session)slack.chat.post_message('#general','All these requests')slack.chat.post_message('#general','go through')slack.chat.post_message('#general','a single https connection')Documentationhttps://api.slack.com/methods
Package: slacker2
AboutSlackerToo is aforkand continuation ofSlackerlibrary, a full-featured Python interface for theSlack API.Installation$pipinstallslacker2Examplesfromslacker2importSlackerslack=Slacker('<your-slack-api-token-goes-here>')# Send a message to #general channelslack.chat.post_message('#general','Hello fellow slackers!')# Get users listresponse=slack.users.list()users=response.body['members']# Upload a fileslack.files.upload('hello.txt')# If you need to proxy the requestsproxy_endpoint='http://myproxy:3128'slack=Slacker('<your-slack-api-token-goes-here>',http_proxy=proxy_endpoint,https_proxy=proxy_endpoint)# Advanced: Use `request.Session` for connection pooling (reuse)fromrequests.sessionsimportSessionwithSession()assession:slack=Slacker(token,session=session)slack.chat.post_message('#general','All these requests')slack.chat.post_message('#general','go through')slack.chat.post_message('#general','a single https connection')Documentationhttps://api.slack.com/methods
Package: slackerade
Masquerade yourself as fictitious user on slackUsage./slackerade.py https://hooks.slack.com/services/CHANNEL/URL/HASH
USERNAME MSG EMOJI_NAMENote: to have access to the channelWebhook Urlyou must first activate slackIncoming Webhookfeature as explainedhere.Example./slackerade.pyhttps://hooks.slack.com/services/<censured>"The Joker"  "That's the joke" ":thats_the_joke:"gives :
Package: slacker-cli
Send messages toSlackfrom command line.Usagedate|slacker-cslack_channel-tslack_tokenTheSlack tokencan be called from an enviroment variable, calledSLACK_TOKEN.You can setSLACK_TOKENin your~/.bashrc# ~/.bashrcexportSLACK_TOKEN="slack_token_string"date|slacker-cslack_channelSend message to user:date|slacker-uuser_nameUpload file to channel:date|slacker-cslack_channel-fimage.pngAdd sender name and emoji avatar:date|slacker-nSlackerBot-i:dancer:Installationpipinstallslacker-cliTokensYou can eithergenerate test tokensorcreate a bot user and use its token.ContributorsAlex JurkiewiczDavid YenEthan ErchingerHugo van KemenadeJuanPablo AJKentaro WadaMarc AbramowitzValentin Lab
Package: slacker_game
SlackerSlacker is a clone/parody of the popular arcade gameStacker, in which
you must stack blocks to the top of the screen in order to win the game.
Boxes will move back and forth at varying speeds.  Press Space
to stop the boxes and move on to the next row.  Only boxes that have
something underneath them will be stacked.  As the tower rises, the game
will make your tower thinner.  You win a minor prize at the 10th level
(the blocks change color), and if you reach the 15th level, you will win
the major prize.  Good luck!This game and the above description was originally written by Clint
and Jennifer Herron.  I forked the game to improve the codebase,
make it more similar to the arcade game and hopefully add more features.InstallationSlacker can run on Python 3.7 or above.  You can install it usingpip.ControlSpace: Start playing or place your stacking boxes.Escape orq: Return to intro screen or quit.1to9: Set the speed of the game (default: 5).0: Increase the number of blocks currently moving.CreditsOriginal versionby Clint "HanClinto" Herron (coding)
and Jennifer Herron (graphics)VT323 fontby Peter Hull and Jacques Le BaillyTango color paletteby the Tango Desktop Project
Package: slacker-python
Python client of theslacker RPC.This project is still working in progress.Installationpip install slacker-pythonUsagefrom slacker.geventbackend import Client
from slacker.proxy import Proxy

c = Client("127.0.0.1:2104")
p = Proxy(c, "slacker.example.api")

## remote function echo
p.echo("hello")

## remote function rand-ints
p.call("rand-ints", 40)LicenseThis package is open sourced under MIT License.
Package: slackertpy
SlackertpyA simple way to create and send Slack messages through a webhook.Especially useful for logging and alerting, supports three logging levelsError, Info, Debugand templates to simplify sending the same layout message with different content.This is a port from a Ruby librarySlackert. Follow Slackert's documnetation for in depth description of classes and methods.InstallationInstall using pippip install slackertpyUsageSlackert sends message through an incoming webhook.Initialize alerr client that will handle sending out your messagesfrom slackertpy import Alerter
alerter = Alerter('your-webhook-url)Create a message with templatesfrom slackertpy import templates
simple_message = templates.notification(
    text="Hello from Slackert!"
)Send it on its way with alerteralerter.info(simple_message)You can use richer templates or compose messages from scratch usingMessageBuilder. Consult the documentation for more information.alert = templates.notification(text='Incoming debug info!', title='Silly Little Job')
alerter.debug(alert)


alert = templates.job_executed(
    title='Process ABC',
    result='Success',
    overview={
        'Start Time': process_start_time,
        'Server Location': 'US'
    },
    stats={
        'Records': 12345,
        'Retries': 3
    }
)
alerter.info(alert)Tag users to notify them an exception was raisederror_alert = templates.job_error(
    title='Process ABC',
    error=error_output,
    notify_user_ids=['MemberID1', 'MemberID2'],
    extra={
        'Retries': num_retries
    }
)