Make custom protocols
Project description
Description
mproto is a python package for making custom protocols
Installation
pip
pip install mproto
Usage
import mproto
import urllib.request as urlreq
class MyCustomProtocol(mproto.BaseProtoHandler)
def protocolname_open(self,req): #name must be protocol name + _open
# do stuff with req
return req.get_full_url()
mproto.install(MyCustomProtocol)
print(urlreq.urlopen('protocolname://abc')) #should print "protocolname://abc"
Other
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
mproto-0.0.2.tar.gz
(2.1 kB
view hashes)
Built Distribution
mproto-0.0.2-py3-none-any.whl
(3.3 kB
view hashes)