Skip to main content

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

docs

Project details


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 details)

Uploaded Source

Built Distribution

mproto-0.0.2-py3-none-any.whl (3.3 kB view details)

Uploaded Python 3

File details

Details for the file mproto-0.0.2.tar.gz.

File metadata

  • Download URL: mproto-0.0.2.tar.gz
  • Upload date:
  • Size: 2.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

Hashes for mproto-0.0.2.tar.gz
Algorithm Hash digest
SHA256 cdfa8d1ca893bf65101a58a6bd791d831c22db183365c47c93e0005a21d5f06f
MD5 df62cb1ac02f61ede6c66b9e2d71b3c1
BLAKE2b-256 482fc29fda0781eece8aee17c49c23874b7d04645816bf11bcf56198948f29b4

See more details on using hashes here.

File details

Details for the file mproto-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: mproto-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 3.3 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

Hashes for mproto-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b81bfa4595852fe0ef05933523d6d10aa3c0c204d93fb817bb24c97869b285f1
MD5 000424dc1ce5a7db1864d01dffe0bd55
BLAKE2b-256 04227afc7e5f1a56f3095c6ed88c65ce2bc4be50004cbed73d128cfa3f053213

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page