Make custom protocols in python
Reason this release was yanked:
import fails
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"
Usefull informations
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.1.tar.gz
(1.1 kB
view details)
Built Distribution
File details
Details for the file mproto-0.0.1.tar.gz
.
File metadata
- Download URL: mproto-0.0.1.tar.gz
- Upload date:
- Size: 1.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.10.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.8.0 tqdm/4.60.0 CPython/3.8.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 48ec575e764495e245af72018787e84423d504702174a5675a4c1b5325aea61c |
|
MD5 | ba48abeeafa07c839cddc335ee26a484 |
|
BLAKE2b-256 | 139d8ccf25ebc8da9b4c1a83e0db0d782e3e2b062e66d40ccbc04ec4ec9eba88 |
File details
Details for the file mproto-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: mproto-0.0.1-py3-none-any.whl
- Upload date:
- Size: 1.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.10.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.8.0 tqdm/4.60.0 CPython/3.8.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6cfe83ca266bdddae60bc559fc5f357f836ba7543bd77110133a267a56cbc0c4 |
|
MD5 | 67312a1f4df957f28d981232915dc695 |
|
BLAKE2b-256 | d5a59f0732502ccfddffadcbb7d766bb00c65d94bb756d267b39368b51bc6867 |