Skip to main content
Join the official 2020 Python Developers SurveyStart the survey!

Python SDK for integrating APIs published via Yappes platform

Project description

ypconnector-python

ypconnector-python is a Python SDK used for integrating the Yappes Published APIs with your application. SDK is installed via npm.

ypconnector-python provides individual action methods and a common method for making API requests.Currently it supports GET,POST,POST,DELETE and PATCH.

Install:

pip install ypconnector

Usage:

from yplib.ypconnector import YappesLibrary

//Yappes-Token obtained from yappes portal
yappesToken = "YOUR X-YAPPES-KEY";
ypObj = YappesLibrary(token)

//Data needed to call the library methods - individual Actions(GET/POST/PUT)
url = "http://localhost:8081/getdata";
data = {
 "headers": {
  "Content-Type":"application/json"
 },
 "queryparams": {
  "queryParam1" : "value1"
 },
 "payload": {
  "key":"value"
 }
}

//GET Request with empty payload: {}
responseData = ypObj.get(url, data)
print(responseData["body"])

//POST Request
responseData = ypObj.post(url, data)
print(responseData["body"])

//PUT Request
responseData = ypObj.put(url, data)
print(responseData["body"])

//Common Method
//Data needed to call the library methods - common action (call)
url = "http://localhost:8081/getdata";
data = {
 "method":"get"
 "headers": {
  "Content-Type":"application/json"
 },
 "queryparams": {
  "queryParam1" : "value1"
 },
 "payload": {
  "key":"value"
 }
}

responseData = ypObj.call(url, data)
print(responseData["body"])

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 ypconnector, version 1.1.2
Filename, size File type Python version Upload date Hashes
Filename, size ypconnector-1.1.2-py3-none-any.whl (2.9 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size ypconnector-1.1.2.tar.gz (2.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