Questions tagged [python-requests]
USE ONLY FOR THE PYTHON REQUESTS LIBRARY. Requests is a full-featured Python HTTP library with an easy-to-use, logical API.
                54 questions
            
            
            
                4
            
            votes
        
        
            
                4
            
            answers
        
        
            
                164
            
            views
        
        
            
            
        Alerts by phone calls for location-relevant Israel Home Front Command alerts
                    This code checks the Israeli Home Front Command API, and when there is a new alert for specific areas it sends a request to a Django app which I am hosting in the cloud. The Django app then sends a ...
                
            
       
        
            
                4
            
            votes
        
        
            
                2
            
            answers
        
        
            
                130
            
            views
        
        
            
            
        HTTP response code handling from ADP workforce now API and parse resulting JSON
                    Is there a way to improve this method that interacts with ADP's workforce-now API?
200: capture and parse JSON
204: return a None
400 and 403: return specific text from JSON
others: throw an ...
                
            
       
        
            
                1
            
            vote
        
        
            
                2
            
            answers
        
        
            
                174
            
            views
        
        
            
            
        Mapping an API's setting IDs to setting names with class methods, enabling clearer utilization
                    I'm trying to access an API using the requests library in as clean a manner as possible. The API is accessing various settings of various devices. I'd like to keep my code as readable and ...
                
            
       
        
            
                4
            
            votes
        
        
            
                2
            
            answers
        
        
            
                976
            
            views
        
        
            
            
            
        Python network manager class using exec()
                    I wanted to make a small self-integrated API for my PyQt5 application.
This class is a tiny chunk of the whole project:
...
                
            
       
        
            
                1
            
            vote
        
        
            
                0
            
            answers
        
        
            
                2k
            
            views
        
        
            
        Streaming Parquet file in chunks for write operation
                    I am taking beginner steps into DE and was tinkering with writing an ingestion script which does the following tasks:
Reads data from a source (in this case a remote parquet file)
Writes it to local ...
                
            
       
        
            
                3
            
            votes
        
        
            
                1
            
            answer
        
        
            
                81
            
            views
        
        
            
        URL link scraper and analyser
                    I recently wrote a testing tool (called plink) for retrieving all the links from a website (and then retreiving links from the linked pages, and so on).
Essentially,...
                
            
       
        
            
                4
            
            votes
        
        
            
                1
            
            answer
        
        
            
                157
            
            views
        
        
            
            
            
        A simple stock exchange app
                    I've struggled to make a small stock project for almost 5 hours (biggest one so far).
The project is simple: I've chosen a stock (Tesla in my case) and I've decided to get a message on my phone with ...
                
            
       
        
            
                1
            
            vote
        
        
            
                1
            
            answer
        
        
            
                231
            
            views
        
        
            
            
            
        Excluding attributes entirely vs. setting them to None
                    I am making a program that parses profiles from a website. Some profiles are "public" and others are "private" with limited information. Public profiles contain a lot more data and ...
                
            
       
        
            
                5
            
            votes
        
        
            
                3
            
            answers
        
        
            
                2k
            
            views
        
        
            
            
        Python: Handling different HTTP status codes using the requests library
                    I am using the requests library to make requests to an API. However, I am not sure how to handle different status codes. I am particularly interested in handling ...
                
            
       
        
            
                1
            
            vote
        
        
            
                0
            
            answers
        
        
            
                501
            
            views
        
        
            
        Calling PagerDuty REST API to recursively fetch oncall info for a team
                    I am a beginnner and have put up a code that talks to pagerduty API and then it fethces oncall info for a team (get team id, get escalation policy id, then finally get on call info). response is ...
                
            
       
        
            
                2
            
            votes
        
        
            
                1
            
            answer
        
        
            
                111
            
            views
        
        
            
            
            
        Create URL's, then download and print each RSS feed text
                    Looking for a more efficient way of achieving this. In particular the combine_all_rss_lists so I don't need all those params. Feedparser module doesn't accept lists which is why I've had to initially ...
                
            
       
        
            
                3
            
            votes
        
        
            
                1
            
            answer
        
        
            
                70
            
            views
        
        
            
            
            
        request data and print results
                    On last test, the below code takes approximately 10 seconds to download then print the data from 10 url's. I wish to speed this up as much as possible as later on I plan to expand this further and use ...
                
            
       
        
            
                2
            
            votes
        
        
            
                1
            
            answer
        
        
            
                182
            
            views
        
        
            
            
            
        Single API call with authentication in Python
                    I've written a small script for Zabbix to check the status of our ESXi Hosts. The request needs to be authenticated, so I went for this process:
Read auth token from file
If file does not exist, ...
                
            
       
        
            
                2
            
            votes
        
        
            
                1
            
            answer
        
        
            
                334
            
            views
        
        
            
            
            
        python: requests large.zip -> unzip -> fix -> filter ->gunzip
                    I wrote a function to download a large zipfile 5-7gb from Iowa State MRMS data archive.
The zip files appear to be malformed and results in a BadZipFileError hence ...
                
            
       
        
            
                2
            
            votes
        
        
            
                1
            
            answer
        
        
            
                154
            
            views
        
        
            
            
        Monitoring webpages to be notified
                    I have been writing a monitoring script where I check for whenever there is changes on a webpage. When a change has happend I want to be notified by printing out that there is a difference.
I have ...