Skip to main content

Tools that interact with Agilent's iLab REST architecture.

Project description


Provides basic REST API Implementation for GET, PUT, and POST, and DELETE.


Was designed to remove similarities among REST API implementations by creating a generic REST API that classes can be extended and override for specific needs.


  • GET - Implementation of GET which can single GET, batch GET, single GET with query, and GET every page on a paginated endpoint.
    • Batch gets with queries are unavailable as there is no way to give each get a unique query. Because of this the feature was not included.
  • PUT - Basic implementation of PUT which puts the payload to the given endpoint.
  • POST - Basic implementation of POST which posts the payload to the given endpoint.
  • DELETE - Basic implementation of DELETE which deletes the given endpoint.

Code Example

from ua_generic_rest_api import GenericRestApi

class SpecificRestApi(GenericRestApi):
    # Replace '...' with any other initialization arguments.
    def __init__(self, ...):
        # host, header_info, page_query, and page_tag are site specific.
        # Set them to your own values.
        super().__init__(host, header_info, page_query, page_tag=page_tag)

    # Can override GET, PUT, POST, or DELETE here.
  • host - The base url for the endpoint that is to be gotten.
  • header_info - Any information to be added to a request header such as Authorization or Content-Type.
    • Should be in the form of a dictionary, such as {"Authorization": None, "Content-Type": "text/xml"}.
  • page_query - The tag to use when querying for specific pages.
    • For example, for sites queried with the tag "?page=", page_query should be "page".
  • page_tag - The tag name of paginated endpoints to search for when getting data.
    • For sites paginated with the tag "page", page_tag should be "page".


pip install ua-generic-rest-api
pip install -r requirements.txt


  • Tests are only necessary when wanting to make changes to the module.
pip install --update node
cd ./ua_generic_rest_api
cd ./tests


sterns1 EtienneThompson



Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for ua-generic-rest-api, version 2.0.5
Filename, size File type Python version Upload date Hashes
Filename, size ua_generic_rest_api-2.0.5-py3-none-any.whl (5.7 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size ua_generic_rest_api-2.0.5.tar.gz (4.6 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page