Skip to main content

Execute API method by HTTP

Project description

Eugenia's http executor

Method to call http API

Installation

Use pip:

pip install ehttp-executor

Please use Python 3.8 and above

How to use

Create the input dictionary, then invoke the method with these parameters:

  • HTTP URL
  • Process name
  • Input dictionary

Example:

from ehttp_executor.ehttp_caller import call_python_api

input_data = {
"status": "Loaded",
"statusCode": 404,
"testDate": "16/07/2030",
"abruptEnd": True,
"logs": [
    "Rodrigo logged in",
    "Henry logged in",
    "Rodrigo logged out",
    "Henry logged out"
],
"developers": [
    {
    "name": "Rodrigo",
    "age": 43,
    "logins": [
        {
        "loginInfo": "Login saturday 5AM"
        },
        {
        "loginInfo": "Logout saturday 8AM"
        }
    ]
    },
    {
    "name": "Henry",
    "age": 46,
    "logins": [
        {
        "loginInfo": "Login thursday 9AM"
        },
        {
        "loginInfo": "Logout monday 11AM"
        }
    ]
    }
]
}
json_output = call_python_api("http://localhost:5000/", "PythonBBasic261020211724", input_data)
print (type(json_output))
print (json_output)

Project details


Download files

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

Source Distribution

ehttp-executor-1.0.0.tar.gz (2.1 kB view details)

Uploaded Source

File details

Details for the file ehttp-executor-1.0.0.tar.gz.

File metadata

  • Download URL: ehttp-executor-1.0.0.tar.gz
  • Upload date:
  • Size: 2.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.3

File hashes

Hashes for ehttp-executor-1.0.0.tar.gz
Algorithm Hash digest
SHA256 9ed7aab0e54e954cc97f61067ccd7cc9a0ec5afb965bda2dd83384761247f2ee
MD5 4e06c7c0b153a3f1a03ad59f79e0444e
BLAKE2b-256 4660108ef693e9505e59ac39a3bd59961a0e0dc3132fdc35a559d3613d27eddf

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page