No project description provided
Project description
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
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
pip install ua-ilab-tools
Tests
You will have to create a file named "ilab_creds.json" in the format of:
{
"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
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ua_ilab_tools-2.1.4.tar.gz
(23.5 kB
view details)
Built Distribution
File details
Details for the file ua_ilab_tools-2.1.4.tar.gz
.
File metadata
- Download URL: ua_ilab_tools-2.1.4.tar.gz
- Upload date:
- Size: 23.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.4 Linux/6.5.0-41-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | afae512d10a037713eb19104debdda7ec793edfc90f564ac3fd81ce0e001bd70 |
|
MD5 | e97d9bb264835cda9f948263328bcbf4 |
|
BLAKE2b-256 | 606a23b98e17a03a6dc2e46e6c4c12d643434fd29ed723d3cf97607c87f40a36 |
File details
Details for the file ua_ilab_tools-2.1.4-py3-none-any.whl
.
File metadata
- Download URL: ua_ilab_tools-2.1.4-py3-none-any.whl
- Upload date:
- Size: 32.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.4 Linux/6.5.0-41-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9d0e8d7e9bd65d9ffe5151a51f4e0cac4e8c7f494e8e0875be3d4610f7a953fe |
|
MD5 | d5b205db48364eb58d9554870bc276b2 |
|
BLAKE2b-256 | dcad4346cb39e3ef6772fe8e119ec514cc0cb8391cf5184b8e8be862cf315f81 |