{"id":15563923,"url":"https://github.com/mrsarm/python-res-address","last_synced_at":"2026-02-17T16:35:12.298Z","repository":{"id":34245668,"uuid":"145167703","full_name":"mrsarm/python-res-address","owner":"mrsarm","description":"Simple Resource Address Parser","archived":false,"fork":false,"pushed_at":"2023-08-17T15:17:11.000Z","size":48,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-19T18:50:45.991Z","etag":null,"topics":["address-parser","library","parser","py2","py3","python"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/res-address/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mrsarm.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG.rst","contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-08-17T21:23:14.000Z","updated_at":"2022-03-30T17:17:09.000Z","dependencies_parsed_at":"2024-10-02T16:40:27.157Z","dependency_job_id":null,"html_url":"https://github.com/mrsarm/python-res-address","commit_stats":{"total_commits":33,"total_committers":1,"mean_commits":33.0,"dds":0.0,"last_synced_commit":"6cce87735bc9a10e68b95789e8e9e8ecefd7f10d"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/mrsarm/python-res-address","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrsarm%2Fpython-res-address","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrsarm%2Fpython-res-address/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrsarm%2Fpython-res-address/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrsarm%2Fpython-res-address/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mrsarm","download_url":"https://codeload.github.com/mrsarm/python-res-address/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrsarm%2Fpython-res-address/sbom","scorecard":{"id":664759,"data":{"date":"2025-08-11","repo":{"name":"github.com/mrsarm/python-res-address","commit":"1bfb93f14b5c3153579af6850e07be1c546f4df3"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.1,"checks":[{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/python.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/mrsarm/python-res-address/python.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/python.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/mrsarm/python-res-address/python.yml/master?enable=pin","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/python.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Code-Review","score":0,"reason":"Found 0/15 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: COPYING:0","Info: FSF or OSI recognized license: GNU Lesser General Public License v3.0: COPYING:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact 2.0.0 not signed: https://api.github.com/repos/mrsarm/python-res-address/releases/63164197","Warn: release artifact 2.0b2 not signed: https://api.github.com/repos/mrsarm/python-res-address/releases/63076733","Warn: release artifact 2.0b1 not signed: https://api.github.com/repos/mrsarm/python-res-address/releases/62855643","Warn: release artifact 2.0.0 does not have provenance: https://api.github.com/repos/mrsarm/python-res-address/releases/63164197","Warn: release artifact 2.0b2 does not have provenance: https://api.github.com/repos/mrsarm/python-res-address/releases/63076733","Warn: release artifact 2.0b1 does not have provenance: https://api.github.com/repos/mrsarm/python-res-address/releases/62855643"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 16 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-21T17:36:31.349Z","repository_id":34245668,"created_at":"2025-08-21T17:36:31.355Z","updated_at":"2025-08-21T17:36:31.355Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29549797,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-17T14:33:00.708Z","status":"ssl_error","status_checked_at":"2026-02-17T14:32:58.657Z","response_time":100,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["address-parser","library","parser","py2","py3","python"],"created_at":"2024-10-02T16:30:22.412Z","updated_at":"2026-02-17T16:35:07.282Z","avatar_url":"https://github.com/mrsarm.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Simple Resource Address Parser\n==============================\n\nPython module to parse simple network resource addresses, like the ones\nused in many database systems to represent a database URI.\n\nUsed by `Mongotail \u003chttps://github.com/mrsarm/mongotail\u003e`_\nto parse the address passed through the command line, but can be used\nby any other Python application that needs to parse a MongoDB database address,\nor any other network resource like ``[SCHEMA://][[HOST OR IP][:PORT]/]RESOURCE``.\n\nUsage:\n\n.. code:: python\n\n   \u003e\u003e\u003e from res_address import get_res_address\n   \u003e\u003e\u003e scheme, host, port, resource, query, username, password = get_res_address(\"localhost:27017/test?timeout=5\")\n   \u003e\u003e\u003e print(scheme, host, port, resource, query, username, password)\n   None localhost 27017 test timeout=5 None None\n   \u003e\u003e\u003e print(get_res_address(\"my_db\"))\n   (None, None, None, 'my_db', None, None, None)\n   \u003e\u003e\u003e scheme, ipv6, port, resource, query, username, password = get_res_address(\"https://[::1]:9999/foo\")\n   \u003e\u003e\u003e print(scheme, ipv6, port, resource)\n   https [::1] 9999 foo\n\nThe address can be:\n\n+------------------------------+-----------------------------------------------------------------+\n| foo                          | foo resource on local machine (IPv4 connection)                 |\n+------------------------------+-----------------------------------------------------------------+\n| 192.169.0.5/foo              | foo resource on 192.168.0.5 machine                             |\n+------------------------------+-----------------------------------------------------------------+\n| remotehost/foo               | foo resource on *remotehost* machine                            |\n+------------------------------+-----------------------------------------------------------------+\n| 192.169.0.5:9999/foo         | foo resource on 192.168.0.5 machine on port 9999                |\n+------------------------------+-----------------------------------------------------------------+\n| http://192.169.0.5:9999/foo  | foo resource on 192.168.0.5 machine on port 9999, scheme http   |\n+------------------------------+-----------------------------------------------------------------+\n| \"[::1]:9999/foo\"             | foo resource on ::1 machine on port 9999 (IPv6 connection)      |\n+------------------------------+-----------------------------------------------------------------+\n| :1234/foo                    | foo resource on port 1234                                       |\n+------------------------------+-----------------------------------------------------------------+\n| user:pass@localhost/foo      | foo resource on localhost, with basic authentication            |\n+------------------------------+-----------------------------------------------------------------+\n| localhost/foo?timeout=500    | foo resource on localhost, with query string                    |\n+------------------------------+-----------------------------------------------------------------+\n\n**The only required component in the URI is the resource**. Some validations are performed over the\nhost, port and resource strings, and an exception is launched if some of the checks fail, but take\ninto account that invalid range of IP addresses or incompatible resource names may pass:\n\n.. code:: python\n\n   \u003e\u003e\u003e address = get_res_address(\"localhost:INVALIDport/test\")\n   Traceback (most recent call last):\n     File \"\u003cstdin\u003e\", line 1, in \u003cmodule\u003e\n     File \"res_address/__init__.py\", line 74, in get_res_address\n       raise InvalidPortError('Invalid port number \"%s\"' % port, address, port)\n   res_address.InvalidPortError: Invalid port number \"INVALIDport\"\n\nAll the validation exceptions inherit from ``AddressError``:\n\n* ``InvalidHostError``\n* ``InvalidPortError``\n* ``InvalidResourceError``\n* ``NotResourceProvidedError``\n\n\nDifference with urllib.parse\n----------------------------\n\nIf you need a library that can fully parse web URLs you should use\n`urllib.parse \u003chttps://docs.python.org/3/library/urllib.parse.html\u003e`_ instead. This\nlibrary intends to be used with simpler URIs for database resources, with only one\nresource name set, e.g. \"my_db\" or \"localhost:123/my_db\", but not \"localhost:123/my_db/my_table\".\nAlso a URL like \"localhost:123\" that is a valid HTTP URL, is not as\ndatabase URL because the \"resource\" (the database name) is not set.\n\nAlso to get the keys and values of the query component returned by ``get_res_address()``,\na function like ``urllib.parse.parse_qs()`` is recommended:\n\n.. code:: python\n\n   \u003e\u003e\u003e from res_address import get_res_address\n   \u003e\u003e\u003e from urllib.parse import parse_qs\n   \u003e\u003e\u003e scheme, host, port, resource, query, username, password = get_res_address(\"localhost/db?timeout=500\")\n   \u003e\u003e\u003e parse_qs(query).get('timeout', None)\n   ['500']\n\n\nRun the tests\n-------------\n\nJust execute (Python 2.7 or 3.5+)::\n\n   $ python setup.py test\n\n\nOr::\n\n   $ python -m unittest -v tests\n\n\nAbout\n-----\n\nProject: https://github.com/mrsarm/python-res-address\n\nAuthors: (2018-2023) Mariano Ruiz \u003cmr...@gmail.cm\u003e\n\nLicense: LGPL-3\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrsarm%2Fpython-res-address","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmrsarm%2Fpython-res-address","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrsarm%2Fpython-res-address/lists"}