api

Python: Convert dataframe into a payload using custom-made SOAP-Envelope/xml format

Convert dataframe into a payload using custom-made SOAP-Envelope? Question: I have a Python project where I am supposed to convert my dataframe into a payload for POST API hit (on a SAP server). This payload must be in a particular format/SOAP Envelope which I received using the WSDL URL. I need help in framing the …

Total answers: 1

How to handle user uploaded files in a fastapi app [fastapi]

How to handle user uploaded Image files in a FastAPI app? Question: I am writing an API for an AI model. This AI model gets images from a folder named input, does the process on the image or images and outputs the result in another folder named output in CSV format, which is then converted …

Total answers: 1

How to obtain substring of big string text in Python?

How to obtain substring of big string text in Python? Question: I have the following format of text files, which are outputs of an API: TASK [Do this] OK: { "changed":false, "msg": "check ok" } TASK [Do that] OK TASK [Do x] Fatal: "Error message x" TASK [Do y] OK TASK [Do z] Fatal: "Stopped …

Total answers: 2

Update table in Confluence through Python

Update table in Confluence through Python Question: I created a Confluence page some time ago, where there is one table. Periodically I need to add additional row and to put some text there. I would like to automate it. Besides, in the last column I need to upload some files. I wrote a code that …

Total answers: 1

Fast API getting an error while post api in my bills model

Fast API getting an error while post api in my bills model Question: So, i am using fast api and I am trying to add added_on in my taxbill schema here is my bill model class TaxBillModel(Base): __tablename__ = "taxbill" id = Column(Integer, primary_key=True, index=True) bill_no = Column(Integer, index=True) amount = Column(Integer, nullable=False) about = …

Total answers: 1

SOAP, How to get data from secound service

SOAP, How to get data from secound service Question: Im try to take data from API with SOAP. Everything works, but i have 2 Services on that API. First one is for test, and it works. But data its ‘hiden’ on secound. How can i get there? I use zeep. Asked By: Adam Fatyga || …

Total answers: 1

What's the fastest way to turn json results from an API into a dataframe?

What's the fastest way to turn json results from an API into a dataframe? Question: Below is an example of sports betting app I’m working on. games.json()[‘data’] – contains the game id for each sport event for that day. The API then returns the odds for that specific game. What’s the fastest option to take …

Total answers: 1

why is Python requests not working as intended

why is Python requests not working as intended Question: I want to get some info from an JSON RPC API endpoint. the equivalent curl command is this: curl ‘https://api.mainnet-beta.solana.com’ -X POST -H "Content-Type: application/json" -d ‘ { "jsonrpc": "2.0", "id": 1, "method": "getTokenAccountBalance", "params": [ "FYj69uxq52dee8AyZbRyNgkGbhJdrPT6eqMhosJwaTXB" ] } ‘ it works and response is: {"jsonrpc":"2.0","result":{"context":{"apiVersion":"1.13.5","slot":176510490},"value":{"amount":"68662508944","decimals":5,"uiAmount":686625.08944,"uiAmountString":"686625.08944"}},"id":1} …

Total answers: 1

webscrapping with api in python from url

webscrapping with api in python from url Question: I am currently working on a project and want with API or webscrapping get the table from a website. I gave the following code: import requests import pandas as pd import numpy as np url = ‘https://worldpopulationreview.com/state-rankings/circumcision-rates-by-state’ resp = requests.get(url) tables = pd.read_html(resp.text) all_df = pd.concat(tables) data= …

Total answers: 2