An API wrapper for Stips written in in Python.
Project description
Stips API
A rich API wrapper for stips.co.il written in Python.
⛲ Install
Install using pip:
pip install stipspy
🪴 Usage
You can choose to use the API with or without logging in, but some methods will be unavailable without authentication.
Example without user 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=}')
Example with authentication
# 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
📃 Documentation
You can find the documentation here:
https://stips-py.readthedocs.io/en/latest/
🛣️ Roadmap
- 🦸 Support all API endpoints
- 🐥 Easy to use API
- 📃 Create documentation
- 🚏 Handle API Ratelimit
🙏 Contributing
Feel free to post a pull request or an issue if you have any ideas, suggestions, or if you've found any bugs.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
stipspy-0.1.0.tar.gz
(28.0 kB
view details)
File details
Details for the file stipspy-0.1.0.tar.gz.
File metadata
- Download URL: stipspy-0.1.0.tar.gz
- Upload date:
- Size: 28.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6e33787f248b390215d688ee97f4b87056b2352c1fd5216512c5052bbe1a72ea
|
|
| MD5 |
ee517fed726324a27e5d75d27872e412
|
|
| BLAKE2b-256 |
e843174de19e475fa87121a6673197ef0011367c3584da8ca47dae0b2d31e608
|