| Name | vqueue-sdk JSON | 
            
| Version | 
                  0.1.2
                   
                  JSON | 
            
 | download  | 
            
| home_page | None  | 
            
| Summary | A toolset for Virtual Queue integrations in Python | 
            | upload_time | 2025-07-25 15:43:26 | 
            | maintainer | None | 
            
            | docs_url | None | 
            | author | None | 
            
            | requires_python | >=3.10 | 
            
            
            | license | None | 
            | keywords | 
                
                    tickets
                
                     queue
                
                     async
                
                     events
                
                     high-demand
                 | 
            | VCS | 
                
                     | 
                
            
            | bugtrack_url | 
                
                 | 
             
            
            | requirements | 
                
                  No requirements were recorded.
                
             | 
            
| Travis-CI | 
                
                   No Travis.
                
             | 
            | coveralls test coverage | 
                
                   No coveralls.
                
             | 
        
        
            
            # Virtual Queue Python SDK
SDK to communicate with Virtual Queue's API in Python projects.
## How to use
> [!NOTE]
> See more examples [here](https://github.com/animus-coop/virtual-queue-python-sdk/tree/main/examples), including an example of how to use this SDK inside a Flask application
You can verify the token with `TokenVerifier` like this:
```python
from vqueue import TokenVerifier
from vqueue.exceptions import VQueueApiError, VQueueError, VQueueNetworkError
def your_function_or_handler():
    # Get the token from the request in your system
    token = str(uuid4())  # This is an example UUIDv4
    # This handles the connections with a session and can be reused
    # for better performance
    verifier = TokenVerifier()
    try:
        # Handle the happy path
        verified_result = verifier.verify_token(token)
        print("The token was successfuly verified:", verified_result)
    except ValueError as ve:
        # Then handle the possible errors
        # Of course, you should handle the exceptions with more grace than this
        print("The token is not valir UUID", ve)
    except VQueueNetworkError as ne:
        print("Network error", ne)
    except VQueueApiError as ae:
        print("The API returned an error status", ae)
    except VQueueError as vqe:
        print("A generic error with the Virtual Queue system or this SDK", vqe)
```
You can also wrap your code in a context managed `with` block:
```python
    with TokenVerifier() as verfifier:
        try:
            # Handle the happy path
            verified_result = verifier.verify_token(token)
            print("The token was successfuly verified:", verified_result)
        except ValueError as ve:
            # Then handle the possible errors
            # Of course, you should handle the exceptions with more grace than this
            print("The token is not valir UUID", ve)
        except VQueueNetworkError as ne:
            print("Network error", ne)
        except VQueueApiError as ae:
            print("The API returned an error status", ae)
        except VQueueError as vqe:
            print("A generic error with the Virtual Queue system or this SDK", vqe)
```
            
         
        Raw data
        
            {
    "_id": null,
    "home_page": null,
    "name": "vqueue-sdk",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "tickets, queue, async, events, high-demand",
    "author": null,
    "author_email": "\"Animus Coop.\" <info@animus.com.ar>",
    "download_url": "https://files.pythonhosted.org/packages/a2/63/9760d52bb6b78f48d3aec022da2f6bb2255eea970a4e30654f831a4c71fd/vqueue_sdk-0.1.2.tar.gz",
    "platform": null,
    "description": "# Virtual Queue Python SDK\n\nSDK to communicate with Virtual Queue's API in Python projects.\n\n## How to use\n\n> [!NOTE]\n> See more examples [here](https://github.com/animus-coop/virtual-queue-python-sdk/tree/main/examples), including an example of how to use this SDK inside a Flask application\n\nYou can verify the token with `TokenVerifier` like this:\n\n```python\nfrom vqueue import TokenVerifier\nfrom vqueue.exceptions import VQueueApiError, VQueueError, VQueueNetworkError\n\n\ndef your_function_or_handler():\n    # Get the token from the request in your system\n    token = str(uuid4())  # This is an example UUIDv4\n\n    # This handles the connections with a session and can be reused\n    # for better performance\n    verifier = TokenVerifier()\n\n    try:\n        # Handle the happy path\n        verified_result = verifier.verify_token(token)\n        print(\"The token was successfuly verified:\", verified_result)\n    except ValueError as ve:\n        # Then handle the possible errors\n        # Of course, you should handle the exceptions with more grace than this\n        print(\"The token is not valir UUID\", ve)\n    except VQueueNetworkError as ne:\n        print(\"Network error\", ne)\n    except VQueueApiError as ae:\n        print(\"The API returned an error status\", ae)\n    except VQueueError as vqe:\n        print(\"A generic error with the Virtual Queue system or this SDK\", vqe)\n```\n\nYou can also wrap your code in a context managed `with` block:\n\n```python\n    with TokenVerifier() as verfifier:\n        try:\n            # Handle the happy path\n            verified_result = verifier.verify_token(token)\n            print(\"The token was successfuly verified:\", verified_result)\n        except ValueError as ve:\n            # Then handle the possible errors\n            # Of course, you should handle the exceptions with more grace than this\n            print(\"The token is not valir UUID\", ve)\n        except VQueueNetworkError as ne:\n            print(\"Network error\", ne)\n        except VQueueApiError as ae:\n            print(\"The API returned an error status\", ae)\n        except VQueueError as vqe:\n            print(\"A generic error with the Virtual Queue system or this SDK\", vqe)\n```\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A toolset for Virtual Queue integrations in Python",
    "version": "0.1.2",
    "project_urls": {
        "Homepage": "https://github.com/animus-coop/virtual-queue-python-sdk"
    },
    "split_keywords": [
        "tickets",
        " queue",
        " async",
        " events",
        " high-demand"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "d94c1872930e6042555e8ad0fe2d24eab88a5e13fa4b7ad137cc4c98bd25fab2",
                "md5": "a30f18461d688fbc48ab5fe1fa205c88",
                "sha256": "31ffb6772bb4e1f8fdfc3e50332b2eec790029c507be6845a1a0446a60e00166"
            },
            "downloads": -1,
            "filename": "vqueue_sdk-0.1.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "a30f18461d688fbc48ab5fe1fa205c88",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 5217,
            "upload_time": "2025-07-25T15:43:25",
            "upload_time_iso_8601": "2025-07-25T15:43:25.595179Z",
            "url": "https://files.pythonhosted.org/packages/d9/4c/1872930e6042555e8ad0fe2d24eab88a5e13fa4b7ad137cc4c98bd25fab2/vqueue_sdk-0.1.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "a2639760d52bb6b78f48d3aec022da2f6bb2255eea970a4e30654f831a4c71fd",
                "md5": "b23c335fcfd31a1d6170dac9d00db5cb",
                "sha256": "f20ac86e93d4c025b81d7f37225d3b85d652a7afd1e5f84ac80d3ca5d471c6a6"
            },
            "downloads": -1,
            "filename": "vqueue_sdk-0.1.2.tar.gz",
            "has_sig": false,
            "md5_digest": "b23c335fcfd31a1d6170dac9d00db5cb",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 5695,
            "upload_time": "2025-07-25T15:43:26",
            "upload_time_iso_8601": "2025-07-25T15:43:26.601046Z",
            "url": "https://files.pythonhosted.org/packages/a2/63/9760d52bb6b78f48d3aec022da2f6bb2255eea970a4e30654f831a4c71fd/vqueue_sdk-0.1.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-25 15:43:26",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "animus-coop",
    "github_project": "virtual-queue-python-sdk",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "vqueue-sdk"
}