sws-api-wrapper


Namesws-api-wrapper JSON
Version 0.1.4 PyPI version JSON
download
home_page
SummaryAn API wrapper for So We Sign
upload_time2024-01-23 10:47:49
maintainer
docs_urlNone
author
requires_python>=3.8
licenseMIT License Copyright (c) 2024 Jacques Soghomonyan Permission 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.
keywords so we sign sowesign sws
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # SWS

An API wrapper for the signing application SoWeSign.

> [!IMPORTANT]
> THIS IS JUST A WRAPPER.
>
> I DO NOT CONDONE ANY USE OUTSIDE OF SO WE SIGN'S [TOS](https://sowesign.com/mentions-legales/)
>
> THIS PROJECT IS FOR EDUCATIONAL PURPOSES AND IT IS USED IN THE PROCESS OF DISCOVERING THE REST API.


### The project is still in progress but most of it is functional.

This project is composed of 3 'modules', the basic api, and two classes for easier use.
In most cases you'll just use the `User` class in the `User` module.

## TLDR; Examples

#### Printing the 10 next courses of the given user.
```py
from sws_api_wrapper.User import User

user = User.from_digits(institution_code='0000', login_code='00000000', login_pin='0000')

for course in user.get_future_courses(number_of_courses=10):
    print(course.name, course.start.date())
```

#### Checking if `00000` is the correct code for the 1st course of the day (if it is unsigned).
```py
from sws_api_wrapper.User import User

user = User.from_digits(institution_code='0000', login_code='00000000', login_pin='0000')

course = user.get_todays_courses()[0]
code = '00000'

print(user.check_code(course, code))
```

#### Checking if the 1st course of the day is signed by the user.
```py
from sws_api_wrapper.User import User

user = User.from_digits(institution_code='0000', login_code='00000000', login_pin='0000')

course = user.get_todays_courses()[0]

print(user.is_course_signed(course))
```

#### Getting the url of a signed course
```py
from sws_api_wrapper.User import User

user = User.from_digits(institution_code='0000', login_code='00000000', login_pin='0000')

course = user.get_todays_courses()[0]

print(user.get_signature_of_course(course))
```

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "sws-api-wrapper",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "so we sign,sowesign,sws",
    "author": "",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/ea/91/ebe0e336dc24c14c28b136b6c6015d7da53d81b77c3644d9f36e622a2a88/sws_api_wrapper-0.1.4.tar.gz",
    "platform": null,
    "description": "# SWS\n\nAn API wrapper for the signing application SoWeSign.\n\n> [!IMPORTANT]\n> THIS IS JUST A WRAPPER.\n>\n> I DO NOT CONDONE ANY USE OUTSIDE OF SO WE SIGN'S [TOS](https://sowesign.com/mentions-legales/)\n>\n> THIS PROJECT IS FOR EDUCATIONAL PURPOSES AND IT IS USED IN THE PROCESS OF DISCOVERING THE REST API.\n\n\n### The project is still in progress but most of it is functional.\n\nThis project is composed of 3 'modules', the basic api, and two classes for easier use.\nIn most cases you'll just use the `User` class in the `User` module.\n\n## TLDR; Examples\n\n#### Printing the 10 next courses of the given user.\n```py\nfrom sws_api_wrapper.User import User\n\nuser = User.from_digits(institution_code='0000', login_code='00000000', login_pin='0000')\n\nfor course in user.get_future_courses(number_of_courses=10):\n    print(course.name, course.start.date())\n```\n\n#### Checking if `00000` is the correct code for the 1st course of the day (if it is unsigned).\n```py\nfrom sws_api_wrapper.User import User\n\nuser = User.from_digits(institution_code='0000', login_code='00000000', login_pin='0000')\n\ncourse = user.get_todays_courses()[0]\ncode = '00000'\n\nprint(user.check_code(course, code))\n```\n\n#### Checking if the 1st course of the day is signed by the user.\n```py\nfrom sws_api_wrapper.User import User\n\nuser = User.from_digits(institution_code='0000', login_code='00000000', login_pin='0000')\n\ncourse = user.get_todays_courses()[0]\n\nprint(user.is_course_signed(course))\n```\n\n#### Getting the url of a signed course\n```py\nfrom sws_api_wrapper.User import User\n\nuser = User.from_digits(institution_code='0000', login_code='00000000', login_pin='0000')\n\ncourse = user.get_todays_courses()[0]\n\nprint(user.get_signature_of_course(course))\n```\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2024 Jacques Soghomonyan  Permission 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.",
    "summary": "An API wrapper for So We Sign",
    "version": "0.1.4",
    "project_urls": {
        "Homepage": "https://github.com/avivi55/SWS",
        "Issues": "https://github.com/avivi55/SWS/issues"
    },
    "split_keywords": [
        "so we sign",
        "sowesign",
        "sws"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ea05379c5840dd3609a3a0a40b4139ad969627413bbb44e7774c2aea1b6e199a",
                "md5": "41b2c94d3ab4ea3c01c481768d05211d",
                "sha256": "c6eb0f3b027f5412d6949e25288e24e801a6719938034a194ef3c5e311abb498"
            },
            "downloads": -1,
            "filename": "sws_api_wrapper-0.1.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "41b2c94d3ab4ea3c01c481768d05211d",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 8648,
            "upload_time": "2024-01-23T10:47:45",
            "upload_time_iso_8601": "2024-01-23T10:47:45.944901Z",
            "url": "https://files.pythonhosted.org/packages/ea/05/379c5840dd3609a3a0a40b4139ad969627413bbb44e7774c2aea1b6e199a/sws_api_wrapper-0.1.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ea91ebe0e336dc24c14c28b136b6c6015d7da53d81b77c3644d9f36e622a2a88",
                "md5": "1bb83ed0228960537c385f1691ef8879",
                "sha256": "8cbfa10747d54c844a3ae476239f0a5b19f02f547051ee835ce39f7b5d0d2730"
            },
            "downloads": -1,
            "filename": "sws_api_wrapper-0.1.4.tar.gz",
            "has_sig": false,
            "md5_digest": "1bb83ed0228960537c385f1691ef8879",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 6508,
            "upload_time": "2024-01-23T10:47:49",
            "upload_time_iso_8601": "2024-01-23T10:47:49.216420Z",
            "url": "https://files.pythonhosted.org/packages/ea/91/ebe0e336dc24c14c28b136b6c6015d7da53d81b77c3644d9f36e622a2a88/sws_api_wrapper-0.1.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-23 10:47:49",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "avivi55",
    "github_project": "SWS",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "sws-api-wrapper"
}
        
Elapsed time: 0.16895s