Skip to content

Instantly share code, notes, and snippets.

View TrevisGordan's full-sized avatar
💜
Focusing

Gordan Trevis TrevisGordan

💜
Focusing
View GitHub Profile
#!/usr/bin/env python
#-*- coding:utf-8 -*-
import BaseHTTPServer
import sys
import time
import urlparse
import json
@TrevisGordan
TrevisGordan / curl2requests.py
Created November 26, 2020 12:48 — forked from rgov/curl2requests.py
Convert a CURL command line to the equivalent Python Requests invocation
#!/usr/bin/env python
import argparse
import pprint
import shlex
import urllib
# Lex the curl command into its constituent arguments
example = '''
curl 'http://seethroughny.net/tools/required/reports/payroll?action=get' \