api

using all coordinate points in dataset instead of one coordinate point in Nasa-Power API Command

using all coordinate points in dataset instead of one coordinate point in Nasa-Power API Command Question: API: https://power.larc.nasa.gov/docs/tutorials/service-data-request/api/ This API provides some parameters for a coordinate (latitute and longitute) point. I want to run this api code for all the latitute and longitute ​​in my dataset instead of one latitute and longitute.Latitude and longitude data …

Total answers: 1

GraphQL API Querying

GraphQL API Querying Question: I am new to API’s and am struggling to query it. I managed to get the below to work, but that is all. query = """{ player(slug:"nico-schlotterbeck") { firstName lastName position cardPositions id slug activeClub { name } age so5Scores(last:5) { score } } }""" The below does not seem to …

Total answers: 1

Filter by time in DRF

Filter by time in DRF Question: I have an api with an end day field (ad end time), in the model, this is a simple datetime field: end_date = DateTimeField(null=True, blank=True) in my view there are several types of filtering for ads, but I need some checkbox that will compare the current date and time …

Total answers: 1

How do I set the range to change automatically in Google Sheets API?

How do I set the range to change automatically in Google Sheets API? Question: I’m trying to use the Google sheets API to input data to the next blank cell. For example if A1 is blank, I want the API to insert the given info into A1. The next time info is given to the …

Total answers: 1

Python script called in a .NET API in docker, dependencies not found

Python script called in a .NET API in docker, dependencies not found Question: Hello I have a project with the following folder structure (abstracted): . └── root/ ├── ExRate_Service/ │ ├── MyOwnPythonScripts… │ └── Program.py ├── ExRate_API/ │ ├── ExRate_API/ │ │ ├── Classes… │ │ ├── ExRate_API.csproj │ │ └── Program.cs │ ├── ExRate_API.Tests/ …

Total answers: 1

passing a csv through an API

passing a csv through an API Question: I’m trying to pass a csv through an api like this: The csv is as follow: field_1, field_2, field_3 1, 3, 7 the push code is this: with open("sample_csv.csv") as f: data = {"file": f} print(data) headers = { "Content-Type": "text/csv", "File-Type": "POS", "File-Key": "somekey", } r = …

Total answers: 2

How do you make faster A.P.I calls using multithreading without using requests in Python?

How do you make faster A.P.I calls using multithreading without using requests in Python? Question: I’m trying to receive historical stock data for every company in the S&P 500. The problem is that it is taking a really longtime to get the data. from ApiStuff import ApiStuff import fundamentalanalysis as fa import pickle tickers = …

Total answers: 2

Sorting through API data, says list indices must be integers or slices, not strings

Sorting through API data, says list indices must be integers or slices, not strings Question: Trying to sort through api data. But getting an error "TypeError: list indices must be integers or slices, not str" When trying to print certain values of certain keys from a dict. It says the container is a dict, but …

Total answers: 1

POST request to a nested query – python API

POST request to a nested query – python API Question: So i’ve began to create a comment section for users to leave comments under posted events. I’m now trying to set up replies to comments under an event and am having issues. With the code I have, a new link is being generated but it …

Total answers: 1