Giter VIP home page Giter VIP logo

https_shim's Introduction

https_shim

Allows setting the SSL protocol suite (ssl.PROTOCOL_SSLv3, etc.) for a subclass of httplib.HTTPSConnection (Python 2.6/2.7). Borrows from http://stackoverflow.com/a/18671399/306262 but uses subclassing instead of monkey- patching.

Example Usage

import https_shim
import ssl

conn = https_shim.HTTPSConnection('httpbin.org', '443', ssl_version=ssl.PROTOCOL_SSLv3)
conn.request('GET', '/get?foo=bar')
...

or

conn.https_shim.HTTPSConnection('httpbin.org', '443')
conn.connect(ssl_version=ssl.PROTOCOL_SSLv3)
...

See the tests if you want a few examples.

Testing

Note that this has only really been tested in Python 2.6 so far.

You can run the tests with

nosetests https_shim

If you pip install with the extra "test_support", the packages needed for running the tests will alsoo be installed (in particular, nose), e.g.,

pip install -e <path-to-https-shim>[test_support]

Releases

  • 0.10.1 (2015/02/26)
    • adding support for Python 2.7
      • this library may not be necessary as of Python 2.7.9
      • tests require Python >= 2.7
  • 0.10.0 (2013/12/19)
    • initial release with support for Python <= 2.6

https_shim's People

Contributors

ut-adamc avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.