Skip to content
Advertisement

Tag: api

Set Optional params in PUT method using fastAPI/mongodb

I am trying to set Optional some params in a PUT method from my API. Using fastAPI and mongodb I’ve build a simple API to insert students and delete the ones, now I am looking to allow me update the entries but not mandatory “params”. I’ve checked this Fastapi: put method and looks like something I am looking for mongodb.

how to direct python to fetch string in a different file

how do i change the “keyword” in parameter (‘pegasus’) to redirect to a separate txt file. so later I just write whatever items I want to scrape in the file txt. Example of Pegasus, Phoenix, Lucid then the keyword parameter is directed to a different txt, inside the txt it contains a list of those objects and once it has

How do I provide my access_token with python

https://i.stack.imgur.com/Iqrsw.png Is there a way to do this with requests? Answer According to this https://www.mercadopago.com.ar/developers/en/reference/payments/_payments_id/get you need to provide a header with your access token you get through OAUTH. And then once you get the access token, you can do which will return you a json result

How to handle an error and make it a result

I’m checking whether the TikTok live video is (live now) or (ended). Since it is hard to deal with TikTok a bit, I will make a sign and rely on it. The following code will take the TikToker username. If there is a live video running, it will show the viewers count, so we decide that it is (live now).

I cannot parse this xml file in python

I am trying to create an API connection and response is looking like below. I need to parse this data and turn it into a pd dataframe and/or create loop to find specific information belong to tags. Below is the code i try to run but it returns with empty list, and it looks not iterable. Also it is not

What does “size” parameter in Kucoin futures API refer to?

Kucoin Futures API documentation for placing a limit order ( https://docs.kucoin.com/futures/#place-an-order ) has a param called “size” with type Integer. The description is given as “Order size. Must be a positive number”. A limit order to buy “CELRUSDTM” with param size = 1 results in an order placed to buy 10 CELR. A limit order to buy “ETHUSDTM” with param

Advertisement