Skip to content
Advertisement

Tag: api

Somehow my Fask API returns me old values

In debug: I run ng serve on my angular project, make the request and receive the updated values In production I update de files of the API and the angular project, make the request and receive old data. If I open the API link in a new tab I get the updated values, even the files in the server are

A class with a mutable variable. API token

I am trying to create an API client, but the problem is that the token changes every hour. I want to create a class that contains a “token” variable that should change every hour. The idea is to get a token when first run the script, create this object and use it. I have a function that successfully receives a

HTTPS POST to query FastAPI using python requests

I am trying to serve a Neural Network using FastAPI. The manual site http://localhost:8000/docs#/default/predict_predict_post works fine and translates into the following curl command: which also works. When I try to query the API using python requests: I only get the “422 Unprocessable Entity” Errors. Where am I going wrong here? Answer You provide a data argument to requests.post, which does

Cant decode HTTP Response to JSON (Python3)

I am running a series of API tests and this one is giving me an error. As far as I can tell response.read() converts the HTTP response into binary and then decode() converts that binary into a string but it’s an empty string. When I copy paste the binary string into Python3 (b'{“error”: {“code”: “INVALID_TOKEN”, “description”: “”}}’) and issue a

Installing quickfix using pip keeps running forever

Goal: I want to be able to use quickfix Problem: When running pip install quickfix all I get is the following N.B: I waited for the wheel building for around 15 minutes I don’t think this should take that much right? Context: I am using docker and I have the python3.7 image Tried to fix it: downloaded the quickfix-1.15.1.tar.gz file

Advertisement