stipspy


Namestipspy JSON
Version 0.1.0 PyPI version JSON
download
home_pagehttps://github.com/VerifyBot/stips-api
SummaryAn API wrapper for Stips written in in Python.
upload_time2023-08-12 14:59:35
maintainer
docs_urlNone
authorNiryo
requires_python
license
keywords python stips api
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
# Stips API

> A rich API wrapper for [**stips.co.il**](https://stips.co.il) written in Python. <br>

## â›ē Install

Install using pip:

```bash
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

```python
# 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=}')
```

<br>

#### Example with authentication

```python
# 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](examples)

## 📃 Documentation

You can find the documentation here:<br/>
https://stips-py.readthedocs.io/en/latest/

## ðŸ›Ģïļ Roadmap

- [x] ðŸĶļ Support all API endpoints
- [x] ðŸĨ Easy to use API
- [x] 📃 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.



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/VerifyBot/stips-api",
    "name": "stipspy",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "python,stips,api",
    "author": "Niryo",
    "author_email": "<nirchuk.yona@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/e8/43/174de19e475fa87121a6673197ef0011367c3584da8ca47dae0b2d31e608/stipspy-0.1.0.tar.gz",
    "platform": null,
    "description": "\r\n# Stips API\r\n\r\n> A rich API wrapper for [**stips.co.il**](https://stips.co.il) written in Python. <br>\r\n\r\n## \u26f2 Install\r\n\r\nInstall using pip:\r\n\r\n```bash\r\npip install stipspy\r\n```\r\n\r\n## \ud83e\udeb4 Usage\r\n\r\nYou can choose to use the API with or without logging in,\r\nbut some methods will be unavailable without authentication.\r\n\r\n#### Example without user authentication\r\n\r\n```python\r\n# see the latest question\r\n\r\nfrom stips import StipsClient\r\n\r\napi = StipsClient()\r\n\r\nquestions = api.get_new_questions()\r\nlatest = questions[0]\r\n\r\nprint(f'{latest.title=}')\r\nprint(f'author: {latest.author.name if not latest.anonymous else \"anonymous\"}')\r\nprint(f'{latest.answer_count=}')\r\n```\r\n\r\n<br>\r\n\r\n#### Example with authentication\r\n\r\n```python\r\n# print unread messages\r\n\r\nfrom stips import StipsClient\r\n\r\napi = StipsClient(email=email, password=password)\r\n# or\r\napi = StipsClient(cookies=cookies)\r\n\r\nnew_messages_count = api.get_notifications_count().messages\r\n\r\nprint(f'Found {new_messages_count} unread message(s)')\r\n\r\nif new_messages_count > 0:\r\n  # this only covers first 28 chats\r\n  # for better searching see pagetools.iterpages\r\n  messages_list = api.get_messages_list(page=1)\r\n\r\n  for direct in messages_list:\r\n    if direct.new_messages_count > 0:\r\n      print(f'{direct.new_messages_count} message(s) from {direct.from_user.name}: {direct.last_message}')\r\n```\r\n\r\nMore examples in the [/examples directory](examples)\r\n\r\n## \ud83d\udcc3 Documentation\r\n\r\nYou can find the documentation here:<br/>\r\nhttps://stips-py.readthedocs.io/en/latest/\r\n\r\n## \ud83d\udee3\ufe0f Roadmap\r\n\r\n- [x] \ud83e\uddb8 Support all API endpoints\r\n- [x] \ud83d\udc25 Easy to use API\r\n- [x] \ud83d\udcc3 Create documentation\r\n- [ ] \ud83d\ude8f Handle API Ratelimit\r\n\r\n## \ud83d\ude4f Contributing\r\n\r\nFeel free to post a pull request or an issue if you\r\nhave any ideas, suggestions, or if you've found any bugs.\r\n\r\n\r\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "An API wrapper for Stips written in in Python.",
    "version": "0.1.0",
    "project_urls": {
        "Homepage": "https://github.com/VerifyBot/stips-api"
    },
    "split_keywords": [
        "python",
        "stips",
        "api"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e843174de19e475fa87121a6673197ef0011367c3584da8ca47dae0b2d31e608",
                "md5": "ee517fed726324a27e5d75d27872e412",
                "sha256": "6e33787f248b390215d688ee97f4b87056b2352c1fd5216512c5052bbe1a72ea"
            },
            "downloads": -1,
            "filename": "stipspy-0.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "ee517fed726324a27e5d75d27872e412",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 27970,
            "upload_time": "2023-08-12T14:59:35",
            "upload_time_iso_8601": "2023-08-12T14:59:35.684360Z",
            "url": "https://files.pythonhosted.org/packages/e8/43/174de19e475fa87121a6673197ef0011367c3584da8ca47dae0b2d31e608/stipspy-0.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-08-12 14:59:35",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "VerifyBot",
    "github_project": "stips-api",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "stipspy"
}
        
Elapsed time: 0.10472s