{"id":17543131,"url":"https://github.com/zzzsochi/hostport","last_synced_at":"2025-03-29T05:16:33.881Z","repository":{"id":62569469,"uuid":"153324385","full_name":"zzzsochi/hostport","owner":"zzzsochi","description":"Simple parser strings like as \"grpchost:50051\".","archived":false,"fork":false,"pushed_at":"2018-11-04T07:54:08.000Z","size":3,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-16T09:44:20.138Z","etag":null,"topics":["hostport","network","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zzzsochi.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-10-16T17:13:16.000Z","updated_at":"2018-11-04T07:54:09.000Z","dependencies_parsed_at":"2022-11-03T17:15:32.607Z","dependency_job_id":null,"html_url":"https://github.com/zzzsochi/hostport","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zzzsochi%2Fhostport","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zzzsochi%2Fhostport/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zzzsochi%2Fhostport/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zzzsochi%2Fhostport/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zzzsochi","download_url":"https://codeload.github.com/zzzsochi/hostport/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246140591,"owners_count":20729802,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hostport","network","python"],"created_at":"2024-10-21T00:22:58.739Z","updated_at":"2025-03-29T05:16:33.848Z","avatar_url":"https://github.com/zzzsochi.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"========\nhostport\n========\n\n.. image:: https://travis-ci.org/zzzsochi/hostport.svg?branch=master\n    :target: https://travis-ci.org/zzzsochi/hostport\n\n.. image:: https://coveralls.io/repos/github/zzzsochi/hostport/badge.svg?branch=master\n    :target: https://coveralls.io/github/zzzsochi/hostport?branch=master\n\n\nSimple parser strings like as ``grpchost:50051``.\n\n\nInstallation\n============\n\n.. code:: bash\n\n    $ pip install hostport\n\n\nUsage\n=====\n\n.. code:: python\n\n    \u003e\u003e\u003e import hostport\n    \u003e\u003e\u003e hostport.parse('host:30')\n    HostPort(host='host', port=30)\n    \u003e\u003e\u003e hostport.parse('host:30').host\n    'host'\n    \u003e\u003e\u003e hostport.parse('host:30').port\n    30\n    \u003e\u003e\u003e hostport.parse('[fe80::95f3]:50051')\n    HostPort(host='[fe80::95f3]', port=50051)\n    \u003e\u003e\u003e hostport.parse('[fe80::95f3]')\n    HostPort(host='[fe80::95f3]', port=None)\n    \u003e\u003e\u003e hostport.parse('host', default_port=30)\n    HostPort(host='host', port=30)\n    \u003e\u003e\u003e hostport.parse('30', default_host='host')\n    HostPort(host='host', port=30)\n    \u003e\u003e\u003e hostport.parse('host.production:50051', default_host='host', default_port=30)\n    HostPort(host='host.production', port=50051)\n    \u003e\u003e\u003e hostport.parse('host.production')\n    HostPort(host='host.production', port=None)\n    \u003e\u003e\u003e hostport.parse('50051')\n    HostPort(host=None, port=50051)\n\nIt's all.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzzzsochi%2Fhostport","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzzzsochi%2Fhostport","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzzzsochi%2Fhostport/lists"}