A rich API wrapper for stips.co.il written in Python.
Install using pip (pypi):
pip install stipspy
You can choose to use the API with or without logging in, but some methods will be unavailable without authentication.
# see the latest question
from stips import StipsClient
api = StipsClient()
questions = api.get_new_questions()
latest = questions[0]
print(f'{latest.title=}')
print(f'author: {latest.author.name if not latest.anonymous else "anonymous"}')
print(f'{latest.answer_count=}')
# print unread messages
from stips import StipsClient
api = StipsClient(email=email, password=password)
# or
api = StipsClient(cookies=cookies)
new_messages_count = api.get_notifications_count().messages
print(f'Found {new_messages_count} unread message(s)')
if new_messages_count > 0:
# this only covers first 28 chats
# for better searching see pagetools.iterpages
messages_list = api.get_messages_list(page=1)
for direct in messages_list:
if direct.new_messages_count > 0:
print(f'{direct.new_messages_count} message(s) from {direct.from_user.name}: {direct.last_message}')
More examples in the /examples directory
You can find the documentation here:
https://verifybot.github.io/stipsapi-docs/stips.html
- π¦Έ Support all API endpoints
- π₯ Easy to use API
- π Create documentation
- π Handle API Ratelimit
Feel free to post a pull request or an issue if you have any ideas, suggestions, or if you've found any bugs.