uurest 1.0.25
uuRest library and its two main functions "call" and "fetch" are designed to allow users to rapidly scrape/automate web applications designed and developed by Unicorn Systems (Unicorn.com).
License: MIT
Requires Python: >=3.8
Keywords: python, uuRest, Unicorn Systems, UAF, Unicorn Application Framework


        # uurest
        Library that allows developers to easily integrate their application(s) with Unicorn Systems solutions and products using REST API.
        
        ## !!!!! DEPRECATED. DO NOT USE THIS LIBRARY !!!!!
        
        ![Usage](https://raw.githubusercontent.com/jaromirsivic/uuRest/refs/heads/main/logo.png)
        
        ## How To Use the Library
        ```python
        from uurest import *
        
        # fetch function behavior can be setup globally or by every "fetch" call
        fetch_global_setup(raise_exception_on_error=False, timeout=120, verbose=True)
        
        response = fetch("https://www.websitewhichdoesnotexist.net") # fetch non existing web page
        # response.json = {"__error__": "Unknown response type received when calling \"https://www.websitewhichdoesnotexist.net\" ...
        response = fetch("http://devserver.com/tsMetadataTransfer/get") # fetch data without authorization / without sending a token
        # response.json = {"__error__": "Http/Https error code \"403\" occured. Cannot process text data ...
        response = fetch("https://upload.wikimedia.org/wikipedia/commons/c/cd/Google_Logo_%281998%29.png") # fetch binary file
        # response.json = {"__base64__": "iVBORw0KGgoAAAANSUhEUgAAC0AAAAMWEAYAAAAy59uuAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQ ...
        response = fetch("https://upload.wikimedia.org/wikipedia/commons/2/2f/Google_2015_logo.svg") # fetch svg, html, css, js,  ...
        # response.json = {"__text__": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<svg xmlns=\"http://www.w3  ...
        
        # open web browser (Chrome, Edge). On the keyboard press F12 to open "DevTools". Click on the "Network" tab in the menu
        # Select the request in the list. Right click on the selected item. In the popup menu click on the "Copy" -> "Copy as fetch"
        # Paste the copied command from the clipboard directly into the source code. It should look like the code below.
        response = fetch("https://jsonplaceholder.typicode.com/todos/1", {
            "headers": {
                "accept": "*/*",
            },
            "referrer": "https://jsonplaceholder.typicode.com/",
            "body": null,
            "method": "GET"
        })
        # response.json = {"userId": 1, "id": 1, "title": "delectus aut autem", "completed": false}
        ```
        
        You can play with the response using following inbuild methods
        ```python
        from uurest import *
        
        response = fetch("https://jsonplaceholder.typicode.com/todos/1", {
            "headers": {
                "accept": "*/*",
            },
            "referrer": "https://jsonplaceholder.typicode.com/",
            "body": null,
            "method": "GET"
        })
        # prints formatted json
        print(response) # {"userId": 1, "id": 1, "title": "delectus aut autem", "completed": false}
        print(response.json["title"])  # delectus aut autem
        json_object = response.json.parse() # transforms dictionary into the object
        if json_object.completed:
            print("Successfully competed")
        else:
            print("Not completed")
        print(str(response.http_status_code))
        print(response.content_type)
        response.save_json("./test.json")
        response.save_raw_content("./raw_content.raw")
        
        
        ```
        
        Check out: https://www.youtube.com/