<commit_before>Requests: The Simple (e.g. usable) HTTP Module
==============================================

::

	:::::::::  ::::::::::  ::::::::   :::    ::: ::::::::::  ::::::::  :::::::::::  ::::::::  
	:+:    :+: :+:        :+:    :+:  :+:    :+: :+:        :+:    :+:     :+:     :+:    :+: 
	+:+    +:+ +:+        +:+    +:+  +:+    +:+ +:+        +:+            +:+     +:+        
	+#++:++#:  +#++:++#   +#+    +:+  +#+    +:+ +#++:++#   +#++:++#++     +#+     +#++:++#++ 
	+#+    +#+ +#+        +#+  # +#+  +#+    +#+ +#+               +#+     +#+            +#+ 
	#+#    #+# #+#        #+#   +#+   #+#    #+# #+#        #+#    #+#     #+#     #+#    #+# 
	###    ### ##########  ###### ###  ########  ##########  ########      ###      ########  

                                                              


Overview
--------

Existing Python modules for dealing HTTP requests are insane. I have to look up *everything* that I want to do. Most of my worst Python experiences (yes, even worse than Logging) are a result of the various built-in HTTP libraries. 

But this one's different. This one's going to be awesome. And simple.

Really simple.

Usage
-----

Let's do this. ::


	>>> import requests
	>>> request.get(url, params={}, headers={} auth=None)
	>>> request.put(url, params={}, headers={}, auth=None)
	>>> request.post(url, params={}, headers={}, auth=None)
	>>> request.delete(url, params={}, headers={}, auth=None)
	
	
	>>> r = request.Request()
	
	>>> r.url = 'httep://someurl.com/'
	>>> r.add_header(('key', 'value'))
	
	>>> r.method = 'GET'
	
	>>> r.send()
	True

	>>> dict(r)
	{
		'headers': {
			'key': 'value',
		}, 
		'method': 'GET',
		'response': {
			'content': <sensored-content>,
			'status_code': 200,
			'headers': {
				'x-runtime': '210ms',
				'server': 'Apache 2.1',
				'Content-Type': 'text/html; charset=utf-8'
			}
		}
	}
	
Access stuff. ::

	>>> r = request.get('https://github.com')
	>>> r.status_code()<commit_msg>readme update<commit_after>Requests: The Simple (e.g. usable) HTTP Module
==============================================

::

	:::::::::  ::::::::::  ::::::::   :::    ::: ::::::::::  ::::::::  :::::::::::  ::::::::  
	:+:    :+: :+:        :+:    :+:  :+:    :+: :+:        :+:    :+:     :+:     :+:    :+: 
	+:+    +:+ +:+        +:+    +:+  +:+    +:+ +:+        +:+            +:+     +:+        
	+#++:++#:  +#++:++#   +#+    +:+  +#+    +:+ +#++:++#   +#++:++#++     +#+     +#++:++#++ 
	+#+    +#+ +#+        +#+  # +#+  +#+    +#+ +#+               +#+     +#+            +#+ 
	#+#    #+# #+#        #+#   +#+   #+#    #+# #+#        #+#    #+#     #+#     #+#    #+# 
	###    ### ##########  ###### ###  ########  ##########  ########      ###      ########  

                                                              


Overview
--------

Existing Python modules for dealing HTTP requests are insane. I have to look up *everything* that I want to do. Most of my worst Python experiences (yes, even worse than Logging) are a result of the various built-in HTTP libraries. 

But this one's different. This one's going to be awesome. And simple.

Really simple.


Usage
-----

Let's do this. ::

	>>> import requests
	
	>>> request.get(url, params={}, headers={} auth=None)
	<response object>
	
	>>> request.put(url, params={}, headers={}, auth=None)
	<response object>
	
	>>> request.post(url, params={}, headers={}, auth=None)
	<response object>
	
	>>> request.delete(url, params={}, headers={}, auth=None)
	<response object>
	
	
	>>> r = request.Request()
	
	>>> r.url = 'http://someurl.com/'
	>>> r.add_header(('key', 'value'))
	
	>>> r.method = 'GET'
	
	>>> r.send()
	True

	>>> dict(r)
	{
		'headers': {
			'key': 'value',
		}, 
		'method': 'GET',
		'response': {
			'content': <sensored-content>,
			'status_code': 200,
			'headers': {
				'x-runtime': '210ms',
				'server': 'Apache 2.1',
				'Content-Type': 'text/html; charset=utf-8'
			}
		}
	}
	
Access stuff. ::

	>>> r = request.get('https://github.com')
	>>> r.response.status_code()
{'fraction_non_alphanumeric': 0.31389578163771714, 'fraction_numerical': 0.004466501240694789, 'mean_word_length': 2.0514761544284634, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 87, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5465609', 'n_tokens_mistral': 1617, 'n_tokens_neox': 1454, 'n_words': 246}