Name | verifit JSON |
Version |
5.0.2
JSON |
| download |
home_page | None |
Summary | Verify It: Small automatic testing helper tools |
upload_time | 2024-04-09 10:50:59 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.9 |
license | MIT License Copyright (c) 2022 sorelmitra 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 |
automatic testing tools
acceptance testing tools
|
VCS |
|
bugtrack_url |
|
requirements |
PyJWT
pytest
jsonpickle
build
twine
check-manifest
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# Authentication Tools Library
This small Python library provides a few tools designed to facilitate the writing of automated tests for any type of application. It encompasses functionalities for login procedures, a caching mechanism for efficient data retrieval, a utility for simulating successful and failed communication results, and a few operations for date and time calculations. The library aims to streamline authentication tasks, improve performance via caching strategies, and assist with testing apps that depend on other services or APIs.
# Project Structure
The project is organized into two main directories, `src` for the source code and `test` for the self-test suite, ensuring the functionality is thoroughly verified.
## Source Code (`src`)
The `src` directory encapsulates the core functionalities divided into several modules:
- **`endpoint_tools.py`**: Manages endpoint results, including checks for success and configuration for sequences of endpoint results. By 'endpoint' we really mean any type of communication from your app to some other service that returns a payload and some status code. So with this library you're not tied to a particular type of service or API.
- **`cache.py`**: Provides caching functionalities to store, retrieve, and manage any type of JSON-serializable data, enhancing performance and data retrieval efficiency.
- **`json_web_token.py`**: Facilitates operations related to JWTs, such as decoding and extracting expiration dates, used in the cache mechanism.
- **`date_tools.py`**: Contains utilities for date and time calculations, supporting operations like token expiration checks.
- **`login.py`**: Handles login operations, leveraging JWT validation and caching for optimized login processes. The module only does the bookkeeping around logging in. The actual log in is done by the user of the library, via a very simple `driver` mechanism - you need to supply a function that takes a username and secret, and returns an access token as a JWT string. So, apart from JTW, this library is not tied to any particular authentication mechanism.
Each module is documented inline, offering insights into their functionalities and usage.
## Tests (`test`)
The `test` directory includes tests for the source code's functionality, structured as follows:
- **`test_login.py`**: Ensures the login process, including token handling and caching, works as expected under various scenarios.
- **`test_endpoint_tools.py`**: Verifies the endpoint results simulation, with both success and failure cases.
Tests are implemented with `pytest`, which is a robust framework for validating each component's correctness and reliability.
# Conclusion
This library went through quite a few iterations. Its present form reflects my current stance on helper libraries in general: In-house developed libraries should be kept as simple and focused as possible. Large project templates or frameworks actually make things worse in both the long and short term, because of the time they consume for writing and maintaining them on one side, and on understanding and using them, on the other.
Raw data
{
"_id": null,
"home_page": null,
"name": "verifit",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": "automatic testing tools, acceptance testing tools",
"author": null,
"author_email": "Sorel Mitra <sorelmitra@yahoo.com>",
"download_url": "https://files.pythonhosted.org/packages/0b/91/940f6776364e9e07bdc7f82f26cbd8cd7b12664f5c4715b31e93317d40ea/verifit-5.0.2.tar.gz",
"platform": null,
"description": "\n# Authentication Tools Library\n\nThis small Python library provides a few tools designed to facilitate the writing of automated tests for any type of application. It encompasses functionalities for login procedures, a caching mechanism for efficient data retrieval, a utility for simulating successful and failed communication results, and a few operations for date and time calculations. The library aims to streamline authentication tasks, improve performance via caching strategies, and assist with testing apps that depend on other services or APIs.\n\n\n# Project Structure\n\nThe project is organized into two main directories, `src` for the source code and `test` for the self-test suite, ensuring the functionality is thoroughly verified.\n\n## Source Code (`src`)\n\nThe `src` directory encapsulates the core functionalities divided into several modules:\n\n- **`endpoint_tools.py`**: Manages endpoint results, including checks for success and configuration for sequences of endpoint results. By 'endpoint' we really mean any type of communication from your app to some other service that returns a payload and some status code. So with this library you're not tied to a particular type of service or API.\n\n- **`cache.py`**: Provides caching functionalities to store, retrieve, and manage any type of JSON-serializable data, enhancing performance and data retrieval efficiency.\n\n- **`json_web_token.py`**: Facilitates operations related to JWTs, such as decoding and extracting expiration dates, used in the cache mechanism.\n\n- **`date_tools.py`**: Contains utilities for date and time calculations, supporting operations like token expiration checks.\n\n- **`login.py`**: Handles login operations, leveraging JWT validation and caching for optimized login processes. The module only does the bookkeeping around logging in. The actual log in is done by the user of the library, via a very simple `driver` mechanism - you need to supply a function that takes a username and secret, and returns an access token as a JWT string. So, apart from JTW, this library is not tied to any particular authentication mechanism.\n\nEach module is documented inline, offering insights into their functionalities and usage.\n\n## Tests (`test`)\n\nThe `test` directory includes tests for the source code's functionality, structured as follows:\n\n- **`test_login.py`**: Ensures the login process, including token handling and caching, works as expected under various scenarios.\n\n- **`test_endpoint_tools.py`**: Verifies the endpoint results simulation, with both success and failure cases.\n\nTests are implemented with `pytest`, which is a robust framework for validating each component's correctness and reliability.\n\n\n# Conclusion\n\nThis library went through quite a few iterations. Its present form reflects my current stance on helper libraries in general: In-house developed libraries should be kept as simple and focused as possible. Large project templates or frameworks actually make things worse in both the long and short term, because of the time they consume for writing and maintaining them on one side, and on understanding and using them, on the other.\n",
"bugtrack_url": null,
"license": "MIT License Copyright (c) 2022 sorelmitra 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": "Verify It: Small automatic testing helper tools",
"version": "5.0.2",
"project_urls": {
"Homepage": "https://github.com/sorelmitra/verifit"
},
"split_keywords": [
"automatic testing tools",
" acceptance testing tools"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "b3a8bb626872641d4994d8e7ccfbce5a64f8ac0434a6498fd60ae3f7fef98912",
"md5": "63826372935467e3178c099eaffe4597",
"sha256": "8d63d5034abfde31e201ba7c353e7bb1c2eef7785410cd6d61b8d543fdbe9264"
},
"downloads": -1,
"filename": "verifit-5.0.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "63826372935467e3178c099eaffe4597",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 9177,
"upload_time": "2024-04-09T10:50:58",
"upload_time_iso_8601": "2024-04-09T10:50:58.165317Z",
"url": "https://files.pythonhosted.org/packages/b3/a8/bb626872641d4994d8e7ccfbce5a64f8ac0434a6498fd60ae3f7fef98912/verifit-5.0.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "0b91940f6776364e9e07bdc7f82f26cbd8cd7b12664f5c4715b31e93317d40ea",
"md5": "c9b74dafc486be44d427024bde2b45bb",
"sha256": "f70477b3b9a5541e1e1d52f1d756d68f516e4f8e3808ec5ce2d27cd45400ec6c"
},
"downloads": -1,
"filename": "verifit-5.0.2.tar.gz",
"has_sig": false,
"md5_digest": "c9b74dafc486be44d427024bde2b45bb",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 9919,
"upload_time": "2024-04-09T10:50:59",
"upload_time_iso_8601": "2024-04-09T10:50:59.479754Z",
"url": "https://files.pythonhosted.org/packages/0b/91/940f6776364e9e07bdc7f82f26cbd8cd7b12664f5c4715b31e93317d40ea/verifit-5.0.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-04-09 10:50:59",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "sorelmitra",
"github_project": "verifit",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [
{
"name": "PyJWT",
"specs": []
},
{
"name": "pytest",
"specs": []
},
{
"name": "jsonpickle",
"specs": []
},
{
"name": "build",
"specs": []
},
{
"name": "twine",
"specs": []
},
{
"name": "check-manifest",
"specs": []
}
],
"lcname": "verifit"
}