Skip to main content

Python package slacki for reading and posting in slack groups.

Project description

slacki

Python PyPI Version License Downloads Coffee

Star it if you like it!
  • Slacki is Python package for reading and posting in slack groups.

Contents

Installation

  • Install slacki from PyPI (recommended). slacki is compatible with Python 3.6+ and runs on Linux, MacOS X and Windows.
  • A new environment can be created as following:
conda create -n env_slacki python=3.7
conda activate env_slacki
pip install slacki
  • Alternatively, install slacki from the GitHub source:
# Directly install from github source
pip install -e git://github.com/erdogant/slacki.git@0.1.0#egg=master
pip install git+https://github.com/erdogant/slacki#egg=master

# By cloning
pip install git+https://github.com/erdogant/slacki
git clone https://github.com/erdogant/slacki.git
cd slacki
python setup.py install

Import slacki package

from slacki import slacki

Example:

# Import library
from slacki import slacki

# Initialize
token='xoxp-123234234235-123234234235-123234234235-adedce74748c3844747aed48499bb'
sc = slacki(channel='new_channel', token=token)

# Get some info about the users
users = sc.info()

 # Send messages
queries=['message 1','message 2']
sc.post(queries)

# Snoozing
sc.snooze(minutes=1)

# Post file
sc.post_file(file='./data/slack.png', title='Nu ook met figuren uploaden :)')

# listen (retrieve only last message)
out = sc.retrieve_posts(n=3)

# %% listen (retrieve only last message)
sc.listen()

Citation

Please cite slacki in your publications if this is useful for your research. Here is an example BibTeX entry:

@misc{erdogant2020slacki,
  title={slacki},
  author={Erdogan Taskesen},
  year={2020},
  howpublished={\url{https://github.com/erdogant/slacki}},
}

References

Maintainer

  • Erdogan Taskesen, github: erdogant
  • Contributions are welcome.
  • If you wish to buy me a Coffee for this work, it is very appreciated :)

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

slacki-0.1.1.tar.gz (8.0 kB view hashes)

Uploaded Source

Built Distribution

slacki-0.1.1-py3-none-any.whl (8.4 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