Skip to main content

hostport

https://travis-ci.org/zzzsochi/hostport.svg?branch=master https://coveralls.io/repos/github/zzzsochi/hostport/badge.svg?branch=master

Simple parser strings like as grpchost:50051.

Installation

$ pip install hostport

Usage

>>> import hostport
>>> hostport.parse('host:30')
HostPort(host='host', port=30)
>>> hostport.parse('host:30').host
'host'
>>> hostport.parse('host:30').port
30
>>> hostport.parse('[fe80::95f3]:50051')
HostPort(host='[fe80::95f3]', port=50051)
>>> hostport.parse('[fe80::95f3]')
HostPort(host='[fe80::95f3]', port=None)
>>> hostport.parse('host', default_port=30)
HostPort(host='host', port=30)
>>> hostport.parse('30', default_host='host')
HostPort(host='host', port=30)
>>> hostport.parse('host.production:50051', default_host='host', default_port=30)
HostPort(host='host.production', port=50051)
>>> hostport.parse('host.production')
HostPort(host='host.production', port=None)
>>> hostport.parse('50051')
HostPort(host=None, port=50051)

It’s all.

Metadata

Release files for hostport 1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hostport 1.1
File Size Uploaded Provenance Actions
hostport-1.1.tar.gz 1.8 kB Without provenance Details for hostport-1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for hostport 1.1
File Interpreter ABI Platform Actions
hostport-1.1-py3-none-any.whl Python 3 none any Details for hostport-1.1-py3-none-any.whl

Total release size: 3.9 kB

Release files / hostport-1.1.tar.gz

Download URL hostport-1.1.tar.gz
Size 1.8 kB
Tags Source
SHA-256 checksum
How to use checksums
0ceae7fa42430f93ac23ed0eb35df2b3263c276c13f946ab7698ce67f6850de6
BLAKE2b-256 checksum
How to use checksums
7e54f12fc2485b78e236e5687f3de1314882a39039b1bde684fd6bfb26f12b88
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Python-urllib/3.7

Release files / hostport-1.1-py3-none-any.whl

Download URL hostport-1.1-py3-none-any.whl
Size 2.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e00ada89fcb86f7128d23044fd6466209e756a073a06674e57b076251be5d676
BLAKE2b-256 checksum
How to use checksums
df7ec2bf232eff2cfe320bdca3d195657ba8f3533865620750ac5a858525a2e2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Python-urllib/3.7

Security for hostport 1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page