ua-ilab-tools


Nameua-ilab-tools JSON
Version 2.1.4 PyPI version JSON
download
home_pageNone
SummaryNone
upload_time2024-06-28 01:04:33
maintainerNone
docs_urlNone
authorYour Name
requires_python<4.0,>=3.12
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # UA-Ilab-Tools

A set of tools that interact with Ilab's REST database.

## Motivation

Was designed to implement a simple way to interact with Ilab's REST architecture.

## Features

- ilab_api.py contains a class to use simple REST functions such as GET, PUT, POST, and DELETE.
- ua_ilab_tools.py contains a class to interact with the REST architecture outside of the simple REST verbs, such as:
    - get_service requests which returns the service requests with a given status.
    - get_service_cost which returns the cost associated with a given service_id.
    - get_request_charges which returns all of the charges of the request id.
    - get_milestones which returns all of the milestones associated with a service request.
    - get_custom_forms which returns all of the custom forms associated with the request id.
- extract_project_info which gets the relevant project info from a request.
- extract_custom_form_info which gets all of the fields of a form.

## Code Example

```python
from ua_ilab_tools import ilab_api, ua_ilab_tools


api = ilab_api.IlabApi(core_id, auth_creds)
# "token" contains the Authorization information for headers.
tools = ua_ilab_tools.IlabTools(core_id, token)

prj_info = ua_ilab_tools.extract_project_info(soup)
form_info = ua_ilab_tools.extract_custom_form_info(
    req_id, form_id, form_soup)
```

## Installation

```bash
pip install ua-ilab-tools
```

## Tests
You will have to create a file named "ilab_creds.json" in the format of:
```json
    {
        "token": "Bearer {your token}",
        "core_id": "{your core_id}"
    }

```bash
pip install --update nose
cd ./ua_ilab_tools
cd ./tests
nosetests test_ilab_tools.py
```

## How to Use

- Get general endpoints
- Get information associated with specific service requests.
- Get data associated with specific projects and custom_forms.

## Credits

[sterns1](sterns1@github.com)
[EtienneThompson](etiennethompson@github.com)

## License

MIT

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "ua-ilab-tools",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.12",
    "maintainer_email": null,
    "keywords": null,
    "author": "Your Name",
    "author_email": "you@example.com",
    "download_url": "https://files.pythonhosted.org/packages/60/6a/23b98e17a03a6dc2e46e6c4c12d643434fd29ed723d3cf97607c87f40a36/ua_ilab_tools-2.1.4.tar.gz",
    "platform": null,
    "description": "# UA-Ilab-Tools\n\nA set of tools that interact with Ilab's REST database.\n\n## Motivation\n\nWas designed to implement a simple way to interact with Ilab's REST architecture.\n\n## Features\n\n- ilab_api.py contains a class to use simple REST functions such as GET, PUT, POST, and DELETE.\n- ua_ilab_tools.py contains a class to interact with the REST architecture outside of the simple REST verbs, such as:\n    - get_service requests which returns the service requests with a given status.\n    - get_service_cost which returns the cost associated with a given service_id.\n    - get_request_charges which returns all of the charges of the request id.\n    - get_milestones which returns all of the milestones associated with a service request.\n    - get_custom_forms which returns all of the custom forms associated with the request id.\n- extract_project_info which gets the relevant project info from a request.\n- extract_custom_form_info which gets all of the fields of a form.\n\n## Code Example\n\n```python\nfrom ua_ilab_tools import ilab_api, ua_ilab_tools\n\n\napi = ilab_api.IlabApi(core_id, auth_creds)\n# \"token\" contains the Authorization information for headers.\ntools = ua_ilab_tools.IlabTools(core_id, token)\n\nprj_info = ua_ilab_tools.extract_project_info(soup)\nform_info = ua_ilab_tools.extract_custom_form_info(\n    req_id, form_id, form_soup)\n```\n\n## Installation\n\n```bash\npip install ua-ilab-tools\n```\n\n## Tests\nYou will have to create a file named \"ilab_creds.json\" in the format of:\n```json\n    {\n        \"token\": \"Bearer {your token}\",\n        \"core_id\": \"{your core_id}\"\n    }\n\n```bash\npip install --update nose\ncd ./ua_ilab_tools\ncd ./tests\nnosetests test_ilab_tools.py\n```\n\n## How to Use\n\n- Get general endpoints\n- Get information associated with specific service requests.\n- Get data associated with specific projects and custom_forms.\n\n## Credits\n\n[sterns1](sterns1@github.com)\n[EtienneThompson](etiennethompson@github.com)\n\n## License\n\nMIT\n",
    "bugtrack_url": null,
    "license": null,
    "summary": null,
    "version": "2.1.4",
    "project_urls": null,
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "dcad4346cb39e3ef6772fe8e119ec514cc0cb8391cf5184b8e8be862cf315f81",
                "md5": "d5b205db48364eb58d9554870bc276b2",
                "sha256": "9d0e8d7e9bd65d9ffe5151a51f4e0cac4e8c7f494e8e0875be3d4610f7a953fe"
            },
            "downloads": -1,
            "filename": "ua_ilab_tools-2.1.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "d5b205db48364eb58d9554870bc276b2",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.12",
            "size": 31997,
            "upload_time": "2024-06-28T01:04:31",
            "upload_time_iso_8601": "2024-06-28T01:04:31.790142Z",
            "url": "https://files.pythonhosted.org/packages/dc/ad/4346cb39e3ef6772fe8e119ec514cc0cb8391cf5184b8e8be862cf315f81/ua_ilab_tools-2.1.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "606a23b98e17a03a6dc2e46e6c4c12d643434fd29ed723d3cf97607c87f40a36",
                "md5": "e97d9bb264835cda9f948263328bcbf4",
                "sha256": "afae512d10a037713eb19104debdda7ec793edfc90f564ac3fd81ce0e001bd70"
            },
            "downloads": -1,
            "filename": "ua_ilab_tools-2.1.4.tar.gz",
            "has_sig": false,
            "md5_digest": "e97d9bb264835cda9f948263328bcbf4",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.12",
            "size": 23461,
            "upload_time": "2024-06-28T01:04:33",
            "upload_time_iso_8601": "2024-06-28T01:04:33.317324Z",
            "url": "https://files.pythonhosted.org/packages/60/6a/23b98e17a03a6dc2e46e6c4c12d643434fd29ed723d3cf97607c87f40a36/ua_ilab_tools-2.1.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-06-28 01:04:33",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "ua-ilab-tools"
}
        
Elapsed time: 0.31549s