Skip to content

ninjamar/mproto

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

docs usefull stuff

About

Python library for making custom protocols

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages