From a52d0a48020f3101b08dde09ec2e32a625c436b3 Mon Sep 17 00:00:00 2001 From: DaoAdvocate <12145726+rihp@users.noreply.github.com> Date: Thu, 27 Oct 2022 19:15:17 +0200 Subject: [PATCH 01/40] wip: basic repo structure --- .../node_modules/.yarn-integrity | 10 + .../poetry.lock | 1406 +++++++++++++++++ .../__init__.py | 1 + .../client_config_builder.py | 85 + .../pyproject.toml | 60 + .../tests/test_client_config_builder.py | 26 + .../polywrap-client-config-builder/tox.ini | 30 + .../typings/polywrap_core/__init__.pyi | 8 + .../typings/polywrap_core/types/__init__.pyi | 19 + .../typings/polywrap_core/types/client.pyi | 59 + .../typings/polywrap_core/types/env.pyi | 21 + .../polywrap_core/types/file_reader.pyi | 13 + .../typings/polywrap_core/types/invoke.pyi | 66 + .../typings/polywrap_core/types/uri.pyi | 80 + .../polywrap_core/types/uri_package.pyi | 15 + .../types/uri_package_wrapper.pyi | 10 + .../types/uri_resolution_context.pyi | 44 + .../types/uri_resolution_step.pyi | 20 + .../polywrap_core/types/uri_resolver.pyi | 35 + .../types/uri_resolver_handler.pyi | 19 + .../polywrap_core/types/uri_wrapper.pyi | 15 + .../polywrap_core/types/wasm_package.pyi | 14 + .../typings/polywrap_core/types/wrapper.pyi | 28 + .../polywrap_core/uri_resolution/__init__.pyi | 7 + .../uri_resolution/uri_resolution_context.pyi | 41 + .../uri_resolution/uri_resolution_result.pyi | 21 + .../typings/polywrap_core/utils/__init__.pyi | 9 + .../utils/get_env_from_uri_history.pyi | 10 + .../polywrap_core/utils/init_wrapper.pyi | 10 + .../polywrap_core/utils/instance_of.pyi | 9 + .../polywrap_core/utils/maybe_async.pyi | 12 + .../polywrap-client-config-builder/yarn.lock | 4 + python-monorepo.code-workspace | 4 + 33 files changed, 2211 insertions(+) create mode 100644 packages/polywrap-client-config-builder/node_modules/.yarn-integrity create mode 100644 packages/polywrap-client-config-builder/poetry.lock create mode 100644 packages/polywrap-client-config-builder/polywrap_client_config_builder/__init__.py create mode 100644 packages/polywrap-client-config-builder/polywrap_client_config_builder/client_config_builder.py create mode 100644 packages/polywrap-client-config-builder/pyproject.toml create mode 100644 packages/polywrap-client-config-builder/tests/test_client_config_builder.py create mode 100644 packages/polywrap-client-config-builder/tox.ini create mode 100644 packages/polywrap-client-config-builder/typings/polywrap_core/__init__.pyi create mode 100644 packages/polywrap-client-config-builder/typings/polywrap_core/types/__init__.pyi create mode 100644 packages/polywrap-client-config-builder/typings/polywrap_core/types/client.pyi create mode 100644 packages/polywrap-client-config-builder/typings/polywrap_core/types/env.pyi create mode 100644 packages/polywrap-client-config-builder/typings/polywrap_core/types/file_reader.pyi create mode 100644 packages/polywrap-client-config-builder/typings/polywrap_core/types/invoke.pyi create mode 100644 packages/polywrap-client-config-builder/typings/polywrap_core/types/uri.pyi create mode 100644 packages/polywrap-client-config-builder/typings/polywrap_core/types/uri_package.pyi create mode 100644 packages/polywrap-client-config-builder/typings/polywrap_core/types/uri_package_wrapper.pyi create mode 100644 packages/polywrap-client-config-builder/typings/polywrap_core/types/uri_resolution_context.pyi create mode 100644 packages/polywrap-client-config-builder/typings/polywrap_core/types/uri_resolution_step.pyi create mode 100644 packages/polywrap-client-config-builder/typings/polywrap_core/types/uri_resolver.pyi create mode 100644 packages/polywrap-client-config-builder/typings/polywrap_core/types/uri_resolver_handler.pyi create mode 100644 packages/polywrap-client-config-builder/typings/polywrap_core/types/uri_wrapper.pyi create mode 100644 packages/polywrap-client-config-builder/typings/polywrap_core/types/wasm_package.pyi create mode 100644 packages/polywrap-client-config-builder/typings/polywrap_core/types/wrapper.pyi create mode 100644 packages/polywrap-client-config-builder/typings/polywrap_core/uri_resolution/__init__.pyi create mode 100644 packages/polywrap-client-config-builder/typings/polywrap_core/uri_resolution/uri_resolution_context.pyi create mode 100644 packages/polywrap-client-config-builder/typings/polywrap_core/uri_resolution/uri_resolution_result.pyi create mode 100644 packages/polywrap-client-config-builder/typings/polywrap_core/utils/__init__.pyi create mode 100644 packages/polywrap-client-config-builder/typings/polywrap_core/utils/get_env_from_uri_history.pyi create mode 100644 packages/polywrap-client-config-builder/typings/polywrap_core/utils/init_wrapper.pyi create mode 100644 packages/polywrap-client-config-builder/typings/polywrap_core/utils/instance_of.pyi create mode 100644 packages/polywrap-client-config-builder/typings/polywrap_core/utils/maybe_async.pyi create mode 100644 packages/polywrap-client-config-builder/yarn.lock diff --git a/packages/polywrap-client-config-builder/node_modules/.yarn-integrity b/packages/polywrap-client-config-builder/node_modules/.yarn-integrity new file mode 100644 index 00000000..5e070b6b --- /dev/null +++ b/packages/polywrap-client-config-builder/node_modules/.yarn-integrity @@ -0,0 +1,10 @@ +{ + "systemParams": "darwin-x64-72", + "modulesFolders": [], + "flags": [], + "linkedModules": [], + "topLevelPatterns": [], + "lockfileEntries": {}, + "files": [], + "artifacts": {} +} \ No newline at end of file diff --git a/packages/polywrap-client-config-builder/poetry.lock b/packages/polywrap-client-config-builder/poetry.lock new file mode 100644 index 00000000..6e41d4e6 --- /dev/null +++ b/packages/polywrap-client-config-builder/poetry.lock @@ -0,0 +1,1406 @@ +[[package]] +name = "astroid" +version = "2.12.12" +description = "An abstract syntax tree for Python with inference support." +category = "dev" +optional = false +python-versions = ">=3.7.2" + +[package.dependencies] +lazy-object-proxy = ">=1.4.0" +wrapt = [ + {version = ">=1.11,<2", markers = "python_version < \"3.11\""}, + {version = ">=1.14,<2", markers = "python_version >= \"3.11\""}, +] + +[[package]] +name = "attrs" +version = "22.1.0" +description = "Classes Without Boilerplate" +category = "dev" +optional = false +python-versions = ">=3.5" + +[package.extras] +dev = ["cloudpickle", "coverage[toml] (>=5.0.2)", "furo", "hypothesis", "mypy (>=0.900,!=0.940)", "pre-commit", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "sphinx", "sphinx-notfound-page", "zope.interface"] +docs = ["furo", "sphinx", "sphinx-notfound-page", "zope.interface"] +tests = ["cloudpickle", "coverage[toml] (>=5.0.2)", "hypothesis", "mypy (>=0.900,!=0.940)", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "zope.interface"] +tests_no_zope = ["cloudpickle", "coverage[toml] (>=5.0.2)", "hypothesis", "mypy (>=0.900,!=0.940)", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins"] + +[[package]] +name = "backoff" +version = "2.2.1" +description = "Function decoration for backoff and retry" +category = "main" +optional = false +python-versions = ">=3.7,<4.0" + +[[package]] +name = "bandit" +version = "1.7.4" +description = "Security oriented static analyser for python code." +category = "dev" +optional = false +python-versions = ">=3.7" + +[package.dependencies] +colorama = {version = ">=0.3.9", markers = "platform_system == \"Windows\""} +GitPython = ">=1.0.1" +PyYAML = ">=5.3.1" +stevedore = ">=1.20.0" +toml = {version = "*", optional = true, markers = "extra == \"toml\""} + +[package.extras] +test = ["beautifulsoup4 (>=4.8.0)", "coverage (>=4.5.4)", "fixtures (>=3.0.0)", "flake8 (>=4.0.0)", "pylint (==1.9.4)", "stestr (>=2.5.0)", "testscenarios (>=0.5.0)", "testtools (>=2.3.0)", "toml"] +toml = ["toml"] +yaml = ["PyYAML"] + +[[package]] +name = "black" +version = "22.10.0" +description = "The uncompromising code formatter." +category = "dev" +optional = false +python-versions = ">=3.7" + +[package.dependencies] +click = ">=8.0.0" +mypy-extensions = ">=0.4.3" +pathspec = ">=0.9.0" +platformdirs = ">=2" +tomli = {version = ">=1.1.0", markers = "python_full_version < \"3.11.0a7\""} + +[package.extras] +colorama = ["colorama (>=0.4.3)"] +d = ["aiohttp (>=3.7.4)"] +jupyter = ["ipython (>=7.8.0)", "tokenize-rt (>=3.2.0)"] +uvloop = ["uvloop (>=0.15.2)"] + +[[package]] +name = "click" +version = "8.1.3" +description = "Composable command line interface toolkit" +category = "dev" +optional = false +python-versions = ">=3.7" + +[package.dependencies] +colorama = {version = "*", markers = "platform_system == \"Windows\""} + +[[package]] +name = "colorama" +version = "0.4.6" +description = "Cross-platform colored terminal text." +category = "dev" +optional = false +python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" + +[[package]] +name = "dill" +version = "0.3.6" +description = "serialize all of python" +category = "dev" +optional = false +python-versions = ">=3.7" + +[package.extras] +graph = ["objgraph (>=1.7.2)"] + +[[package]] +name = "distlib" +version = "0.3.6" +description = "Distribution utilities" +category = "dev" +optional = false +python-versions = "*" + +[[package]] +name = "exceptiongroup" +version = "1.0.0" +description = "Backport of PEP 654 (exception groups)" +category = "dev" +optional = false +python-versions = ">=3.7" + +[package.extras] +test = ["pytest (>=6)"] + +[[package]] +name = "filelock" +version = "3.8.0" +description = "A platform independent file lock." +category = "dev" +optional = false +python-versions = ">=3.7" + +[package.extras] +docs = ["furo (>=2022.6.21)", "sphinx (>=5.1.1)", "sphinx-autodoc-typehints (>=1.19.1)"] +testing = ["covdefaults (>=2.2)", "coverage (>=6.4.2)", "pytest (>=7.1.2)", "pytest-cov (>=3)", "pytest-timeout (>=2.1)"] + +[[package]] +name = "gitdb" +version = "4.0.9" +description = "Git Object Database" +category = "dev" +optional = false +python-versions = ">=3.6" + +[package.dependencies] +smmap = ">=3.0.1,<6" + +[[package]] +name = "GitPython" +version = "3.1.29" +description = "GitPython is a python library used to interact with Git repositories" +category = "dev" +optional = false +python-versions = ">=3.7" + +[package.dependencies] +gitdb = ">=4.0.1,<5" + +[[package]] +name = "gql" +version = "3.4.0" +description = "GraphQL client for Python" +category = "main" +optional = false +python-versions = "*" + +[package.dependencies] +backoff = ">=1.11.1,<3.0" +graphql-core = ">=3.2,<3.3" +yarl = ">=1.6,<2.0" + +[package.extras] +aiohttp = ["aiohttp (>=3.7.1,<3.9.0)"] +all = ["aiohttp (>=3.7.1,<3.9.0)", "botocore (>=1.21,<2)", "requests (>=2.26,<3)", "requests-toolbelt (>=0.9.1,<1)", "urllib3 (>=1.26)", "websockets (>=10,<11)", "websockets (>=9,<10)"] +botocore = ["botocore (>=1.21,<2)"] +dev = ["aiofiles", "aiohttp (>=3.7.1,<3.9.0)", "black (==22.3.0)", "botocore (>=1.21,<2)", "check-manifest (>=0.42,<1)", "flake8 (==3.8.1)", "isort (==4.3.21)", "mock (==4.0.2)", "mypy (==0.910)", "parse (==1.15.0)", "pytest (==6.2.5)", "pytest-asyncio (==0.16.0)", "pytest-console-scripts (==1.3.1)", "pytest-cov (==3.0.0)", "requests (>=2.26,<3)", "requests-toolbelt (>=0.9.1,<1)", "sphinx (>=3.0.0,<4)", "sphinx-argparse (==0.2.5)", "sphinx-rtd-theme (>=0.4,<1)", "types-aiofiles", "types-mock", "types-requests", "urllib3 (>=1.26)", "vcrpy (==4.0.2)", "websockets (>=10,<11)", "websockets (>=9,<10)"] +requests = ["requests (>=2.26,<3)", "requests-toolbelt (>=0.9.1,<1)", "urllib3 (>=1.26)"] +test = ["aiofiles", "aiohttp (>=3.7.1,<3.9.0)", "botocore (>=1.21,<2)", "mock (==4.0.2)", "parse (==1.15.0)", "pytest (==6.2.5)", "pytest-asyncio (==0.16.0)", "pytest-console-scripts (==1.3.1)", "pytest-cov (==3.0.0)", "requests (>=2.26,<3)", "requests-toolbelt (>=0.9.1,<1)", "urllib3 (>=1.26)", "vcrpy (==4.0.2)", "websockets (>=10,<11)", "websockets (>=9,<10)"] +test_no_transport = ["aiofiles", "mock (==4.0.2)", "parse (==1.15.0)", "pytest (==6.2.5)", "pytest-asyncio (==0.16.0)", "pytest-console-scripts (==1.3.1)", "pytest-cov (==3.0.0)", "vcrpy (==4.0.2)"] +websockets = ["websockets (>=10,<11)", "websockets (>=9,<10)"] + +[[package]] +name = "graphql-core" +version = "3.2.3" +description = "GraphQL implementation for Python, a port of GraphQL.js, the JavaScript reference implementation for GraphQL." +category = "main" +optional = false +python-versions = ">=3.6,<4" + +[[package]] +name = "idna" +version = "3.4" +description = "Internationalized Domain Names in Applications (IDNA)" +category = "main" +optional = false +python-versions = ">=3.5" + +[[package]] +name = "iniconfig" +version = "1.1.1" +description = "iniconfig: brain-dead simple config-ini parsing" +category = "dev" +optional = false +python-versions = "*" + +[[package]] +name = "isort" +version = "5.10.1" +description = "A Python utility / library to sort Python imports." +category = "dev" +optional = false +python-versions = ">=3.6.1,<4.0" + +[package.extras] +colors = ["colorama (>=0.4.3,<0.5.0)"] +pipfile_deprecated_finder = ["pipreqs", "requirementslib"] +plugins = ["setuptools"] +requirements_deprecated_finder = ["pip-api", "pipreqs"] + +[[package]] +name = "lazy-object-proxy" +version = "1.8.0" +description = "A fast and thorough lazy object proxy." +category = "dev" +optional = false +python-versions = ">=3.7" + +[[package]] +name = "mccabe" +version = "0.7.0" +description = "McCabe checker, plugin for flake8" +category = "dev" +optional = false +python-versions = ">=3.6" + +[[package]] +name = "msgpack" +version = "1.0.4" +description = "MessagePack serializer" +category = "main" +optional = false +python-versions = "*" + +[[package]] +name = "multidict" +version = "6.0.2" +description = "multidict implementation" +category = "main" +optional = false +python-versions = ">=3.7" + +[[package]] +name = "mypy-extensions" +version = "0.4.3" +description = "Experimental type system extensions for programs checked with the mypy typechecker." +category = "dev" +optional = false +python-versions = "*" + +[[package]] +name = "nodeenv" +version = "1.7.0" +description = "Node.js virtual environment builder" +category = "dev" +optional = false +python-versions = ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*" + +[package.dependencies] +setuptools = "*" + +[[package]] +name = "packaging" +version = "21.3" +description = "Core utilities for Python packages" +category = "dev" +optional = false +python-versions = ">=3.6" + +[package.dependencies] +pyparsing = ">=2.0.2,<3.0.5 || >3.0.5" + +[[package]] +name = "pathspec" +version = "0.10.1" +description = "Utility library for gitignore style pattern matching of file paths." +category = "dev" +optional = false +python-versions = ">=3.7" + +[[package]] +name = "pbr" +version = "5.11.0" +description = "Python Build Reasonableness" +category = "dev" +optional = false +python-versions = ">=2.6" + +[[package]] +name = "platformdirs" +version = "2.5.2" +description = "A small Python module for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." +category = "dev" +optional = false +python-versions = ">=3.7" + +[package.extras] +docs = ["furo (>=2021.7.5b38)", "proselint (>=0.10.2)", "sphinx (>=4)", "sphinx-autodoc-typehints (>=1.12)"] +test = ["appdirs (==1.4.4)", "pytest (>=6)", "pytest-cov (>=2.7)", "pytest-mock (>=3.6)"] + +[[package]] +name = "pluggy" +version = "1.0.0" +description = "plugin and hook calling mechanisms for python" +category = "dev" +optional = false +python-versions = ">=3.6" + +[package.extras] +dev = ["pre-commit", "tox"] +testing = ["pytest", "pytest-benchmark"] + +[[package]] +name = "polywrap-client" +version = "0.1.0" +description = "" +category = "main" +optional = false +python-versions = "^3.10" +develop = true + +[package.dependencies] +polywrap-core = {path = "../polywrap-core", develop = true} +polywrap-manifest = {path = "../polywrap-manifest", develop = true} +polywrap-msgpack = {path = "../polywrap-msgpack", develop = true} +polywrap-result = {path = "../polywrap-result", develop = true} +polywrap-uri-resolvers = {path = "../polywrap-uri-resolvers", develop = true} +pycryptodome = "^3.14.1" +pysha3 = "^1.0.2" +result = "^0.8.0" +unsync = "^1.4.0" +wasmtime = "^1.0.1" + +[package.source] +type = "directory" +url = "../polywrap-client" + +[[package]] +name = "polywrap-core" +version = "0.1.0" +description = "" +category = "main" +optional = false +python-versions = "^3.10" +develop = true + +[package.dependencies] +gql = "3.4.0" +graphql-core = "^3.2.1" +polywrap-manifest = {path = "../polywrap-manifest", develop = true} +polywrap-result = {path = "../polywrap-result", develop = true} +pydantic = "^1.10.2" + +[package.source] +type = "directory" +url = "../polywrap-core" + +[[package]] +name = "polywrap-manifest" +version = "0.1.0" +description = "WRAP manifest" +category = "main" +optional = false +python-versions = "^3.10" +develop = true + +[package.dependencies] +polywrap-msgpack = {path = "../polywrap-msgpack", develop = true} +polywrap-result = {path = "../polywrap-result", develop = true} +pydantic = "^1.10.2" + +[package.source] +type = "directory" +url = "../polywrap-manifest" + +[[package]] +name = "polywrap-msgpack" +version = "0.1.0" +description = "WRAP msgpack encoding" +category = "main" +optional = false +python-versions = "^3.10" +develop = true + +[package.dependencies] +msgpack = "^1.0.4" + +[package.source] +type = "directory" +url = "../polywrap-msgpack" + +[[package]] +name = "polywrap-result" +version = "0.1.0" +description = "Result object" +category = "main" +optional = false +python-versions = "^3.10" +develop = true + +[package.source] +type = "directory" +url = "../polywrap-result" + +[[package]] +name = "polywrap-uri-resolvers" +version = "0.1.0" +description = "" +category = "main" +optional = false +python-versions = "^3.10" +develop = true + +[package.dependencies] +polywrap-core = {path = "../polywrap-core", develop = true} +polywrap-result = {path = "../polywrap-result", develop = true} +polywrap-wasm = {path = "../polywrap-wasm", develop = true} +wasmtime = "^1.0.1" + +[package.source] +type = "directory" +url = "../polywrap-uri-resolvers" + +[[package]] +name = "polywrap-wasm" +version = "0.1.0" +description = "" +category = "main" +optional = false +python-versions = "^3.10" +develop = true + +[package.dependencies] +polywrap-core = {path = "../polywrap-core", develop = true} +polywrap-manifest = {path = "../polywrap-manifest", develop = true} +polywrap-msgpack = {path = "../polywrap-msgpack", develop = true} +polywrap-result = {path = "../polywrap-result", develop = true} +unsync = "^1.4.0" +wasmtime = "^1.0.1" + +[package.source] +type = "directory" +url = "../polywrap-wasm" + +[[package]] +name = "py" +version = "1.11.0" +description = "library with cross-python path, ini-parsing, io, code, log facilities" +category = "dev" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" + +[[package]] +name = "pycryptodome" +version = "3.15.0" +description = "Cryptographic library for Python" +category = "main" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" + +[[package]] +name = "pydantic" +version = "1.10.2" +description = "Data validation and settings management using python type hints" +category = "main" +optional = false +python-versions = ">=3.7" + +[package.dependencies] +typing-extensions = ">=4.1.0" + +[package.extras] +dotenv = ["python-dotenv (>=0.10.4)"] +email = ["email-validator (>=1.0.3)"] + +[[package]] +name = "pydocstyle" +version = "6.1.1" +description = "Python docstring style checker" +category = "dev" +optional = false +python-versions = ">=3.6" + +[package.dependencies] +snowballstemmer = "*" + +[package.extras] +toml = ["toml"] + +[[package]] +name = "pylint" +version = "2.15.5" +description = "python code static checker" +category = "dev" +optional = false +python-versions = ">=3.7.2" + +[package.dependencies] +astroid = ">=2.12.12,<=2.14.0-dev0" +colorama = {version = ">=0.4.5", markers = "sys_platform == \"win32\""} +dill = ">=0.2" +isort = ">=4.2.5,<6" +mccabe = ">=0.6,<0.8" +platformdirs = ">=2.2.0" +tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""} +tomlkit = ">=0.10.1" + +[package.extras] +spelling = ["pyenchant (>=3.2,<4.0)"] +testutils = ["gitpython (>3)"] + +[[package]] +name = "pyparsing" +version = "3.0.9" +description = "pyparsing module - Classes and methods to define and execute parsing grammars" +category = "dev" +optional = false +python-versions = ">=3.6.8" + +[package.extras] +diagrams = ["jinja2", "railroad-diagrams"] + +[[package]] +name = "pyright" +version = "1.1.277" +description = "Command line wrapper for pyright" +category = "dev" +optional = false +python-versions = ">=3.7" + +[package.dependencies] +nodeenv = ">=1.6.0" + +[package.extras] +all = ["twine (>=3.4.1)"] +dev = ["twine (>=3.4.1)"] + +[[package]] +name = "pysha3" +version = "1.0.2" +description = "SHA-3 (Keccak) for Python 2.7 - 3.5" +category = "main" +optional = false +python-versions = "*" + +[[package]] +name = "pytest" +version = "7.2.0" +description = "pytest: simple powerful testing with Python" +category = "dev" +optional = false +python-versions = ">=3.7" + +[package.dependencies] +attrs = ">=19.2.0" +colorama = {version = "*", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} +iniconfig = "*" +packaging = "*" +pluggy = ">=0.12,<2.0" +tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} + +[package.extras] +testing = ["argcomplete", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "xmlschema"] + +[[package]] +name = "pytest-asyncio" +version = "0.19.0" +description = "Pytest support for asyncio" +category = "dev" +optional = false +python-versions = ">=3.7" + +[package.dependencies] +pytest = ">=6.1.0" + +[package.extras] +testing = ["coverage (>=6.2)", "flaky (>=3.5.0)", "hypothesis (>=5.7.1)", "mypy (>=0.931)", "pytest-trio (>=0.7.0)"] + +[[package]] +name = "PyYAML" +version = "6.0" +description = "YAML parser and emitter for Python" +category = "dev" +optional = false +python-versions = ">=3.6" + +[[package]] +name = "result" +version = "0.8.0" +description = "A Rust-like result type for Python" +category = "main" +optional = false +python-versions = ">=3.7" + +[[package]] +name = "setuptools" +version = "65.5.0" +description = "Easily download, build, install, upgrade, and uninstall Python packages" +category = "dev" +optional = false +python-versions = ">=3.7" + +[package.extras] +docs = ["furo", "jaraco.packaging (>=9)", "jaraco.tidelift (>=1.4)", "pygments-github-lexers (==0.0.5)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-favicon", "sphinx-hoverxref (<2)", "sphinx-inline-tabs", "sphinx-notfound-page (==0.8.3)", "sphinx-reredirects", "sphinxcontrib-towncrier"] +testing = ["build[virtualenv]", "filelock (>=3.4.0)", "flake8 (<5)", "flake8-2020", "ini2toml[lite] (>=0.9)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "mock", "pip (>=19.1)", "pip-run (>=8.8)", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-flake8", "pytest-mypy (>=0.9.1)", "pytest-perf", "pytest-xdist", "tomli-w (>=1.0.0)", "virtualenv (>=13.0.0)", "wheel"] +testing-integration = ["build[virtualenv]", "filelock (>=3.4.0)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "pytest", "pytest-enabler", "pytest-xdist", "tomli", "virtualenv (>=13.0.0)", "wheel"] + +[[package]] +name = "six" +version = "1.16.0" +description = "Python 2 and 3 compatibility utilities" +category = "dev" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" + +[[package]] +name = "smmap" +version = "5.0.0" +description = "A pure Python implementation of a sliding window memory map manager" +category = "dev" +optional = false +python-versions = ">=3.6" + +[[package]] +name = "snowballstemmer" +version = "2.2.0" +description = "This package provides 29 stemmers for 28 languages generated from Snowball algorithms." +category = "dev" +optional = false +python-versions = "*" + +[[package]] +name = "stevedore" +version = "4.1.0" +description = "Manage dynamic plugins for Python applications" +category = "dev" +optional = false +python-versions = ">=3.8" + +[package.dependencies] +pbr = ">=2.0.0,<2.1.0 || >2.1.0" + +[[package]] +name = "toml" +version = "0.10.2" +description = "Python Library for Tom's Obvious, Minimal Language" +category = "dev" +optional = false +python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" + +[[package]] +name = "tomli" +version = "2.0.1" +description = "A lil' TOML parser" +category = "dev" +optional = false +python-versions = ">=3.7" + +[[package]] +name = "tomlkit" +version = "0.11.6" +description = "Style preserving TOML library" +category = "dev" +optional = false +python-versions = ">=3.6" + +[[package]] +name = "tox" +version = "3.27.0" +description = "tox is a generic virtualenv management and test command line tool" +category = "dev" +optional = false +python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7" + +[package.dependencies] +colorama = {version = ">=0.4.1", markers = "platform_system == \"Windows\""} +filelock = ">=3.0.0" +packaging = ">=14" +pluggy = ">=0.12.0" +py = ">=1.4.17" +six = ">=1.14.0" +tomli = {version = ">=2.0.1", markers = "python_version >= \"3.7\" and python_version < \"3.11\""} +virtualenv = ">=16.0.0,<20.0.0 || >20.0.0,<20.0.1 || >20.0.1,<20.0.2 || >20.0.2,<20.0.3 || >20.0.3,<20.0.4 || >20.0.4,<20.0.5 || >20.0.5,<20.0.6 || >20.0.6,<20.0.7 || >20.0.7" + +[package.extras] +docs = ["pygments-github-lexers (>=0.0.5)", "sphinx (>=2.0.0)", "sphinxcontrib-autoprogram (>=0.1.5)", "towncrier (>=18.5.0)"] +testing = ["flaky (>=3.4.0)", "freezegun (>=0.3.11)", "pathlib2 (>=2.3.3)", "psutil (>=5.6.1)", "pytest (>=4.0.0)", "pytest-cov (>=2.5.1)", "pytest-mock (>=1.10.0)", "pytest-randomly (>=1.0.0)"] + +[[package]] +name = "tox-poetry" +version = "0.4.1" +description = "Tox poetry plugin" +category = "dev" +optional = false +python-versions = "*" + +[package.dependencies] +pluggy = "*" +toml = "*" +tox = {version = ">=3.7.0", markers = "python_version >= \"3\""} + +[package.extras] +test = ["coverage", "pycodestyle", "pylint", "pytest"] + +[[package]] +name = "typing-extensions" +version = "4.4.0" +description = "Backported and Experimental Type Hints for Python 3.7+" +category = "main" +optional = false +python-versions = ">=3.7" + +[[package]] +name = "unsync" +version = "1.4.0" +description = "Unsynchronize asyncio" +category = "main" +optional = false +python-versions = "*" + +[[package]] +name = "virtualenv" +version = "20.16.6" +description = "Virtual Python Environment builder" +category = "dev" +optional = false +python-versions = ">=3.6" + +[package.dependencies] +distlib = ">=0.3.6,<1" +filelock = ">=3.4.1,<4" +platformdirs = ">=2.4,<3" + +[package.extras] +docs = ["proselint (>=0.13)", "sphinx (>=5.3)", "sphinx-argparse (>=0.3.2)", "sphinx-rtd-theme (>=1)", "towncrier (>=22.8)"] +testing = ["coverage (>=6.2)", "coverage-enable-subprocess (>=1)", "flaky (>=3.7)", "packaging (>=21.3)", "pytest (>=7.0.1)", "pytest-env (>=0.6.2)", "pytest-freezegun (>=0.4.2)", "pytest-mock (>=3.6.1)", "pytest-randomly (>=3.10.3)", "pytest-timeout (>=2.1)"] + +[[package]] +name = "wasmtime" +version = "1.0.1" +description = "A WebAssembly runtime powered by Wasmtime" +category = "main" +optional = false +python-versions = ">=3.6" + +[package.extras] +testing = ["coverage", "flake8 (==4.0.1)", "pycparser", "pytest", "pytest-flake8", "pytest-mypy"] + +[[package]] +name = "wrapt" +version = "1.14.1" +description = "Module for decorators, wrappers and monkey patching." +category = "dev" +optional = false +python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7" + +[[package]] +name = "yarl" +version = "1.8.1" +description = "Yet another URL library" +category = "main" +optional = false +python-versions = ">=3.7" + +[package.dependencies] +idna = ">=2.0" +multidict = ">=4.0" + +[metadata] +lock-version = "1.1" +python-versions = "^3.10" +content-hash = "622bd70194dbb37cffab77cd1907c23f174f6628f85ccda69f2e41df2977c791" + +[metadata.files] +astroid = [ + {file = "astroid-2.12.12-py3-none-any.whl", hash = "sha256:72702205200b2a638358369d90c222d74ebc376787af8fb2f7f2a86f7b5cc85f"}, + {file = "astroid-2.12.12.tar.gz", hash = "sha256:1c00a14f5a3ed0339d38d2e2e5b74ea2591df5861c0936bb292b84ccf3a78d83"}, +] +attrs = [ + {file = "attrs-22.1.0-py2.py3-none-any.whl", hash = "sha256:86efa402f67bf2df34f51a335487cf46b1ec130d02b8d39fd248abfd30da551c"}, + {file = "attrs-22.1.0.tar.gz", hash = "sha256:29adc2665447e5191d0e7c568fde78b21f9672d344281d0c6e1ab085429b22b6"}, +] +backoff = [ + {file = "backoff-2.2.1-py3-none-any.whl", hash = "sha256:63579f9a0628e06278f7e47b7d7d5b6ce20dc65c5e96a6f3ca99a6adca0396e8"}, + {file = "backoff-2.2.1.tar.gz", hash = "sha256:03f829f5bb1923180821643f8753b0502c3b682293992485b0eef2807afa5cba"}, +] +bandit = [ + {file = "bandit-1.7.4-py3-none-any.whl", hash = "sha256:412d3f259dab4077d0e7f0c11f50f650cc7d10db905d98f6520a95a18049658a"}, + {file = "bandit-1.7.4.tar.gz", hash = "sha256:2d63a8c573417bae338962d4b9b06fbc6080f74ecd955a092849e1e65c717bd2"}, +] +black = [ + {file = "black-22.10.0-1fixedarch-cp310-cp310-macosx_11_0_x86_64.whl", hash = "sha256:5cc42ca67989e9c3cf859e84c2bf014f6633db63d1cbdf8fdb666dcd9e77e3fa"}, + {file = "black-22.10.0-1fixedarch-cp311-cp311-macosx_11_0_x86_64.whl", hash = "sha256:5d8f74030e67087b219b032aa33a919fae8806d49c867846bfacde57f43972ef"}, + {file = "black-22.10.0-1fixedarch-cp37-cp37m-macosx_10_16_x86_64.whl", hash = "sha256:197df8509263b0b8614e1df1756b1dd41be6738eed2ba9e9769f3880c2b9d7b6"}, + {file = "black-22.10.0-1fixedarch-cp38-cp38-macosx_10_16_x86_64.whl", hash = "sha256:2644b5d63633702bc2c5f3754b1b475378fbbfb481f62319388235d0cd104c2d"}, + {file = "black-22.10.0-1fixedarch-cp39-cp39-macosx_11_0_x86_64.whl", hash = "sha256:e41a86c6c650bcecc6633ee3180d80a025db041a8e2398dcc059b3afa8382cd4"}, + {file = "black-22.10.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:2039230db3c6c639bd84efe3292ec7b06e9214a2992cd9beb293d639c6402edb"}, + {file = "black-22.10.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:14ff67aec0a47c424bc99b71005202045dc09270da44a27848d534600ac64fc7"}, + {file = "black-22.10.0-cp310-cp310-win_amd64.whl", hash = "sha256:819dc789f4498ecc91438a7de64427c73b45035e2e3680c92e18795a839ebb66"}, + {file = "black-22.10.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:5b9b29da4f564ba8787c119f37d174f2b69cdfdf9015b7d8c5c16121ddc054ae"}, + {file = "black-22.10.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b8b49776299fece66bffaafe357d929ca9451450f5466e997a7285ab0fe28e3b"}, + {file = "black-22.10.0-cp311-cp311-win_amd64.whl", hash = "sha256:21199526696b8f09c3997e2b4db8d0b108d801a348414264d2eb8eb2532e540d"}, + {file = "black-22.10.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1e464456d24e23d11fced2bc8c47ef66d471f845c7b7a42f3bd77bf3d1789650"}, + {file = "black-22.10.0-cp37-cp37m-win_amd64.whl", hash = "sha256:9311e99228ae10023300ecac05be5a296f60d2fd10fff31cf5c1fa4ca4b1988d"}, + {file = "black-22.10.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:fba8a281e570adafb79f7755ac8721b6cf1bbf691186a287e990c7929c7692ff"}, + {file = "black-22.10.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:915ace4ff03fdfff953962fa672d44be269deb2eaf88499a0f8805221bc68c87"}, + {file = "black-22.10.0-cp38-cp38-win_amd64.whl", hash = "sha256:444ebfb4e441254e87bad00c661fe32df9969b2bf224373a448d8aca2132b395"}, + {file = "black-22.10.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:974308c58d057a651d182208a484ce80a26dac0caef2895836a92dd6ebd725e0"}, + {file = "black-22.10.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:72ef3925f30e12a184889aac03d77d031056860ccae8a1e519f6cbb742736383"}, + {file = "black-22.10.0-cp39-cp39-win_amd64.whl", hash = "sha256:432247333090c8c5366e69627ccb363bc58514ae3e63f7fc75c54b1ea80fa7de"}, + {file = "black-22.10.0-py3-none-any.whl", hash = "sha256:c957b2b4ea88587b46cf49d1dc17681c1e672864fd7af32fc1e9664d572b3458"}, + {file = "black-22.10.0.tar.gz", hash = "sha256:f513588da599943e0cde4e32cc9879e825d58720d6557062d1098c5ad80080e1"}, +] +click = [ + {file = "click-8.1.3-py3-none-any.whl", hash = "sha256:bb4d8133cb15a609f44e8213d9b391b0809795062913b383c62be0ee95b1db48"}, + {file = "click-8.1.3.tar.gz", hash = "sha256:7682dc8afb30297001674575ea00d1814d808d6a36af415a82bd481d37ba7b8e"}, +] +colorama = [ + {file = "colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"}, + {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"}, +] +dill = [ + {file = "dill-0.3.6-py3-none-any.whl", hash = "sha256:a07ffd2351b8c678dfc4a856a3005f8067aea51d6ba6c700796a4d9e280f39f0"}, + {file = "dill-0.3.6.tar.gz", hash = "sha256:e5db55f3687856d8fbdab002ed78544e1c4559a130302693d839dfe8f93f2373"}, +] +distlib = [ + {file = "distlib-0.3.6-py2.py3-none-any.whl", hash = "sha256:f35c4b692542ca110de7ef0bea44d73981caeb34ca0b9b6b2e6d7790dda8f80e"}, + {file = "distlib-0.3.6.tar.gz", hash = "sha256:14bad2d9b04d3a36127ac97f30b12a19268f211063d8f8ee4f47108896e11b46"}, +] +exceptiongroup = [ + {file = "exceptiongroup-1.0.0-py3-none-any.whl", hash = "sha256:2ac84b496be68464a2da60da518af3785fff8b7ec0d090a581604bc870bdee41"}, + {file = "exceptiongroup-1.0.0.tar.gz", hash = "sha256:affbabf13fb6e98988c38d9c5650e701569fe3c1de3233cfb61c5f33774690ad"}, +] +filelock = [ + {file = "filelock-3.8.0-py3-none-any.whl", hash = "sha256:617eb4e5eedc82fc5f47b6d61e4d11cb837c56cb4544e39081099fa17ad109d4"}, + {file = "filelock-3.8.0.tar.gz", hash = "sha256:55447caa666f2198c5b6b13a26d2084d26fa5b115c00d065664b2124680c4edc"}, +] +gitdb = [ + {file = "gitdb-4.0.9-py3-none-any.whl", hash = "sha256:8033ad4e853066ba6ca92050b9df2f89301b8fc8bf7e9324d412a63f8bf1a8fd"}, + {file = "gitdb-4.0.9.tar.gz", hash = "sha256:bac2fd45c0a1c9cf619e63a90d62bdc63892ef92387424b855792a6cabe789aa"}, +] +GitPython = [ + {file = "GitPython-3.1.29-py3-none-any.whl", hash = "sha256:41eea0deec2deea139b459ac03656f0dd28fc4a3387240ec1d3c259a2c47850f"}, + {file = "GitPython-3.1.29.tar.gz", hash = "sha256:cc36bfc4a3f913e66805a28e84703e419d9c264c1077e537b54f0e1af85dbefd"}, +] +gql = [ + {file = "gql-3.4.0-py2.py3-none-any.whl", hash = "sha256:59c8a0b8f0a2f3b0b2ff970c94de86f82f65cb1da3340bfe57143e5f7ea82f71"}, + {file = "gql-3.4.0.tar.gz", hash = "sha256:ca81aa8314fa88a8c57dd1ce34941278e0c352d762eb721edcba0387829ea7c0"}, +] +graphql-core = [ + {file = "graphql-core-3.2.3.tar.gz", hash = "sha256:06d2aad0ac723e35b1cb47885d3e5c45e956a53bc1b209a9fc5369007fe46676"}, + {file = "graphql_core-3.2.3-py3-none-any.whl", hash = "sha256:5766780452bd5ec8ba133f8bf287dc92713e3868ddd83aee4faab9fc3e303dc3"}, +] +idna = [ + {file = "idna-3.4-py3-none-any.whl", hash = "sha256:90b77e79eaa3eba6de819a0c442c0b4ceefc341a7a2ab77d7562bf49f425c5c2"}, + {file = "idna-3.4.tar.gz", hash = "sha256:814f528e8dead7d329833b91c5faa87d60bf71824cd12a7530b5526063d02cb4"}, +] +iniconfig = [ + {file = "iniconfig-1.1.1-py2.py3-none-any.whl", hash = "sha256:011e24c64b7f47f6ebd835bb12a743f2fbe9a26d4cecaa7f53bc4f35ee9da8b3"}, + {file = "iniconfig-1.1.1.tar.gz", hash = "sha256:bc3af051d7d14b2ee5ef9969666def0cd1a000e121eaea580d4a313df4b37f32"}, +] +isort = [ + {file = "isort-5.10.1-py3-none-any.whl", hash = "sha256:6f62d78e2f89b4500b080fe3a81690850cd254227f27f75c3a0c491a1f351ba7"}, + {file = "isort-5.10.1.tar.gz", hash = "sha256:e8443a5e7a020e9d7f97f1d7d9cd17c88bcb3bc7e218bf9cf5095fe550be2951"}, +] +lazy-object-proxy = [ + {file = "lazy-object-proxy-1.8.0.tar.gz", hash = "sha256:c219a00245af0f6fa4e95901ed28044544f50152840c5b6a3e7b2568db34d156"}, + {file = "lazy_object_proxy-1.8.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:4fd031589121ad46e293629b39604031d354043bb5cdf83da4e93c2d7f3389fe"}, + {file = "lazy_object_proxy-1.8.0-cp310-cp310-win32.whl", hash = "sha256:b70d6e7a332eb0217e7872a73926ad4fdc14f846e85ad6749ad111084e76df25"}, + {file = "lazy_object_proxy-1.8.0-cp310-cp310-win_amd64.whl", hash = "sha256:eb329f8d8145379bf5dbe722182410fe8863d186e51bf034d2075eb8d85ee25b"}, + {file = "lazy_object_proxy-1.8.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:4e2d9f764f1befd8bdc97673261b8bb888764dfdbd7a4d8f55e4fbcabb8c3fb7"}, + {file = "lazy_object_proxy-1.8.0-cp311-cp311-win32.whl", hash = "sha256:e20bfa6db17a39c706d24f82df8352488d2943a3b7ce7d4c22579cb89ca8896e"}, + {file = "lazy_object_proxy-1.8.0-cp311-cp311-win_amd64.whl", hash = "sha256:14010b49a2f56ec4943b6cf925f597b534ee2fe1f0738c84b3bce0c1a11ff10d"}, + {file = "lazy_object_proxy-1.8.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:6850e4aeca6d0df35bb06e05c8b934ff7c533734eb51d0ceb2d63696f1e6030c"}, + {file = "lazy_object_proxy-1.8.0-cp37-cp37m-win32.whl", hash = "sha256:5b51d6f3bfeb289dfd4e95de2ecd464cd51982fe6f00e2be1d0bf94864d58acd"}, + {file = "lazy_object_proxy-1.8.0-cp37-cp37m-win_amd64.whl", hash = "sha256:6f593f26c470a379cf7f5bc6db6b5f1722353e7bf937b8d0d0b3fba911998858"}, + {file = "lazy_object_proxy-1.8.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:0c1c7c0433154bb7c54185714c6929acc0ba04ee1b167314a779b9025517eada"}, + {file = "lazy_object_proxy-1.8.0-cp38-cp38-win32.whl", hash = "sha256:d176f392dbbdaacccf15919c77f526edf11a34aece58b55ab58539807b85436f"}, + {file = "lazy_object_proxy-1.8.0-cp38-cp38-win_amd64.whl", hash = "sha256:afcaa24e48bb23b3be31e329deb3f1858f1f1df86aea3d70cb5c8578bfe5261c"}, + {file = "lazy_object_proxy-1.8.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:71d9ae8a82203511a6f60ca5a1b9f8ad201cac0fc75038b2dc5fa519589c9288"}, + {file = "lazy_object_proxy-1.8.0-cp39-cp39-win32.whl", hash = "sha256:8f6ce2118a90efa7f62dd38c7dbfffd42f468b180287b748626293bf12ed468f"}, + {file = "lazy_object_proxy-1.8.0-cp39-cp39-win_amd64.whl", hash = "sha256:eac3a9a5ef13b332c059772fd40b4b1c3d45a3a2b05e33a361dee48e54a4dad0"}, + {file = "lazy_object_proxy-1.8.0-pp37-pypy37_pp73-any.whl", hash = "sha256:ae032743794fba4d171b5b67310d69176287b5bf82a21f588282406a79498891"}, + {file = "lazy_object_proxy-1.8.0-pp38-pypy38_pp73-any.whl", hash = "sha256:7e1561626c49cb394268edd00501b289053a652ed762c58e1081224c8d881cec"}, + {file = "lazy_object_proxy-1.8.0-pp39-pypy39_pp73-any.whl", hash = "sha256:ce58b2b3734c73e68f0e30e4e725264d4d6be95818ec0a0be4bb6bf9a7e79aa8"}, +] +mccabe = [ + {file = "mccabe-0.7.0-py2.py3-none-any.whl", hash = "sha256:6c2d30ab6be0e4a46919781807b4f0d834ebdd6c6e3dca0bda5a15f863427b6e"}, + {file = "mccabe-0.7.0.tar.gz", hash = "sha256:348e0240c33b60bbdf4e523192ef919f28cb2c3d7d5c7794f74009290f236325"}, +] +msgpack = [ + {file = "msgpack-1.0.4-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:4ab251d229d10498e9a2f3b1e68ef64cb393394ec477e3370c457f9430ce9250"}, + {file = "msgpack-1.0.4-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:112b0f93202d7c0fef0b7810d465fde23c746a2d482e1e2de2aafd2ce1492c88"}, + {file = "msgpack-1.0.4-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:002b5c72b6cd9b4bafd790f364b8480e859b4712e91f43014fe01e4f957b8467"}, + {file = "msgpack-1.0.4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:35bc0faa494b0f1d851fd29129b2575b2e26d41d177caacd4206d81502d4c6a6"}, + {file = "msgpack-1.0.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4733359808c56d5d7756628736061c432ded018e7a1dff2d35a02439043321aa"}, + {file = "msgpack-1.0.4-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:eb514ad14edf07a1dbe63761fd30f89ae79b42625731e1ccf5e1f1092950eaa6"}, + {file = "msgpack-1.0.4-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:c23080fdeec4716aede32b4e0ef7e213c7b1093eede9ee010949f2a418ced6ba"}, + {file = "msgpack-1.0.4-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:49565b0e3d7896d9ea71d9095df15b7f75a035c49be733051c34762ca95bbf7e"}, + {file = "msgpack-1.0.4-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:aca0f1644d6b5a73eb3e74d4d64d5d8c6c3d577e753a04c9e9c87d07692c58db"}, + {file = "msgpack-1.0.4-cp310-cp310-win32.whl", hash = "sha256:0dfe3947db5fb9ce52aaea6ca28112a170db9eae75adf9339a1aec434dc954ef"}, + {file = "msgpack-1.0.4-cp310-cp310-win_amd64.whl", hash = "sha256:4dea20515f660aa6b7e964433b1808d098dcfcabbebeaaad240d11f909298075"}, + {file = "msgpack-1.0.4-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:e83f80a7fec1a62cf4e6c9a660e39c7f878f603737a0cdac8c13131d11d97f52"}, + {file = "msgpack-1.0.4-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3c11a48cf5e59026ad7cb0dc29e29a01b5a66a3e333dc11c04f7e991fc5510a9"}, + {file = "msgpack-1.0.4-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1276e8f34e139aeff1c77a3cefb295598b504ac5314d32c8c3d54d24fadb94c9"}, + {file = "msgpack-1.0.4-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6c9566f2c39ccced0a38d37c26cc3570983b97833c365a6044edef3574a00c08"}, + {file = "msgpack-1.0.4-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:fcb8a47f43acc113e24e910399376f7277cf8508b27e5b88499f053de6b115a8"}, + {file = "msgpack-1.0.4-cp36-cp36m-musllinux_1_1_i686.whl", hash = "sha256:76ee788122de3a68a02ed6f3a16bbcd97bc7c2e39bd4d94be2f1821e7c4a64e6"}, + {file = "msgpack-1.0.4-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:0a68d3ac0104e2d3510de90a1091720157c319ceeb90d74f7b5295a6bee51bae"}, + {file = "msgpack-1.0.4-cp36-cp36m-win32.whl", hash = "sha256:85f279d88d8e833ec015650fd15ae5eddce0791e1e8a59165318f371158efec6"}, + {file = "msgpack-1.0.4-cp36-cp36m-win_amd64.whl", hash = "sha256:c1683841cd4fa45ac427c18854c3ec3cd9b681694caf5bff04edb9387602d661"}, + {file = "msgpack-1.0.4-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:a75dfb03f8b06f4ab093dafe3ddcc2d633259e6c3f74bb1b01996f5d8aa5868c"}, + {file = "msgpack-1.0.4-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9667bdfdf523c40d2511f0e98a6c9d3603be6b371ae9a238b7ef2dc4e7a427b0"}, + {file = "msgpack-1.0.4-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:11184bc7e56fd74c00ead4f9cc9a3091d62ecb96e97653add7a879a14b003227"}, + {file = "msgpack-1.0.4-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ac5bd7901487c4a1dd51a8c58f2632b15d838d07ceedaa5e4c080f7190925bff"}, + {file = "msgpack-1.0.4-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:1e91d641d2bfe91ba4c52039adc5bccf27c335356055825c7f88742c8bb900dd"}, + {file = "msgpack-1.0.4-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:2a2df1b55a78eb5f5b7d2a4bb221cd8363913830145fad05374a80bf0877cb1e"}, + {file = "msgpack-1.0.4-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:545e3cf0cf74f3e48b470f68ed19551ae6f9722814ea969305794645da091236"}, + {file = "msgpack-1.0.4-cp37-cp37m-win32.whl", hash = "sha256:2cc5ca2712ac0003bcb625c96368fd08a0f86bbc1a5578802512d87bc592fe44"}, + {file = "msgpack-1.0.4-cp37-cp37m-win_amd64.whl", hash = "sha256:eba96145051ccec0ec86611fe9cf693ce55f2a3ce89c06ed307de0e085730ec1"}, + {file = "msgpack-1.0.4-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:7760f85956c415578c17edb39eed99f9181a48375b0d4a94076d84148cf67b2d"}, + {file = "msgpack-1.0.4-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:449e57cc1ff18d3b444eb554e44613cffcccb32805d16726a5494038c3b93dab"}, + {file = "msgpack-1.0.4-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:d603de2b8d2ea3f3bcb2efe286849aa7a81531abc52d8454da12f46235092bcb"}, + {file = "msgpack-1.0.4-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:48f5d88c99f64c456413d74a975bd605a9b0526293218a3b77220a2c15458ba9"}, + {file = "msgpack-1.0.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6916c78f33602ecf0509cc40379271ba0f9ab572b066bd4bdafd7434dee4bc6e"}, + {file = "msgpack-1.0.4-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:81fc7ba725464651190b196f3cd848e8553d4d510114a954681fd0b9c479d7e1"}, + {file = "msgpack-1.0.4-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:d5b5b962221fa2c5d3a7f8133f9abffc114fe218eb4365e40f17732ade576c8e"}, + {file = "msgpack-1.0.4-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:77ccd2af37f3db0ea59fb280fa2165bf1b096510ba9fe0cc2bf8fa92a22fdb43"}, + {file = "msgpack-1.0.4-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:b17be2478b622939e39b816e0aa8242611cc8d3583d1cd8ec31b249f04623243"}, + {file = "msgpack-1.0.4-cp38-cp38-win32.whl", hash = "sha256:2bb8cdf50dd623392fa75525cce44a65a12a00c98e1e37bf0fb08ddce2ff60d2"}, + {file = "msgpack-1.0.4-cp38-cp38-win_amd64.whl", hash = "sha256:26b8feaca40a90cbe031b03d82b2898bf560027160d3eae1423f4a67654ec5d6"}, + {file = "msgpack-1.0.4-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:462497af5fd4e0edbb1559c352ad84f6c577ffbbb708566a0abaaa84acd9f3ae"}, + {file = "msgpack-1.0.4-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:2999623886c5c02deefe156e8f869c3b0aaeba14bfc50aa2486a0415178fce55"}, + {file = "msgpack-1.0.4-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:f0029245c51fd9473dc1aede1160b0a29f4a912e6b1dd353fa6d317085b219da"}, + {file = "msgpack-1.0.4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ed6f7b854a823ea44cf94919ba3f727e230da29feb4a99711433f25800cf747f"}, + {file = "msgpack-1.0.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0df96d6eaf45ceca04b3f3b4b111b86b33785683d682c655063ef8057d61fd92"}, + {file = "msgpack-1.0.4-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6a4192b1ab40f8dca3f2877b70e63799d95c62c068c84dc028b40a6cb03ccd0f"}, + {file = "msgpack-1.0.4-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:0e3590f9fb9f7fbc36df366267870e77269c03172d086fa76bb4eba8b2b46624"}, + {file = "msgpack-1.0.4-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:1576bd97527a93c44fa856770197dec00d223b0b9f36ef03f65bac60197cedf8"}, + {file = "msgpack-1.0.4-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:63e29d6e8c9ca22b21846234913c3466b7e4ee6e422f205a2988083de3b08cae"}, + {file = "msgpack-1.0.4-cp39-cp39-win32.whl", hash = "sha256:fb62ea4b62bfcb0b380d5680f9a4b3f9a2d166d9394e9bbd9666c0ee09a3645c"}, + {file = "msgpack-1.0.4-cp39-cp39-win_amd64.whl", hash = "sha256:4d5834a2a48965a349da1c5a79760d94a1a0172fbb5ab6b5b33cbf8447e109ce"}, + {file = "msgpack-1.0.4.tar.gz", hash = "sha256:f5d869c18f030202eb412f08b28d2afeea553d6613aee89e200d7aca7ef01f5f"}, +] +multidict = [ + {file = "multidict-6.0.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:0b9e95a740109c6047602f4db4da9949e6c5945cefbad34a1299775ddc9a62e2"}, + {file = "multidict-6.0.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:ac0e27844758d7177989ce406acc6a83c16ed4524ebc363c1f748cba184d89d3"}, + {file = "multidict-6.0.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:041b81a5f6b38244b34dc18c7b6aba91f9cdaf854d9a39e5ff0b58e2b5773b9c"}, + {file = "multidict-6.0.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5fdda29a3c7e76a064f2477c9aab1ba96fd94e02e386f1e665bca1807fc5386f"}, + {file = "multidict-6.0.2-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3368bf2398b0e0fcbf46d85795adc4c259299fec50c1416d0f77c0a843a3eed9"}, + {file = "multidict-6.0.2-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f4f052ee022928d34fe1f4d2bc743f32609fb79ed9c49a1710a5ad6b2198db20"}, + {file = "multidict-6.0.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:225383a6603c086e6cef0f2f05564acb4f4d5f019a4e3e983f572b8530f70c88"}, + {file = "multidict-6.0.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:50bd442726e288e884f7be9071016c15a8742eb689a593a0cac49ea093eef0a7"}, + {file = "multidict-6.0.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:47e6a7e923e9cada7c139531feac59448f1f47727a79076c0b1ee80274cd8eee"}, + {file = "multidict-6.0.2-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:0556a1d4ea2d949efe5fd76a09b4a82e3a4a30700553a6725535098d8d9fb672"}, + {file = "multidict-6.0.2-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:626fe10ac87851f4cffecee161fc6f8f9853f0f6f1035b59337a51d29ff3b4f9"}, + {file = "multidict-6.0.2-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:8064b7c6f0af936a741ea1efd18690bacfbae4078c0c385d7c3f611d11f0cf87"}, + {file = "multidict-6.0.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:2d36e929d7f6a16d4eb11b250719c39560dd70545356365b494249e2186bc389"}, + {file = "multidict-6.0.2-cp310-cp310-win32.whl", hash = "sha256:fcb91630817aa8b9bc4a74023e4198480587269c272c58b3279875ed7235c293"}, + {file = "multidict-6.0.2-cp310-cp310-win_amd64.whl", hash = "sha256:8cbf0132f3de7cc6c6ce00147cc78e6439ea736cee6bca4f068bcf892b0fd658"}, + {file = "multidict-6.0.2-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:05f6949d6169878a03e607a21e3b862eaf8e356590e8bdae4227eedadacf6e51"}, + {file = "multidict-6.0.2-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e2c2e459f7050aeb7c1b1276763364884595d47000c1cddb51764c0d8976e608"}, + {file = "multidict-6.0.2-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d0509e469d48940147e1235d994cd849a8f8195e0bca65f8f5439c56e17872a3"}, + {file = "multidict-6.0.2-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:514fe2b8d750d6cdb4712346a2c5084a80220821a3e91f3f71eec11cf8d28fd4"}, + {file = "multidict-6.0.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:19adcfc2a7197cdc3987044e3f415168fc5dc1f720c932eb1ef4f71a2067e08b"}, + {file = "multidict-6.0.2-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b9d153e7f1f9ba0b23ad1568b3b9e17301e23b042c23870f9ee0522dc5cc79e8"}, + {file = "multidict-6.0.2-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:aef9cc3d9c7d63d924adac329c33835e0243b5052a6dfcbf7732a921c6e918ba"}, + {file = "multidict-6.0.2-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:4571f1beddff25f3e925eea34268422622963cd8dc395bb8778eb28418248e43"}, + {file = "multidict-6.0.2-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:d48b8ee1d4068561ce8033d2c344cf5232cb29ee1a0206a7b828c79cbc5982b8"}, + {file = "multidict-6.0.2-cp37-cp37m-musllinux_1_1_s390x.whl", hash = "sha256:45183c96ddf61bf96d2684d9fbaf6f3564d86b34cb125761f9a0ef9e36c1d55b"}, + {file = "multidict-6.0.2-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:75bdf08716edde767b09e76829db8c1e5ca9d8bb0a8d4bd94ae1eafe3dac5e15"}, + {file = "multidict-6.0.2-cp37-cp37m-win32.whl", hash = "sha256:a45e1135cb07086833ce969555df39149680e5471c04dfd6a915abd2fc3f6dbc"}, + {file = "multidict-6.0.2-cp37-cp37m-win_amd64.whl", hash = "sha256:6f3cdef8a247d1eafa649085812f8a310e728bdf3900ff6c434eafb2d443b23a"}, + {file = "multidict-6.0.2-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:0327292e745a880459ef71be14e709aaea2f783f3537588fb4ed09b6c01bca60"}, + {file = "multidict-6.0.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:e875b6086e325bab7e680e4316d667fc0e5e174bb5611eb16b3ea121c8951b86"}, + {file = "multidict-6.0.2-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:feea820722e69451743a3d56ad74948b68bf456984d63c1a92e8347b7b88452d"}, + {file = "multidict-6.0.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9cc57c68cb9139c7cd6fc39f211b02198e69fb90ce4bc4a094cf5fe0d20fd8b0"}, + {file = "multidict-6.0.2-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:497988d6b6ec6ed6f87030ec03280b696ca47dbf0648045e4e1d28b80346560d"}, + {file = "multidict-6.0.2-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:89171b2c769e03a953d5969b2f272efa931426355b6c0cb508022976a17fd376"}, + {file = "multidict-6.0.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:684133b1e1fe91eda8fa7447f137c9490a064c6b7f392aa857bba83a28cfb693"}, + {file = "multidict-6.0.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:fd9fc9c4849a07f3635ccffa895d57abce554b467d611a5009ba4f39b78a8849"}, + {file = "multidict-6.0.2-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:e07c8e79d6e6fd37b42f3250dba122053fddb319e84b55dd3a8d6446e1a7ee49"}, + {file = "multidict-6.0.2-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:4070613ea2227da2bfb2c35a6041e4371b0af6b0be57f424fe2318b42a748516"}, + {file = "multidict-6.0.2-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:47fbeedbf94bed6547d3aa632075d804867a352d86688c04e606971595460227"}, + {file = "multidict-6.0.2-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:5774d9218d77befa7b70d836004a768fb9aa4fdb53c97498f4d8d3f67bb9cfa9"}, + {file = "multidict-6.0.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:2957489cba47c2539a8eb7ab32ff49101439ccf78eab724c828c1a54ff3ff98d"}, + {file = "multidict-6.0.2-cp38-cp38-win32.whl", hash = "sha256:e5b20e9599ba74391ca0cfbd7b328fcc20976823ba19bc573983a25b32e92b57"}, + {file = "multidict-6.0.2-cp38-cp38-win_amd64.whl", hash = "sha256:8004dca28e15b86d1b1372515f32eb6f814bdf6f00952699bdeb541691091f96"}, + {file = "multidict-6.0.2-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:2e4a0785b84fb59e43c18a015ffc575ba93f7d1dbd272b4cdad9f5134b8a006c"}, + {file = "multidict-6.0.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:6701bf8a5d03a43375909ac91b6980aea74b0f5402fbe9428fc3f6edf5d9677e"}, + {file = "multidict-6.0.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:a007b1638e148c3cfb6bf0bdc4f82776cef0ac487191d093cdc316905e504071"}, + {file = "multidict-6.0.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:07a017cfa00c9890011628eab2503bee5872f27144936a52eaab449be5eaf032"}, + {file = "multidict-6.0.2-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c207fff63adcdf5a485969131dc70e4b194327666b7e8a87a97fbc4fd80a53b2"}, + {file = "multidict-6.0.2-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:373ba9d1d061c76462d74e7de1c0c8e267e9791ee8cfefcf6b0b2495762c370c"}, + {file = "multidict-6.0.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bfba7c6d5d7c9099ba21f84662b037a0ffd4a5e6b26ac07d19e423e6fdf965a9"}, + {file = "multidict-6.0.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:19d9bad105dfb34eb539c97b132057a4e709919ec4dd883ece5838bcbf262b80"}, + {file = "multidict-6.0.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:de989b195c3d636ba000ee4281cd03bb1234635b124bf4cd89eeee9ca8fcb09d"}, + {file = "multidict-6.0.2-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:7c40b7bbece294ae3a87c1bc2abff0ff9beef41d14188cda94ada7bcea99b0fb"}, + {file = "multidict-6.0.2-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:d16cce709ebfadc91278a1c005e3c17dd5f71f5098bfae1035149785ea6e9c68"}, + {file = "multidict-6.0.2-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:a2c34a93e1d2aa35fbf1485e5010337c72c6791407d03aa5f4eed920343dd360"}, + {file = "multidict-6.0.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:feba80698173761cddd814fa22e88b0661e98cb810f9f986c54aa34d281e4937"}, + {file = "multidict-6.0.2-cp39-cp39-win32.whl", hash = "sha256:23b616fdc3c74c9fe01d76ce0d1ce872d2d396d8fa8e4899398ad64fb5aa214a"}, + {file = "multidict-6.0.2-cp39-cp39-win_amd64.whl", hash = "sha256:4bae31803d708f6f15fd98be6a6ac0b6958fcf68fda3c77a048a4f9073704aae"}, + {file = "multidict-6.0.2.tar.gz", hash = "sha256:5ff3bd75f38e4c43f1f470f2df7a4d430b821c4ce22be384e1459cb57d6bb013"}, +] +mypy-extensions = [ + {file = "mypy_extensions-0.4.3-py2.py3-none-any.whl", hash = "sha256:090fedd75945a69ae91ce1303b5824f428daf5a028d2f6ab8a299250a846f15d"}, + {file = "mypy_extensions-0.4.3.tar.gz", hash = "sha256:2d82818f5bb3e369420cb3c4060a7970edba416647068eb4c5343488a6c604a8"}, +] +nodeenv = [ + {file = "nodeenv-1.7.0-py2.py3-none-any.whl", hash = "sha256:27083a7b96a25f2f5e1d8cb4b6317ee8aeda3bdd121394e5ac54e498028a042e"}, + {file = "nodeenv-1.7.0.tar.gz", hash = "sha256:e0e7f7dfb85fc5394c6fe1e8fa98131a2473e04311a45afb6508f7cf1836fa2b"}, +] +packaging = [ + {file = "packaging-21.3-py3-none-any.whl", hash = "sha256:ef103e05f519cdc783ae24ea4e2e0f508a9c99b2d4969652eed6a2e1ea5bd522"}, + {file = "packaging-21.3.tar.gz", hash = "sha256:dd47c42927d89ab911e606518907cc2d3a1f38bbd026385970643f9c5b8ecfeb"}, +] +pathspec = [ + {file = "pathspec-0.10.1-py3-none-any.whl", hash = "sha256:46846318467efc4556ccfd27816e004270a9eeeeb4d062ce5e6fc7a87c573f93"}, + {file = "pathspec-0.10.1.tar.gz", hash = "sha256:7ace6161b621d31e7902eb6b5ae148d12cfd23f4a249b9ffb6b9fee12084323d"}, +] +pbr = [ + {file = "pbr-5.11.0-py2.py3-none-any.whl", hash = "sha256:db2317ff07c84c4c63648c9064a79fe9d9f5c7ce85a9099d4b6258b3db83225a"}, + {file = "pbr-5.11.0.tar.gz", hash = "sha256:b97bc6695b2aff02144133c2e7399d5885223d42b7912ffaec2ca3898e673bfe"}, +] +platformdirs = [ + {file = "platformdirs-2.5.2-py3-none-any.whl", hash = "sha256:027d8e83a2d7de06bbac4e5ef7e023c02b863d7ea5d079477e722bb41ab25788"}, + {file = "platformdirs-2.5.2.tar.gz", hash = "sha256:58c8abb07dcb441e6ee4b11d8df0ac856038f944ab98b7be6b27b2a3c7feef19"}, +] +pluggy = [ + {file = "pluggy-1.0.0-py2.py3-none-any.whl", hash = "sha256:74134bbf457f031a36d68416e1509f34bd5ccc019f0bcc952c7b909d06b37bd3"}, + {file = "pluggy-1.0.0.tar.gz", hash = "sha256:4224373bacce55f955a878bf9cfa763c1e360858e330072059e10bad68531159"}, +] +polywrap-client = [] +polywrap-core = [] +polywrap-manifest = [] +polywrap-msgpack = [] +polywrap-result = [] +polywrap-uri-resolvers = [] +polywrap-wasm = [] +py = [ + {file = "py-1.11.0-py2.py3-none-any.whl", hash = "sha256:607c53218732647dff4acdfcd50cb62615cedf612e72d1724fb1a0cc6405b378"}, + {file = "py-1.11.0.tar.gz", hash = "sha256:51c75c4126074b472f746a24399ad32f6053d1b34b68d2fa41e558e6f4a98719"}, +] +pycryptodome = [ + {file = "pycryptodome-3.15.0-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:ff7ae90e36c1715a54446e7872b76102baa5c63aa980917f4aa45e8c78d1a3ec"}, + {file = "pycryptodome-3.15.0-cp27-cp27m-manylinux1_i686.whl", hash = "sha256:2ffd8b31561455453ca9f62cb4c24e6b8d119d6d531087af5f14b64bee2c23e6"}, + {file = "pycryptodome-3.15.0-cp27-cp27m-manylinux1_x86_64.whl", hash = "sha256:2ea63d46157386c5053cfebcdd9bd8e0c8b7b0ac4a0507a027f5174929403884"}, + {file = "pycryptodome-3.15.0-cp27-cp27m-manylinux2010_i686.whl", hash = "sha256:7c9ed8aa31c146bef65d89a1b655f5f4eab5e1120f55fc297713c89c9e56ff0b"}, + {file = "pycryptodome-3.15.0-cp27-cp27m-manylinux2010_x86_64.whl", hash = "sha256:5099c9ca345b2f252f0c28e96904643153bae9258647585e5e6f649bb7a1844a"}, + {file = "pycryptodome-3.15.0-cp27-cp27m-manylinux2014_aarch64.whl", hash = "sha256:2ec709b0a58b539a4f9d33fb8508264c3678d7edb33a68b8906ba914f71e8c13"}, + {file = "pycryptodome-3.15.0-cp27-cp27m-win32.whl", hash = "sha256:fd2184aae6ee2a944aaa49113e6f5787cdc5e4db1eb8edb1aea914bd75f33a0c"}, + {file = "pycryptodome-3.15.0-cp27-cp27m-win_amd64.whl", hash = "sha256:7e3a8f6ee405b3bd1c4da371b93c31f7027944b2bcce0697022801db93120d83"}, + {file = "pycryptodome-3.15.0-cp27-cp27mu-manylinux1_i686.whl", hash = "sha256:b9c5b1a1977491533dfd31e01550ee36ae0249d78aae7f632590db833a5012b8"}, + {file = "pycryptodome-3.15.0-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:0926f7cc3735033061ef3cf27ed16faad6544b14666410727b31fea85a5b16eb"}, + {file = "pycryptodome-3.15.0-cp27-cp27mu-manylinux2010_i686.whl", hash = "sha256:2aa55aae81f935a08d5a3c2042eb81741a43e044bd8a81ea7239448ad751f763"}, + {file = "pycryptodome-3.15.0-cp27-cp27mu-manylinux2010_x86_64.whl", hash = "sha256:c3640deff4197fa064295aaac10ab49a0d55ef3d6a54ae1499c40d646655c89f"}, + {file = "pycryptodome-3.15.0-cp27-cp27mu-manylinux2014_aarch64.whl", hash = "sha256:045d75527241d17e6ef13636d845a12e54660aa82e823b3b3341bcf5af03fa79"}, + {file = "pycryptodome-3.15.0-cp35-abi3-macosx_10_9_x86_64.whl", hash = "sha256:9ee40e2168f1348ae476676a2e938ca80a2f57b14a249d8fe0d3cdf803e5a676"}, + {file = "pycryptodome-3.15.0-cp35-abi3-manylinux1_i686.whl", hash = "sha256:4c3ccad74eeb7b001f3538643c4225eac398c77d617ebb3e57571a897943c667"}, + {file = "pycryptodome-3.15.0-cp35-abi3-manylinux1_x86_64.whl", hash = "sha256:1b22bcd9ec55e9c74927f6b1f69843cb256fb5a465088ce62837f793d9ffea88"}, + {file = "pycryptodome-3.15.0-cp35-abi3-manylinux2010_i686.whl", hash = "sha256:57f565acd2f0cf6fb3e1ba553d0cb1f33405ec1f9c5ded9b9a0a5320f2c0bd3d"}, + {file = "pycryptodome-3.15.0-cp35-abi3-manylinux2010_x86_64.whl", hash = "sha256:4b52cb18b0ad46087caeb37a15e08040f3b4c2d444d58371b6f5d786d95534c2"}, + {file = "pycryptodome-3.15.0-cp35-abi3-manylinux2014_aarch64.whl", hash = "sha256:092a26e78b73f2530b8bd6b3898e7453ab2f36e42fd85097d705d6aba2ec3e5e"}, + {file = "pycryptodome-3.15.0-cp35-abi3-win32.whl", hash = "sha256:e244ab85c422260de91cda6379e8e986405b4f13dc97d2876497178707f87fc1"}, + {file = "pycryptodome-3.15.0-cp35-abi3-win_amd64.whl", hash = "sha256:c77126899c4b9c9827ddf50565e93955cb3996813c18900c16b2ea0474e130e9"}, + {file = "pycryptodome-3.15.0-pp27-pypy_73-macosx_10_9_x86_64.whl", hash = "sha256:9eaadc058106344a566dc51d3d3a758ab07f8edde013712bc8d22032a86b264f"}, + {file = "pycryptodome-3.15.0-pp27-pypy_73-manylinux1_x86_64.whl", hash = "sha256:ff287bcba9fbeb4f1cccc1f2e90a08d691480735a611ee83c80a7d74ad72b9d9"}, + {file = "pycryptodome-3.15.0-pp27-pypy_73-manylinux2010_x86_64.whl", hash = "sha256:60b4faae330c3624cc5a546ba9cfd7b8273995a15de94ee4538130d74953ec2e"}, + {file = "pycryptodome-3.15.0-pp27-pypy_73-win32.whl", hash = "sha256:a8f06611e691c2ce45ca09bbf983e2ff2f8f4f87313609d80c125aff9fad6e7f"}, + {file = "pycryptodome-3.15.0-pp36-pypy36_pp73-macosx_10_9_x86_64.whl", hash = "sha256:b9cc96e274b253e47ad33ae1fccc36ea386f5251a823ccb50593a935db47fdd2"}, + {file = "pycryptodome-3.15.0-pp36-pypy36_pp73-manylinux1_x86_64.whl", hash = "sha256:ecaaef2d21b365d9c5ca8427ffc10cebed9d9102749fd502218c23cb9a05feb5"}, + {file = "pycryptodome-3.15.0-pp36-pypy36_pp73-manylinux2010_x86_64.whl", hash = "sha256:d2a39a66057ab191e5c27211a7daf8f0737f23acbf6b3562b25a62df65ffcb7b"}, + {file = "pycryptodome-3.15.0-pp36-pypy36_pp73-win32.whl", hash = "sha256:9c772c485b27967514d0df1458b56875f4b6d025566bf27399d0c239ff1b369f"}, + {file = "pycryptodome-3.15.0.tar.gz", hash = "sha256:9135dddad504592bcc18b0d2d95ce86c3a5ea87ec6447ef25cfedea12d6018b8"}, +] +pydantic = [ + {file = "pydantic-1.10.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:bb6ad4489af1bac6955d38ebcb95079a836af31e4c4f74aba1ca05bb9f6027bd"}, + {file = "pydantic-1.10.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:a1f5a63a6dfe19d719b1b6e6106561869d2efaca6167f84f5ab9347887d78b98"}, + {file = "pydantic-1.10.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:352aedb1d71b8b0736c6d56ad2bd34c6982720644b0624462059ab29bd6e5912"}, + {file = "pydantic-1.10.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:19b3b9ccf97af2b7519c42032441a891a5e05c68368f40865a90eb88833c2559"}, + {file = "pydantic-1.10.2-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:e9069e1b01525a96e6ff49e25876d90d5a563bc31c658289a8772ae186552236"}, + {file = "pydantic-1.10.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:355639d9afc76bcb9b0c3000ddcd08472ae75318a6eb67a15866b87e2efa168c"}, + {file = "pydantic-1.10.2-cp310-cp310-win_amd64.whl", hash = "sha256:ae544c47bec47a86bc7d350f965d8b15540e27e5aa4f55170ac6a75e5f73b644"}, + {file = "pydantic-1.10.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:a4c805731c33a8db4b6ace45ce440c4ef5336e712508b4d9e1aafa617dc9907f"}, + {file = "pydantic-1.10.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:d49f3db871575e0426b12e2f32fdb25e579dea16486a26e5a0474af87cb1ab0a"}, + {file = "pydantic-1.10.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:37c90345ec7dd2f1bcef82ce49b6235b40f282b94d3eec47e801baf864d15525"}, + {file = "pydantic-1.10.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7b5ba54d026c2bd2cb769d3468885f23f43710f651688e91f5fb1edcf0ee9283"}, + {file = "pydantic-1.10.2-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:05e00dbebbe810b33c7a7362f231893183bcc4251f3f2ff991c31d5c08240c42"}, + {file = "pydantic-1.10.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:2d0567e60eb01bccda3a4df01df677adf6b437958d35c12a3ac3e0f078b0ee52"}, + {file = "pydantic-1.10.2-cp311-cp311-win_amd64.whl", hash = "sha256:c6f981882aea41e021f72779ce2a4e87267458cc4d39ea990729e21ef18f0f8c"}, + {file = "pydantic-1.10.2-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:c4aac8e7103bf598373208f6299fa9a5cfd1fc571f2d40bf1dd1955a63d6eeb5"}, + {file = "pydantic-1.10.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:81a7b66c3f499108b448f3f004801fcd7d7165fb4200acb03f1c2402da73ce4c"}, + {file = "pydantic-1.10.2-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:bedf309630209e78582ffacda64a21f96f3ed2e51fbf3962d4d488e503420254"}, + {file = "pydantic-1.10.2-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:9300fcbebf85f6339a02c6994b2eb3ff1b9c8c14f502058b5bf349d42447dcf5"}, + {file = "pydantic-1.10.2-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:216f3bcbf19c726b1cc22b099dd409aa371f55c08800bcea4c44c8f74b73478d"}, + {file = "pydantic-1.10.2-cp37-cp37m-win_amd64.whl", hash = "sha256:dd3f9a40c16daf323cf913593083698caee97df2804aa36c4b3175d5ac1b92a2"}, + {file = "pydantic-1.10.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:b97890e56a694486f772d36efd2ba31612739bc6f3caeee50e9e7e3ebd2fdd13"}, + {file = "pydantic-1.10.2-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:9cabf4a7f05a776e7793e72793cd92cc865ea0e83a819f9ae4ecccb1b8aa6116"}, + {file = "pydantic-1.10.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:06094d18dd5e6f2bbf93efa54991c3240964bb663b87729ac340eb5014310624"}, + {file = "pydantic-1.10.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:cc78cc83110d2f275ec1970e7a831f4e371ee92405332ebfe9860a715f8336e1"}, + {file = "pydantic-1.10.2-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:1ee433e274268a4b0c8fde7ad9d58ecba12b069a033ecc4645bb6303c062d2e9"}, + {file = "pydantic-1.10.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:7c2abc4393dea97a4ccbb4ec7d8658d4e22c4765b7b9b9445588f16c71ad9965"}, + {file = "pydantic-1.10.2-cp38-cp38-win_amd64.whl", hash = "sha256:0b959f4d8211fc964772b595ebb25f7652da3f22322c007b6fed26846a40685e"}, + {file = "pydantic-1.10.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:c33602f93bfb67779f9c507e4d69451664524389546bacfe1bee13cae6dc7488"}, + {file = "pydantic-1.10.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:5760e164b807a48a8f25f8aa1a6d857e6ce62e7ec83ea5d5c5a802eac81bad41"}, + {file = "pydantic-1.10.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6eb843dcc411b6a2237a694f5e1d649fc66c6064d02b204a7e9d194dff81eb4b"}, + {file = "pydantic-1.10.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4b8795290deaae348c4eba0cebb196e1c6b98bdbe7f50b2d0d9a4a99716342fe"}, + {file = "pydantic-1.10.2-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:e0bedafe4bc165ad0a56ac0bd7695df25c50f76961da29c050712596cf092d6d"}, + {file = "pydantic-1.10.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:2e05aed07fa02231dbf03d0adb1be1d79cabb09025dd45aa094aa8b4e7b9dcda"}, + {file = "pydantic-1.10.2-cp39-cp39-win_amd64.whl", hash = "sha256:c1ba1afb396148bbc70e9eaa8c06c1716fdddabaf86e7027c5988bae2a829ab6"}, + {file = "pydantic-1.10.2-py3-none-any.whl", hash = "sha256:1b6ee725bd6e83ec78b1aa32c5b1fa67a3a65badddde3976bca5fe4568f27709"}, + {file = "pydantic-1.10.2.tar.gz", hash = "sha256:91b8e218852ef6007c2b98cd861601c6a09f1aa32bbbb74fab5b1c33d4a1e410"}, +] +pydocstyle = [ + {file = "pydocstyle-6.1.1-py3-none-any.whl", hash = "sha256:6987826d6775056839940041beef5c08cc7e3d71d63149b48e36727f70144dc4"}, + {file = "pydocstyle-6.1.1.tar.gz", hash = "sha256:1d41b7c459ba0ee6c345f2eb9ae827cab14a7533a88c5c6f7e94923f72df92dc"}, +] +pylint = [ + {file = "pylint-2.15.5-py3-none-any.whl", hash = "sha256:c2108037eb074334d9e874dc3c783752cc03d0796c88c9a9af282d0f161a1004"}, + {file = "pylint-2.15.5.tar.gz", hash = "sha256:3b120505e5af1d06a5ad76b55d8660d44bf0f2fc3c59c2bdd94e39188ee3a4df"}, +] +pyparsing = [ + {file = "pyparsing-3.0.9-py3-none-any.whl", hash = "sha256:5026bae9a10eeaefb61dab2f09052b9f4307d44aee4eda64b309723d8d206bbc"}, + {file = "pyparsing-3.0.9.tar.gz", hash = "sha256:2b020ecf7d21b687f219b71ecad3631f644a47f01403fa1d1036b0c6416d70fb"}, +] +pyright = [ + {file = "pyright-1.1.277-py3-none-any.whl", hash = "sha256:de7e2f533771d94e5db722cbdb0db9eafe250395b00cf2baa1ac969343ec23b0"}, + {file = "pyright-1.1.277.tar.gz", hash = "sha256:38975508f2a3ef846db16466c659a37ad18c741113bc46bcdf6a7250b550cdc8"}, +] +pysha3 = [ + {file = "pysha3-1.0.2-cp27-cp27m-manylinux1_i686.whl", hash = "sha256:6e6a84efb7856f5d760ee55cd2b446972cb7b835676065f6c4f694913ea8f8d9"}, + {file = "pysha3-1.0.2-cp27-cp27m-manylinux1_x86_64.whl", hash = "sha256:f9046d59b3e72aa84f6dae83a040bd1184ebd7fef4e822d38186a8158c89e3cf"}, + {file = "pysha3-1.0.2-cp27-cp27m-win32.whl", hash = "sha256:9fdd28884c5d0b4edfed269b12badfa07f1c89dbc5c9c66dd279833894a9896b"}, + {file = "pysha3-1.0.2-cp27-cp27m-win_amd64.whl", hash = "sha256:41be70b06c8775a9e4d4eeb52f2f6a3f356f17539a54eac61f43a29e42fd453d"}, + {file = "pysha3-1.0.2-cp27-cp27mu-manylinux1_i686.whl", hash = "sha256:68c3a60a39f9179b263d29e221c1bd6e01353178b14323c39cc70593c30f21c5"}, + {file = "pysha3-1.0.2-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:59111c08b8f34495575d12e5f2ce3bafb98bea470bc81e70c8b6df99aef0dd2f"}, + {file = "pysha3-1.0.2-cp33-cp33m-win32.whl", hash = "sha256:571a246308a7b63f15f5aa9651f99cf30f2a6acba18eddf28f1510935968b603"}, + {file = "pysha3-1.0.2-cp33-cp33m-win_amd64.whl", hash = "sha256:93abd775dac570cb9951c4e423bcb2bc6303a9d1dc0dc2b7afa2dd401d195b24"}, + {file = "pysha3-1.0.2-cp34-cp34m-manylinux1_i686.whl", hash = "sha256:11a2ba7a2e1d9669d0052fc8fb30f5661caed5512586ecbeeaf6bf9478ab5c48"}, + {file = "pysha3-1.0.2-cp34-cp34m-manylinux1_x86_64.whl", hash = "sha256:5ec8da7c5c70a53b5fa99094af3ba8d343955b212bc346a0d25f6ff75853999f"}, + {file = "pysha3-1.0.2-cp34-cp34m-win32.whl", hash = "sha256:9c778fa8b161dc9348dc5cc361e94d54aa5ff18413788f4641f6600d4893a608"}, + {file = "pysha3-1.0.2-cp34-cp34m-win_amd64.whl", hash = "sha256:fd7e66999060d079e9c0e8893e78d8017dad4f59721f6fe0be6307cd32127a07"}, + {file = "pysha3-1.0.2-cp35-cp35m-manylinux1_i686.whl", hash = "sha256:827b308dc025efe9b6b7bae36c2e09ed0118a81f792d888548188e97b9bf9a3d"}, + {file = "pysha3-1.0.2-cp35-cp35m-manylinux1_x86_64.whl", hash = "sha256:4416f16b0f1605c25f627966f76873e432971824778b369bd9ce1bb63d6566d9"}, + {file = "pysha3-1.0.2-cp35-cp35m-win32.whl", hash = "sha256:c93a2676e6588abcfaecb73eb14485c81c63b94fca2000a811a7b4fb5937b8e8"}, + {file = "pysha3-1.0.2-cp35-cp35m-win_amd64.whl", hash = "sha256:684cb01d87ed6ff466c135f1c83e7e4042d0fc668fa20619f581e6add1d38d77"}, + {file = "pysha3-1.0.2-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:386998ee83e313b6911327174e088021f9f2061cbfa1651b97629b761e9ef5c4"}, + {file = "pysha3-1.0.2-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:c7c2adcc43836223680ebdf91f1d3373543dc32747c182c8ca2e02d1b69ce030"}, + {file = "pysha3-1.0.2-cp36-cp36m-win32.whl", hash = "sha256:cd5c961b603bd2e6c2b5ef9976f3238a561c58569945d4165efb9b9383b050ef"}, + {file = "pysha3-1.0.2-cp36-cp36m-win_amd64.whl", hash = "sha256:0060a66be16665d90c432f55a0ba1f6480590cfb7d2ad389e688a399183474f0"}, + {file = "pysha3-1.0.2.tar.gz", hash = "sha256:fe988e73f2ce6d947220624f04d467faf05f1bbdbc64b0a201296bb3af92739e"}, +] +pytest = [ + {file = "pytest-7.2.0-py3-none-any.whl", hash = "sha256:892f933d339f068883b6fd5a459f03d85bfcb355e4981e146d2c7616c21fef71"}, + {file = "pytest-7.2.0.tar.gz", hash = "sha256:c4014eb40e10f11f355ad4e3c2fb2c6c6d1919c73f3b5a433de4708202cade59"}, +] +pytest-asyncio = [ + {file = "pytest-asyncio-0.19.0.tar.gz", hash = "sha256:ac4ebf3b6207259750bc32f4c1d8fcd7e79739edbc67ad0c58dd150b1d072fed"}, + {file = "pytest_asyncio-0.19.0-py3-none-any.whl", hash = "sha256:7a97e37cfe1ed296e2e84941384bdd37c376453912d397ed39293e0916f521fa"}, +] +PyYAML = [ + {file = "PyYAML-6.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:d4db7c7aef085872ef65a8fd7d6d09a14ae91f691dec3e87ee5ee0539d516f53"}, + {file = "PyYAML-6.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:9df7ed3b3d2e0ecfe09e14741b857df43adb5a3ddadc919a2d94fbdf78fea53c"}, + {file = "PyYAML-6.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:77f396e6ef4c73fdc33a9157446466f1cff553d979bd00ecb64385760c6babdc"}, + {file = "PyYAML-6.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a80a78046a72361de73f8f395f1f1e49f956c6be882eed58505a15f3e430962b"}, + {file = "PyYAML-6.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:f84fbc98b019fef2ee9a1cb3ce93e3187a6df0b2538a651bfb890254ba9f90b5"}, + {file = "PyYAML-6.0-cp310-cp310-win32.whl", hash = "sha256:2cd5df3de48857ed0544b34e2d40e9fac445930039f3cfe4bcc592a1f836d513"}, + {file = "PyYAML-6.0-cp310-cp310-win_amd64.whl", hash = "sha256:daf496c58a8c52083df09b80c860005194014c3698698d1a57cbcfa182142a3a"}, + {file = "PyYAML-6.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:d4b0ba9512519522b118090257be113b9468d804b19d63c71dbcf4a48fa32358"}, + {file = "PyYAML-6.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:81957921f441d50af23654aa6c5e5eaf9b06aba7f0a19c18a538dc7ef291c5a1"}, + {file = "PyYAML-6.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:afa17f5bc4d1b10afd4466fd3a44dc0e245382deca5b3c353d8b757f9e3ecb8d"}, + {file = "PyYAML-6.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:dbad0e9d368bb989f4515da330b88a057617d16b6a8245084f1b05400f24609f"}, + {file = "PyYAML-6.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:432557aa2c09802be39460360ddffd48156e30721f5e8d917f01d31694216782"}, + {file = "PyYAML-6.0-cp311-cp311-win32.whl", hash = "sha256:bfaef573a63ba8923503d27530362590ff4f576c626d86a9fed95822a8255fd7"}, + {file = "PyYAML-6.0-cp311-cp311-win_amd64.whl", hash = "sha256:01b45c0191e6d66c470b6cf1b9531a771a83c1c4208272ead47a3ae4f2f603bf"}, + {file = "PyYAML-6.0-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:897b80890765f037df3403d22bab41627ca8811ae55e9a722fd0392850ec4d86"}, + {file = "PyYAML-6.0-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:50602afada6d6cbfad699b0c7bb50d5ccffa7e46a3d738092afddc1f9758427f"}, + {file = "PyYAML-6.0-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:48c346915c114f5fdb3ead70312bd042a953a8ce5c7106d5bfb1a5254e47da92"}, + {file = "PyYAML-6.0-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:98c4d36e99714e55cfbaaee6dd5badbc9a1ec339ebfc3b1f52e293aee6bb71a4"}, + {file = "PyYAML-6.0-cp36-cp36m-win32.whl", hash = "sha256:0283c35a6a9fbf047493e3a0ce8d79ef5030852c51e9d911a27badfde0605293"}, + {file = "PyYAML-6.0-cp36-cp36m-win_amd64.whl", hash = "sha256:07751360502caac1c067a8132d150cf3d61339af5691fe9e87803040dbc5db57"}, + {file = "PyYAML-6.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:819b3830a1543db06c4d4b865e70ded25be52a2e0631ccd2f6a47a2822f2fd7c"}, + {file = "PyYAML-6.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:473f9edb243cb1935ab5a084eb238d842fb8f404ed2193a915d1784b5a6b5fc0"}, + {file = "PyYAML-6.0-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:0ce82d761c532fe4ec3f87fc45688bdd3a4c1dc5e0b4a19814b9009a29baefd4"}, + {file = "PyYAML-6.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:231710d57adfd809ef5d34183b8ed1eeae3f76459c18fb4a0b373ad56bedcdd9"}, + {file = "PyYAML-6.0-cp37-cp37m-win32.whl", hash = "sha256:c5687b8d43cf58545ade1fe3e055f70eac7a5a1a0bf42824308d868289a95737"}, + {file = "PyYAML-6.0-cp37-cp37m-win_amd64.whl", hash = "sha256:d15a181d1ecd0d4270dc32edb46f7cb7733c7c508857278d3d378d14d606db2d"}, + {file = "PyYAML-6.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:0b4624f379dab24d3725ffde76559cff63d9ec94e1736b556dacdfebe5ab6d4b"}, + {file = "PyYAML-6.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:213c60cd50106436cc818accf5baa1aba61c0189ff610f64f4a3e8c6726218ba"}, + {file = "PyYAML-6.0-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9fa600030013c4de8165339db93d182b9431076eb98eb40ee068700c9c813e34"}, + {file = "PyYAML-6.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:277a0ef2981ca40581a47093e9e2d13b3f1fbbeffae064c1d21bfceba2030287"}, + {file = "PyYAML-6.0-cp38-cp38-win32.whl", hash = "sha256:d4eccecf9adf6fbcc6861a38015c2a64f38b9d94838ac1810a9023a0609e1b78"}, + {file = "PyYAML-6.0-cp38-cp38-win_amd64.whl", hash = "sha256:1e4747bc279b4f613a09eb64bba2ba602d8a6664c6ce6396a4d0cd413a50ce07"}, + {file = "PyYAML-6.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:055d937d65826939cb044fc8c9b08889e8c743fdc6a32b33e2390f66013e449b"}, + {file = "PyYAML-6.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:e61ceaab6f49fb8bdfaa0f92c4b57bcfbea54c09277b1b4f7ac376bfb7a7c174"}, + {file = "PyYAML-6.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d67d839ede4ed1b28a4e8909735fc992a923cdb84e618544973d7dfc71540803"}, + {file = "PyYAML-6.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:cba8c411ef271aa037d7357a2bc8f9ee8b58b9965831d9e51baf703280dc73d3"}, + {file = "PyYAML-6.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:40527857252b61eacd1d9af500c3337ba8deb8fc298940291486c465c8b46ec0"}, + {file = "PyYAML-6.0-cp39-cp39-win32.whl", hash = "sha256:b5b9eccad747aabaaffbc6064800670f0c297e52c12754eb1d976c57e4f74dcb"}, + {file = "PyYAML-6.0-cp39-cp39-win_amd64.whl", hash = "sha256:b3d267842bf12586ba6c734f89d1f5b871df0273157918b0ccefa29deb05c21c"}, + {file = "PyYAML-6.0.tar.gz", hash = "sha256:68fb519c14306fec9720a2a5b45bc9f0c8d1b9c72adf45c37baedfcd949c35a2"}, +] +result = [ + {file = "result-0.8.0-py3-none-any.whl", hash = "sha256:d6a6258f32c057a4e0478999c6ce43dcadaf8ea435f58ac601ae2768f93ef243"}, + {file = "result-0.8.0.tar.gz", hash = "sha256:c48c909e92181a075ba358228a3fe161e26d205dad416ad81f27f23515a5626d"}, +] +setuptools = [ + {file = "setuptools-65.5.0-py3-none-any.whl", hash = "sha256:f62ea9da9ed6289bfe868cd6845968a2c854d1427f8548d52cae02a42b4f0356"}, + {file = "setuptools-65.5.0.tar.gz", hash = "sha256:512e5536220e38146176efb833d4a62aa726b7bbff82cfbc8ba9eaa3996e0b17"}, +] +six = [ + {file = "six-1.16.0-py2.py3-none-any.whl", hash = "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"}, + {file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"}, +] +smmap = [ + {file = "smmap-5.0.0-py3-none-any.whl", hash = "sha256:2aba19d6a040e78d8b09de5c57e96207b09ed71d8e55ce0959eeee6c8e190d94"}, + {file = "smmap-5.0.0.tar.gz", hash = "sha256:c840e62059cd3be204b0c9c9f74be2c09d5648eddd4580d9314c3ecde0b30936"}, +] +snowballstemmer = [ + {file = "snowballstemmer-2.2.0-py2.py3-none-any.whl", hash = "sha256:c8e1716e83cc398ae16824e5572ae04e0d9fc2c6b985fb0f900f5f0c96ecba1a"}, + {file = "snowballstemmer-2.2.0.tar.gz", hash = "sha256:09b16deb8547d3412ad7b590689584cd0fe25ec8db3be37788be3810cbf19cb1"}, +] +stevedore = [ + {file = "stevedore-4.1.0-py3-none-any.whl", hash = "sha256:3b1cbd592a87315f000d05164941ee5e164899f8fc0ce9a00bb0f321f40ef93e"}, + {file = "stevedore-4.1.0.tar.gz", hash = "sha256:02518a8f0d6d29be8a445b7f2ac63753ff29e8f2a2faa01777568d5500d777a6"}, +] +toml = [ + {file = "toml-0.10.2-py2.py3-none-any.whl", hash = "sha256:806143ae5bfb6a3c6e736a764057db0e6a0e05e338b5630894a5f779cabb4f9b"}, + {file = "toml-0.10.2.tar.gz", hash = "sha256:b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f"}, +] +tomli = [ + {file = "tomli-2.0.1-py3-none-any.whl", hash = "sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc"}, + {file = "tomli-2.0.1.tar.gz", hash = "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"}, +] +tomlkit = [ + {file = "tomlkit-0.11.6-py3-none-any.whl", hash = "sha256:07de26b0d8cfc18f871aec595fda24d95b08fef89d147caa861939f37230bf4b"}, + {file = "tomlkit-0.11.6.tar.gz", hash = "sha256:71b952e5721688937fb02cf9d354dbcf0785066149d2855e44531ebdd2b65d73"}, +] +tox = [ + {file = "tox-3.27.0-py2.py3-none-any.whl", hash = "sha256:89e4bc6df3854e9fc5582462e328dd3660d7d865ba625ae5881bbc63836a6324"}, + {file = "tox-3.27.0.tar.gz", hash = "sha256:d2c945f02a03d4501374a3d5430877380deb69b218b1df9b7f1d2f2a10befaf9"}, +] +tox-poetry = [ + {file = "tox-poetry-0.4.1.tar.gz", hash = "sha256:2395808e1ce487b5894c10f2202e14702bfa6d6909c0d1e525170d14809ac7ef"}, + {file = "tox_poetry-0.4.1-py2.py3-none-any.whl", hash = "sha256:11d9cd4e51d4cd9484b3ba63f2650ab4cfb4096e5f0682ecf561ddfc3c8e8c92"}, +] +typing-extensions = [ + {file = "typing_extensions-4.4.0-py3-none-any.whl", hash = "sha256:16fa4864408f655d35ec496218b85f79b3437c829e93320c7c9215ccfd92489e"}, + {file = "typing_extensions-4.4.0.tar.gz", hash = "sha256:1511434bb92bf8dd198c12b1cc812e800d4181cfcb867674e0f8279cc93087aa"}, +] +unsync = [ + {file = "unsync-1.4.0.tar.gz", hash = "sha256:a29e0f8952ffb0b3a0453ce436819a5a1ba2febbb5caa707c319f6f98d35f3c5"}, +] +virtualenv = [ + {file = "virtualenv-20.16.6-py3-none-any.whl", hash = "sha256:186ca84254abcbde98180fd17092f9628c5fe742273c02724972a1d8a2035108"}, + {file = "virtualenv-20.16.6.tar.gz", hash = "sha256:530b850b523c6449406dfba859d6345e48ef19b8439606c5d74d7d3c9e14d76e"}, +] +wasmtime = [ + {file = "wasmtime-1.0.1-py3-none-any.whl", hash = "sha256:20c1df95a3506408dcf2116502720e7cb248f1e98122b868932dbc9bbacb4ebd"}, + {file = "wasmtime-1.0.1-py3-none-macosx_10_13_x86_64.whl", hash = "sha256:9ccb42db2511b49c805b23a87e7c191d34112a9568292d475ec966204ac42bc3"}, + {file = "wasmtime-1.0.1-py3-none-macosx_11_0_arm64.whl", hash = "sha256:439960f6fb2a48482c8f7beaa2b491ce684f1599d9bfdd519b5320305edc2f39"}, + {file = "wasmtime-1.0.1-py3-none-manylinux1_x86_64.whl", hash = "sha256:b257ec11ba6d39e3cd9eed4f90c4633bcf3b964219948254244347236fe45172"}, + {file = "wasmtime-1.0.1-py3-none-manylinux2014_aarch64.whl", hash = "sha256:f34ac6db5f91ab359566f531dca7c53d2e63f657d5b10ec9cf53d1c29ac718c0"}, + {file = "wasmtime-1.0.1-py3-none-win_amd64.whl", hash = "sha256:0ae7e2d43a5d9da72a884a695049d7b1773717ba059bdb0ad0369e5c1e03a388"}, +] +wrapt = [ + {file = "wrapt-1.14.1-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:1b376b3f4896e7930f1f772ac4b064ac12598d1c38d04907e696cc4d794b43d3"}, + {file = "wrapt-1.14.1-cp27-cp27m-manylinux1_i686.whl", hash = "sha256:903500616422a40a98a5a3c4ff4ed9d0066f3b4c951fa286018ecdf0750194ef"}, + {file = "wrapt-1.14.1-cp27-cp27m-manylinux1_x86_64.whl", hash = "sha256:5a9a0d155deafd9448baff28c08e150d9b24ff010e899311ddd63c45c2445e28"}, + {file = "wrapt-1.14.1-cp27-cp27m-manylinux2010_i686.whl", hash = "sha256:ddaea91abf8b0d13443f6dac52e89051a5063c7d014710dcb4d4abb2ff811a59"}, + {file = "wrapt-1.14.1-cp27-cp27m-manylinux2010_x86_64.whl", hash = "sha256:36f582d0c6bc99d5f39cd3ac2a9062e57f3cf606ade29a0a0d6b323462f4dd87"}, + {file = "wrapt-1.14.1-cp27-cp27mu-manylinux1_i686.whl", hash = "sha256:7ef58fb89674095bfc57c4069e95d7a31cfdc0939e2a579882ac7d55aadfd2a1"}, + {file = "wrapt-1.14.1-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:e2f83e18fe2f4c9e7db597e988f72712c0c3676d337d8b101f6758107c42425b"}, + {file = "wrapt-1.14.1-cp27-cp27mu-manylinux2010_i686.whl", hash = "sha256:ee2b1b1769f6707a8a445162ea16dddf74285c3964f605877a20e38545c3c462"}, + {file = "wrapt-1.14.1-cp27-cp27mu-manylinux2010_x86_64.whl", hash = "sha256:833b58d5d0b7e5b9832869f039203389ac7cbf01765639c7309fd50ef619e0b1"}, + {file = "wrapt-1.14.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:80bb5c256f1415f747011dc3604b59bc1f91c6e7150bd7db03b19170ee06b320"}, + {file = "wrapt-1.14.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:07f7a7d0f388028b2df1d916e94bbb40624c59b48ecc6cbc232546706fac74c2"}, + {file = "wrapt-1.14.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:02b41b633c6261feff8ddd8d11c711df6842aba629fdd3da10249a53211a72c4"}, + {file = "wrapt-1.14.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2fe803deacd09a233e4762a1adcea5db5d31e6be577a43352936179d14d90069"}, + {file = "wrapt-1.14.1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:257fd78c513e0fb5cdbe058c27a0624c9884e735bbd131935fd49e9fe719d310"}, + {file = "wrapt-1.14.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:4fcc4649dc762cddacd193e6b55bc02edca674067f5f98166d7713b193932b7f"}, + {file = "wrapt-1.14.1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:11871514607b15cfeb87c547a49bca19fde402f32e2b1c24a632506c0a756656"}, + {file = "wrapt-1.14.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:8ad85f7f4e20964db4daadcab70b47ab05c7c1cf2a7c1e51087bfaa83831854c"}, + {file = "wrapt-1.14.1-cp310-cp310-win32.whl", hash = "sha256:a9a52172be0b5aae932bef82a79ec0a0ce87288c7d132946d645eba03f0ad8a8"}, + {file = "wrapt-1.14.1-cp310-cp310-win_amd64.whl", hash = "sha256:6d323e1554b3d22cfc03cd3243b5bb815a51f5249fdcbb86fda4bf62bab9e164"}, + {file = "wrapt-1.14.1-cp35-cp35m-manylinux1_i686.whl", hash = "sha256:43ca3bbbe97af00f49efb06e352eae40434ca9d915906f77def219b88e85d907"}, + {file = "wrapt-1.14.1-cp35-cp35m-manylinux1_x86_64.whl", hash = "sha256:6b1a564e6cb69922c7fe3a678b9f9a3c54e72b469875aa8018f18b4d1dd1adf3"}, + {file = "wrapt-1.14.1-cp35-cp35m-manylinux2010_i686.whl", hash = "sha256:00b6d4ea20a906c0ca56d84f93065b398ab74b927a7a3dbd470f6fc503f95dc3"}, + {file = "wrapt-1.14.1-cp35-cp35m-manylinux2010_x86_64.whl", hash = "sha256:a85d2b46be66a71bedde836d9e41859879cc54a2a04fad1191eb50c2066f6e9d"}, + {file = "wrapt-1.14.1-cp35-cp35m-win32.whl", hash = "sha256:dbcda74c67263139358f4d188ae5faae95c30929281bc6866d00573783c422b7"}, + {file = "wrapt-1.14.1-cp35-cp35m-win_amd64.whl", hash = "sha256:b21bb4c09ffabfa0e85e3a6b623e19b80e7acd709b9f91452b8297ace2a8ab00"}, + {file = "wrapt-1.14.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:9e0fd32e0148dd5dea6af5fee42beb949098564cc23211a88d799e434255a1f4"}, + {file = "wrapt-1.14.1-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9736af4641846491aedb3c3f56b9bc5568d92b0692303b5a305301a95dfd38b1"}, + {file = "wrapt-1.14.1-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:5b02d65b9ccf0ef6c34cba6cf5bf2aab1bb2f49c6090bafeecc9cd81ad4ea1c1"}, + {file = "wrapt-1.14.1-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:21ac0156c4b089b330b7666db40feee30a5d52634cc4560e1905d6529a3897ff"}, + {file = "wrapt-1.14.1-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:9f3e6f9e05148ff90002b884fbc2a86bd303ae847e472f44ecc06c2cd2fcdb2d"}, + {file = "wrapt-1.14.1-cp36-cp36m-musllinux_1_1_i686.whl", hash = "sha256:6e743de5e9c3d1b7185870f480587b75b1cb604832e380d64f9504a0535912d1"}, + {file = "wrapt-1.14.1-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:d79d7d5dc8a32b7093e81e97dad755127ff77bcc899e845f41bf71747af0c569"}, + {file = "wrapt-1.14.1-cp36-cp36m-win32.whl", hash = "sha256:81b19725065dcb43df02b37e03278c011a09e49757287dca60c5aecdd5a0b8ed"}, + {file = "wrapt-1.14.1-cp36-cp36m-win_amd64.whl", hash = "sha256:b014c23646a467558be7da3d6b9fa409b2c567d2110599b7cf9a0c5992b3b471"}, + {file = "wrapt-1.14.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:88bd7b6bd70a5b6803c1abf6bca012f7ed963e58c68d76ee20b9d751c74a3248"}, + {file = "wrapt-1.14.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b5901a312f4d14c59918c221323068fad0540e34324925c8475263841dbdfe68"}, + {file = "wrapt-1.14.1-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d77c85fedff92cf788face9bfa3ebaa364448ebb1d765302e9af11bf449ca36d"}, + {file = "wrapt-1.14.1-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8d649d616e5c6a678b26d15ece345354f7c2286acd6db868e65fcc5ff7c24a77"}, + {file = "wrapt-1.14.1-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:7d2872609603cb35ca513d7404a94d6d608fc13211563571117046c9d2bcc3d7"}, + {file = "wrapt-1.14.1-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:ee6acae74a2b91865910eef5e7de37dc6895ad96fa23603d1d27ea69df545015"}, + {file = "wrapt-1.14.1-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:2b39d38039a1fdad98c87279b48bc5dce2c0ca0d73483b12cb72aa9609278e8a"}, + {file = "wrapt-1.14.1-cp37-cp37m-win32.whl", hash = "sha256:60db23fa423575eeb65ea430cee741acb7c26a1365d103f7b0f6ec412b893853"}, + {file = "wrapt-1.14.1-cp37-cp37m-win_amd64.whl", hash = "sha256:709fe01086a55cf79d20f741f39325018f4df051ef39fe921b1ebe780a66184c"}, + {file = "wrapt-1.14.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:8c0ce1e99116d5ab21355d8ebe53d9460366704ea38ae4d9f6933188f327b456"}, + {file = "wrapt-1.14.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:e3fb1677c720409d5f671e39bac6c9e0e422584e5f518bfd50aa4cbbea02433f"}, + {file = "wrapt-1.14.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:642c2e7a804fcf18c222e1060df25fc210b9c58db7c91416fb055897fc27e8cc"}, + {file = "wrapt-1.14.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7b7c050ae976e286906dd3f26009e117eb000fb2cf3533398c5ad9ccc86867b1"}, + {file = "wrapt-1.14.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ef3f72c9666bba2bab70d2a8b79f2c6d2c1a42a7f7e2b0ec83bb2f9e383950af"}, + {file = "wrapt-1.14.1-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:01c205616a89d09827986bc4e859bcabd64f5a0662a7fe95e0d359424e0e071b"}, + {file = "wrapt-1.14.1-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:5a0f54ce2c092aaf439813735584b9537cad479575a09892b8352fea5e988dc0"}, + {file = "wrapt-1.14.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:2cf71233a0ed05ccdabe209c606fe0bac7379fdcf687f39b944420d2a09fdb57"}, + {file = "wrapt-1.14.1-cp38-cp38-win32.whl", hash = "sha256:aa31fdcc33fef9eb2552cbcbfee7773d5a6792c137b359e82879c101e98584c5"}, + {file = "wrapt-1.14.1-cp38-cp38-win_amd64.whl", hash = "sha256:d1967f46ea8f2db647c786e78d8cc7e4313dbd1b0aca360592d8027b8508e24d"}, + {file = "wrapt-1.14.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:3232822c7d98d23895ccc443bbdf57c7412c5a65996c30442ebe6ed3df335383"}, + {file = "wrapt-1.14.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:988635d122aaf2bdcef9e795435662bcd65b02f4f4c1ae37fbee7401c440b3a7"}, + {file = "wrapt-1.14.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9cca3c2cdadb362116235fdbd411735de4328c61425b0aa9f872fd76d02c4e86"}, + {file = "wrapt-1.14.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d52a25136894c63de15a35bc0bdc5adb4b0e173b9c0d07a2be9d3ca64a332735"}, + {file = "wrapt-1.14.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:40e7bc81c9e2b2734ea4bc1aceb8a8f0ceaac7c5299bc5d69e37c44d9081d43b"}, + {file = "wrapt-1.14.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:b9b7a708dd92306328117d8c4b62e2194d00c365f18eff11a9b53c6f923b01e3"}, + {file = "wrapt-1.14.1-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:6a9a25751acb379b466ff6be78a315e2b439d4c94c1e99cb7266d40a537995d3"}, + {file = "wrapt-1.14.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:34aa51c45f28ba7f12accd624225e2b1e5a3a45206aa191f6f9aac931d9d56fe"}, + {file = "wrapt-1.14.1-cp39-cp39-win32.whl", hash = "sha256:dee0ce50c6a2dd9056c20db781e9c1cfd33e77d2d569f5d1d9321c641bb903d5"}, + {file = "wrapt-1.14.1-cp39-cp39-win_amd64.whl", hash = "sha256:dee60e1de1898bde3b238f18340eec6148986da0455d8ba7848d50470a7a32fb"}, + {file = "wrapt-1.14.1.tar.gz", hash = "sha256:380a85cf89e0e69b7cfbe2ea9f765f004ff419f34194018a6827ac0e3edfed4d"}, +] +yarl = [ + {file = "yarl-1.8.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:abc06b97407868ef38f3d172762f4069323de52f2b70d133d096a48d72215d28"}, + {file = "yarl-1.8.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:07b21e274de4c637f3e3b7104694e53260b5fc10d51fb3ec5fed1da8e0f754e3"}, + {file = "yarl-1.8.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:9de955d98e02fab288c7718662afb33aab64212ecb368c5dc866d9a57bf48880"}, + {file = "yarl-1.8.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7ec362167e2c9fd178f82f252b6d97669d7245695dc057ee182118042026da40"}, + {file = "yarl-1.8.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:20df6ff4089bc86e4a66e3b1380460f864df3dd9dccaf88d6b3385d24405893b"}, + {file = "yarl-1.8.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5999c4662631cb798496535afbd837a102859568adc67d75d2045e31ec3ac497"}, + {file = "yarl-1.8.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ed19b74e81b10b592084a5ad1e70f845f0aacb57577018d31de064e71ffa267a"}, + {file = "yarl-1.8.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1e4808f996ca39a6463f45182e2af2fae55e2560be586d447ce8016f389f626f"}, + {file = "yarl-1.8.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:2d800b9c2eaf0684c08be5f50e52bfa2aa920e7163c2ea43f4f431e829b4f0fd"}, + {file = "yarl-1.8.1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:6628d750041550c5d9da50bb40b5cf28a2e63b9388bac10fedd4f19236ef4957"}, + {file = "yarl-1.8.1-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:f5af52738e225fcc526ae64071b7e5342abe03f42e0e8918227b38c9aa711e28"}, + {file = "yarl-1.8.1-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:76577f13333b4fe345c3704811ac7509b31499132ff0181f25ee26619de2c843"}, + {file = "yarl-1.8.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:0c03f456522d1ec815893d85fccb5def01ffaa74c1b16ff30f8aaa03eb21e453"}, + {file = "yarl-1.8.1-cp310-cp310-win32.whl", hash = "sha256:ea30a42dc94d42f2ba4d0f7c0ffb4f4f9baa1b23045910c0c32df9c9902cb272"}, + {file = "yarl-1.8.1-cp310-cp310-win_amd64.whl", hash = "sha256:9130ddf1ae9978abe63808b6b60a897e41fccb834408cde79522feb37fb72fb0"}, + {file = "yarl-1.8.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:0ab5a138211c1c366404d912824bdcf5545ccba5b3ff52c42c4af4cbdc2c5035"}, + {file = "yarl-1.8.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a0fb2cb4204ddb456a8e32381f9a90000429489a25f64e817e6ff94879d432fc"}, + {file = "yarl-1.8.1-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:85cba594433915d5c9a0d14b24cfba0339f57a2fff203a5d4fd070e593307d0b"}, + {file = "yarl-1.8.1-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1ca7e596c55bd675432b11320b4eacc62310c2145d6801a1f8e9ad160685a231"}, + {file = "yarl-1.8.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d0f77539733e0ec2475ddcd4e26777d08996f8cd55d2aef82ec4d3896687abda"}, + {file = "yarl-1.8.1-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:29e256649f42771829974e742061c3501cc50cf16e63f91ed8d1bf98242e5507"}, + {file = "yarl-1.8.1-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:7fce6cbc6c170ede0221cc8c91b285f7f3c8b9fe28283b51885ff621bbe0f8ee"}, + {file = "yarl-1.8.1-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:59ddd85a1214862ce7c7c66457f05543b6a275b70a65de366030d56159a979f0"}, + {file = "yarl-1.8.1-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:12768232751689c1a89b0376a96a32bc7633c08da45ad985d0c49ede691f5c0d"}, + {file = "yarl-1.8.1-cp37-cp37m-musllinux_1_1_s390x.whl", hash = "sha256:b19255dde4b4f4c32e012038f2c169bb72e7f081552bea4641cab4d88bc409dd"}, + {file = "yarl-1.8.1-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:6c8148e0b52bf9535c40c48faebb00cb294ee577ca069d21bd5c48d302a83780"}, + {file = "yarl-1.8.1-cp37-cp37m-win32.whl", hash = "sha256:de839c3a1826a909fdbfe05f6fe2167c4ab033f1133757b5936efe2f84904c07"}, + {file = "yarl-1.8.1-cp37-cp37m-win_amd64.whl", hash = "sha256:dd032e8422a52e5a4860e062eb84ac94ea08861d334a4bcaf142a63ce8ad4802"}, + {file = "yarl-1.8.1-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:19cd801d6f983918a3f3a39f3a45b553c015c5aac92ccd1fac619bd74beece4a"}, + {file = "yarl-1.8.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:6347f1a58e658b97b0a0d1ff7658a03cb79bdbda0331603bed24dd7054a6dea1"}, + {file = "yarl-1.8.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:7c0da7e44d0c9108d8b98469338705e07f4bb7dab96dbd8fa4e91b337db42548"}, + {file = "yarl-1.8.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5587bba41399854703212b87071c6d8638fa6e61656385875f8c6dff92b2e461"}, + {file = "yarl-1.8.1-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:31a9a04ecccd6b03e2b0e12e82131f1488dea5555a13a4d32f064e22a6003cfe"}, + {file = "yarl-1.8.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:205904cffd69ae972a1707a1bd3ea7cded594b1d773a0ce66714edf17833cdae"}, + {file = "yarl-1.8.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ea513a25976d21733bff523e0ca836ef1679630ef4ad22d46987d04b372d57fc"}, + {file = "yarl-1.8.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d0b51530877d3ad7a8d47b2fff0c8df3b8f3b8deddf057379ba50b13df2a5eae"}, + {file = "yarl-1.8.1-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:d2b8f245dad9e331540c350285910b20dd913dc86d4ee410c11d48523c4fd546"}, + {file = "yarl-1.8.1-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:ab2a60d57ca88e1d4ca34a10e9fb4ab2ac5ad315543351de3a612bbb0560bead"}, + {file = "yarl-1.8.1-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:449c957ffc6bc2309e1fbe67ab7d2c1efca89d3f4912baeb8ead207bb3cc1cd4"}, + {file = "yarl-1.8.1-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:a165442348c211b5dea67c0206fc61366212d7082ba8118c8c5c1c853ea4d82e"}, + {file = "yarl-1.8.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:b3ded839a5c5608eec8b6f9ae9a62cb22cd037ea97c627f38ae0841a48f09eae"}, + {file = "yarl-1.8.1-cp38-cp38-win32.whl", hash = "sha256:c1445a0c562ed561d06d8cbc5c8916c6008a31c60bc3655cdd2de1d3bf5174a0"}, + {file = "yarl-1.8.1-cp38-cp38-win_amd64.whl", hash = "sha256:56c11efb0a89700987d05597b08a1efcd78d74c52febe530126785e1b1a285f4"}, + {file = "yarl-1.8.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:e80ed5a9939ceb6fda42811542f31c8602be336b1fb977bccb012e83da7e4936"}, + {file = "yarl-1.8.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:6afb336e23a793cd3b6476c30f030a0d4c7539cd81649683b5e0c1b0ab0bf350"}, + {file = "yarl-1.8.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:4c322cbaa4ed78a8aac89b2174a6df398faf50e5fc12c4c191c40c59d5e28357"}, + {file = "yarl-1.8.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fae37373155f5ef9b403ab48af5136ae9851151f7aacd9926251ab26b953118b"}, + {file = "yarl-1.8.1-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5395da939ffa959974577eff2cbfc24b004a2fb6c346918f39966a5786874e54"}, + {file = "yarl-1.8.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:076eede537ab978b605f41db79a56cad2e7efeea2aa6e0fa8f05a26c24a034fb"}, + {file = "yarl-1.8.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3d1a50e461615747dd93c099f297c1994d472b0f4d2db8a64e55b1edf704ec1c"}, + {file = "yarl-1.8.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7de89c8456525650ffa2bb56a3eee6af891e98f498babd43ae307bd42dca98f6"}, + {file = "yarl-1.8.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:4a88510731cd8d4befaba5fbd734a7dd914de5ab8132a5b3dde0bbd6c9476c64"}, + {file = "yarl-1.8.1-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:2d93a049d29df172f48bcb09acf9226318e712ce67374f893b460b42cc1380ae"}, + {file = "yarl-1.8.1-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:21ac44b763e0eec15746a3d440f5e09ad2ecc8b5f6dcd3ea8cb4773d6d4703e3"}, + {file = "yarl-1.8.1-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:d0272228fabe78ce00a3365ffffd6f643f57a91043e119c289aaba202f4095b0"}, + {file = "yarl-1.8.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:99449cd5366fe4608e7226c6cae80873296dfa0cde45d9b498fefa1de315a09e"}, + {file = "yarl-1.8.1-cp39-cp39-win32.whl", hash = "sha256:8b0af1cf36b93cee99a31a545fe91d08223e64390c5ecc5e94c39511832a4bb6"}, + {file = "yarl-1.8.1-cp39-cp39-win_amd64.whl", hash = "sha256:de49d77e968de6626ba7ef4472323f9d2e5a56c1d85b7c0e2a190b2173d3b9be"}, + {file = "yarl-1.8.1.tar.gz", hash = "sha256:af887845b8c2e060eb5605ff72b6f2dd2aab7a761379373fd89d314f4752abbf"}, +] diff --git a/packages/polywrap-client-config-builder/polywrap_client_config_builder/__init__.py b/packages/polywrap-client-config-builder/polywrap_client_config_builder/__init__.py new file mode 100644 index 00000000..3238b04f --- /dev/null +++ b/packages/polywrap-client-config-builder/polywrap_client_config_builder/__init__.py @@ -0,0 +1 @@ +from .client_config_builder import * \ No newline at end of file diff --git a/packages/polywrap-client-config-builder/polywrap_client_config_builder/client_config_builder.py b/packages/polywrap-client-config-builder/polywrap_client_config_builder/client_config_builder.py new file mode 100644 index 00000000..aed9fc81 --- /dev/null +++ b/packages/polywrap-client-config-builder/polywrap_client_config_builder/client_config_builder.py @@ -0,0 +1,85 @@ +from polywrap_core import Uri, ClientConfig +from dataclasses import dataclass + +from polywrap_core.types.env import Env +from typing import Any, Dict, List + +from polywrap_core.types.uri_resolver import IUriResolver +from polywrap_core.types.wrapper import Wrapper, WrapperCache + +# from "./bundles" import get_default_client_config + +# Replicate this file +# except for plugins, interface, and redirects as they are not yet impl in python +# https://github.com/polywrap/toolchain/blob/origin/packages/js/client-config-builder/src/ClientConfigBuilder.ts + +print(ClientConfig) + +@dataclass(slots=True, kw_only=True) +class ClientConfigBuilder(): + """ + Used to instantiate the `ClientConfig` object necessary to invoke any wrapper. + """ + envs: List[Env] + resolver: IUriResolver + # plugins: + # interfaces + # redirects + + def add(self, config: ClientConfig): + """ + Appends each property of the supplied config object to the corresponding array of the builder's config. + """ + if config.envs: + for env in config.envs: + self.add_env(env.uri, env.env) + + if config.resolver: + self.set_resolver(config.resolver) + + return self + + def add_defaults(self, wrapper_cache: WrapperCache | Any ={'blank': Wrapper}): + """ + Adds the defaultClientConfig object. + """ + pass + + def add_env(self, uri: Uri | str, env: Dict[str, Any] ): + """ + Function that takes in an environment and an Uri; + - If the env is already defined, its values are updated + - If the env is not defined, the values are added to the Env array + """ + env_uri = Uri.parse_uri(uri) + + Uri.equals(x.uri, env_uri) + + idx = self.envs.index() + + if idx >= 0: + self.envs[idx].env = {**self.envs[idx].env, **env,} + else: + self.envs.append(Env(uri=env_uri, env=env)) + return self + + def remove_env(self, uri: Uri | str ): + pass + + def set_env(self, uri: Uri | str, env: Dict[str, Any] ): + pass + + def set_resolver(self, resolver: IUriResolver): + self.resolver = resolver + return self + + + def build(self) -> ClientConfig: + """ + Returns a sanitized config object from the builder's config. + """ + + if not self.resolver: + raise Exception('No Uri Resolver provided') + + pass \ No newline at end of file diff --git a/packages/polywrap-client-config-builder/pyproject.toml b/packages/polywrap-client-config-builder/pyproject.toml new file mode 100644 index 00000000..f6fc249a --- /dev/null +++ b/packages/polywrap-client-config-builder/pyproject.toml @@ -0,0 +1,60 @@ +[build-system] +requires = ["poetry-core>=1.0.0"] +build-backend = "poetry.core.masonry.api" + +[tool.poetry] +name = "polywrap-client-config-builder" +version = "0.1.0" +description = "" +authors = ["Cesar ", "Niraj "] + +[tool.poetry.dependencies] +python = "^3.10" +gql = "3.4.0" +graphql-core = "^3.2.1" +result = "^0.8.0" +polywrap-core = { path = "../polywrap-core", develop = true } +polywrap-client = { path = "../polywrap-client", develop = true } +polywrap-uri-resolvers = { path = "../polywrap-uri-resolvers", develop = true } + +[tool.poetry.dev-dependencies] +pytest = "^7.1.2" +pytest-asyncio = "^0.19.0" +pylint = "^2.15.4" +black = "^22.10.0" +bandit = { version = "^1.7.4", extras = ["toml"]} +tox = "^3.26.0" +tox-poetry = "^0.4.1" +isort = "^5.10.1" +pyright = "^1.1.275" +pydocstyle = "^6.1.1" + +[tool.bandit] +exclude_dirs = ["tests"] + +[tool.black] +target-version = ["py310"] + +[tool.pyright] +# default + +[tool.pytest.ini_options] +asyncio_mode = "auto" +testpaths = [ + "tests" +] + +[tool.pylint] +disable = [ + "too-many-return-statements", +] +ignore = [ + "tests/" +] + +[tool.isort] +profile = "black" +multi_line_output = 3 + +[tool.pydocstyle] +# default \ No newline at end of file diff --git a/packages/polywrap-client-config-builder/tests/test_client_config_builder.py b/packages/polywrap-client-config-builder/tests/test_client_config_builder.py new file mode 100644 index 00000000..f7af5f6b --- /dev/null +++ b/packages/polywrap-client-config-builder/tests/test_client_config_builder.py @@ -0,0 +1,26 @@ +from typing import List +from polywrap_core.types.env import Env +from polywrap_core.types.uri import Uri +from polywrap_core.types.uri_resolver import IUriResolver +from polywrap_client_config_builder import ClientConfigBuilder + +test_envs: List[Env] = [ + Env(uri = Uri("wrap://ens/test.plugin.one"), env = { 'test': "value" }), + Env(uri= Uri("wrap://ens/test.plugin.two"), env= { 'test': "value" }), + ] + +def test_client_config_builder_adds_default_config(): + ClientConfigBuilder.add_defaults() + pass + +def test_client_config_builder_adds_config(): + envs: List[Env] = [] + resolver: IUriResolver = IUriResolver() + + + config = ClientConfigBuilder(env).add({}) + pass + +def test_client_config_builder_adds_uri_resolver(): + pass + diff --git a/packages/polywrap-client-config-builder/tox.ini b/packages/polywrap-client-config-builder/tox.ini new file mode 100644 index 00000000..f3cb0f4e --- /dev/null +++ b/packages/polywrap-client-config-builder/tox.ini @@ -0,0 +1,30 @@ +[tox] +isolated_build = True +envlist = py310 + +[testenv] +commands = + pytest tests/ + +[testenv:lint] +commands = + isort --check-only client_config_builder + black --check client_config_builder + pylint client_config_builder + pydocstyle client_config_builder + +[testenv:typecheck] +commands = + pyright client_config_builder + +[testenv:secure] +commands = + bandit -r client_config_builder -c pyproject.toml + +[testenv:dev] +basepython = python3.10 +usedevelop = True +commands = + isort client_config_builder + black client_config_builder + diff --git a/packages/polywrap-client-config-builder/typings/polywrap_core/__init__.pyi b/packages/polywrap-client-config-builder/typings/polywrap_core/__init__.pyi new file mode 100644 index 00000000..0f0cde3d --- /dev/null +++ b/packages/polywrap-client-config-builder/typings/polywrap_core/__init__.pyi @@ -0,0 +1,8 @@ +""" +This type stub file was generated by pyright. +""" + +from .types import * +from .uri_resolution import * +from .utils import * + diff --git a/packages/polywrap-client-config-builder/typings/polywrap_core/types/__init__.pyi b/packages/polywrap-client-config-builder/typings/polywrap_core/types/__init__.pyi new file mode 100644 index 00000000..2ecd9cdf --- /dev/null +++ b/packages/polywrap-client-config-builder/typings/polywrap_core/types/__init__.pyi @@ -0,0 +1,19 @@ +""" +This type stub file was generated by pyright. +""" + +from .client import * +from .env import * +from .file_reader import * +from .invoke import * +from .uri import * +from .uri_package import * +from .uri_package_wrapper import * +from .uri_resolution_context import * +from .uri_resolution_step import * +from .uri_resolver import * +from .uri_resolver_handler import * +from .uri_wrapper import * +from .wasm_package import * +from .wrapper import * + diff --git a/packages/polywrap-client-config-builder/typings/polywrap_core/types/client.pyi b/packages/polywrap-client-config-builder/typings/polywrap_core/types/client.pyi new file mode 100644 index 00000000..112e5c60 --- /dev/null +++ b/packages/polywrap-client-config-builder/typings/polywrap_core/types/client.pyi @@ -0,0 +1,59 @@ +""" +This type stub file was generated by pyright. +""" + +from abc import abstractmethod +from dataclasses import dataclass +from typing import List, Optional, Union +from .env import Env +from .invoke import Invoker +from .uri import Uri +from .uri_resolver import IUriResolver +from .uri_resolver_handler import UriResolverHandler + +@dataclass(slots=True, kw_only=True) +class ClientConfig: + envs: List[Env] = ... + resolver: IUriResolver + + +@dataclass(slots=True, kw_only=True) +class Contextualized: + context_id: Optional[str] = ... + + +@dataclass(slots=True, kw_only=True) +class GetEnvsOptions(Contextualized): + ... + + +@dataclass(slots=True, kw_only=True) +class GetUriResolversOptions(Contextualized): + ... + + +@dataclass(slots=True, kw_only=True) +class GetFileOptions(Contextualized): + path: str + encoding: Optional[str] = ... + + +class Client(Invoker, UriResolverHandler): + @abstractmethod + def get_envs(self, options: Optional[GetEnvsOptions] = ...) -> List[Env]: + ... + + @abstractmethod + def get_env_by_uri(self, uri: Uri, options: Optional[GetEnvsOptions] = ...) -> Union[Env, None]: + ... + + @abstractmethod + def get_uri_resolver(self, options: Optional[GetUriResolversOptions] = ...) -> List[IUriResolver]: + ... + + @abstractmethod + async def get_file(self, uri: Uri, options: GetFileOptions) -> Union[bytes, str]: + ... + + + diff --git a/packages/polywrap-client-config-builder/typings/polywrap_core/types/env.pyi b/packages/polywrap-client-config-builder/typings/polywrap_core/types/env.pyi new file mode 100644 index 00000000..ac0c9ca1 --- /dev/null +++ b/packages/polywrap-client-config-builder/typings/polywrap_core/types/env.pyi @@ -0,0 +1,21 @@ +""" +This type stub file was generated by pyright. +""" + +from dataclasses import dataclass +from typing import Any, Dict +from .uri import Uri + +@dataclass(slots=True, kw_only=True) +class Env: + """ + this type can be used to set env for a wrapper in the client + + Args: + uri: Uri of wrapper + env: env variables used by the module + """ + uri: Uri + env: Dict[str, Any] = ... + + diff --git a/packages/polywrap-client-config-builder/typings/polywrap_core/types/file_reader.pyi b/packages/polywrap-client-config-builder/typings/polywrap_core/types/file_reader.pyi new file mode 100644 index 00000000..98153c81 --- /dev/null +++ b/packages/polywrap-client-config-builder/typings/polywrap_core/types/file_reader.pyi @@ -0,0 +1,13 @@ +""" +This type stub file was generated by pyright. +""" + +from abc import ABC, abstractmethod + +class IFileReader(ABC): + @abstractmethod + async def read_file(self, file_path: str) -> bytearray: + ... + + + diff --git a/packages/polywrap-client-config-builder/typings/polywrap_core/types/invoke.pyi b/packages/polywrap-client-config-builder/typings/polywrap_core/types/invoke.pyi new file mode 100644 index 00000000..8f424ca6 --- /dev/null +++ b/packages/polywrap-client-config-builder/typings/polywrap_core/types/invoke.pyi @@ -0,0 +1,66 @@ +""" +This type stub file was generated by pyright. +""" + +from abc import ABC, abstractmethod +from dataclasses import dataclass +from typing import Any, Dict, Optional, Union +from .uri import Uri +from .uri_resolution_context import IUriResolutionContext + +@dataclass(slots=True, kw_only=True) +class InvokeOptions: + """ + Options required for a wrapper invocation. + + Args: + uri: Uri of the wrapper + method: Method to be executed + args: Arguments for the method, structured as a dictionary + config: Override the client's config for all invokes within this invoke. + context_id: Invoke id used to track query context data set internally. + """ + uri: Uri + method: str + args: Optional[Union[Dict[str, Any], bytes]] = ... + env: Optional[Dict[str, Any]] = ... + resolution_context: Optional[IUriResolutionContext] = ... + + +@dataclass(slots=True, kw_only=True) +class InvokeResult: + """ + Result of a wrapper invocation + + Args: + data: Invoke result data. The type of this value is the return type of the method. + error: Error encountered during the invocation. + """ + result: Optional[Any] = ... + error: Optional[Exception] = ... + + +@dataclass(slots=True, kw_only=True) +class InvokerOptions(InvokeOptions): + encode_result: Optional[bool] = ... + + +@dataclass(slots=True, kw_only=True) +class InvocableResult(InvokeResult): + encoded: Optional[bool] = ... + + +class Invoker(ABC): + @abstractmethod + async def invoke(self, options: InvokerOptions) -> InvokeResult: + ... + + + +class Invocable(ABC): + @abstractmethod + async def invoke(self, invoker: Invoker, options: InvokeOptions) -> InvocableResult: + ... + + + diff --git a/packages/polywrap-client-config-builder/typings/polywrap_core/types/uri.pyi b/packages/polywrap-client-config-builder/typings/polywrap_core/types/uri.pyi new file mode 100644 index 00000000..9af488b7 --- /dev/null +++ b/packages/polywrap-client-config-builder/typings/polywrap_core/types/uri.pyi @@ -0,0 +1,80 @@ +""" +This type stub file was generated by pyright. +""" + +from dataclasses import dataclass +from typing import Any, Optional, Tuple, Union + +@dataclass(slots=True, kw_only=True) +class UriConfig: + """URI configuration.""" + authority: str + path: str + uri: str + ... + + +class Uri: + """ + A Polywrap URI. + + Some examples of valid URIs are: + wrap://ipfs/QmHASH + wrap://ens/sub.dimain.eth + wrap://fs/directory/file.txt + wrap://uns/domain.crypto + Breaking down the various parts of the URI, as it applies + to [the URI standard](https://tools.ietf.org/html/rfc3986#section-3): + **wrap://** - URI Scheme: differentiates Polywrap URIs. + **ipfs/** - URI Authority: allows the Polywrap URI resolution algorithm to determine + an authoritative URI resolver. + **sub.domain.eth** - URI Path: tells the Authority where the API resides. + """ + def __init__(self, uri: str) -> None: + ... + + def __str__(self) -> str: + ... + + def __repr__(self) -> str: + ... + + def __hash__(self) -> int: + ... + + def __eq__(self, b: object) -> bool: + ... + + def __lt__(self, b: Uri) -> bool: + ... + + @property + def authority(self) -> str: + ... + + @property + def path(self) -> str: + ... + + @property + def uri(self) -> str: + ... + + @staticmethod + def equals(a: Uri, b: Uri) -> bool: + ... + + @staticmethod + def is_uri(value: Any) -> bool: + ... + + @staticmethod + def is_valid_uri(uri: str, parsed: Optional[UriConfig] = ...) -> Tuple[Union[UriConfig, None], bool]: + ... + + @staticmethod + def parse_uri(uri: str) -> UriConfig: + ... + + + diff --git a/packages/polywrap-client-config-builder/typings/polywrap_core/types/uri_package.pyi b/packages/polywrap-client-config-builder/typings/polywrap_core/types/uri_package.pyi new file mode 100644 index 00000000..02e512a6 --- /dev/null +++ b/packages/polywrap-client-config-builder/typings/polywrap_core/types/uri_package.pyi @@ -0,0 +1,15 @@ +""" +This type stub file was generated by pyright. +""" + +from dataclasses import dataclass +from .uri import Uri +from .wasm_package import IWasmPackage + +@dataclass(slots=True, kw_only=True) +class UriPackage: + uri: Uri + package: IWasmPackage + ... + + diff --git a/packages/polywrap-client-config-builder/typings/polywrap_core/types/uri_package_wrapper.pyi b/packages/polywrap-client-config-builder/typings/polywrap_core/types/uri_package_wrapper.pyi new file mode 100644 index 00000000..ef3413de --- /dev/null +++ b/packages/polywrap-client-config-builder/typings/polywrap_core/types/uri_package_wrapper.pyi @@ -0,0 +1,10 @@ +""" +This type stub file was generated by pyright. +""" + +from typing import Union +from .uri import Uri +from .uri_package import UriPackage +from .uri_wrapper import UriWrapper + +UriPackageOrWrapper = Union[Uri, UriWrapper, UriPackage] diff --git a/packages/polywrap-client-config-builder/typings/polywrap_core/types/uri_resolution_context.pyi b/packages/polywrap-client-config-builder/typings/polywrap_core/types/uri_resolution_context.pyi new file mode 100644 index 00000000..90cb7ff4 --- /dev/null +++ b/packages/polywrap-client-config-builder/typings/polywrap_core/types/uri_resolution_context.pyi @@ -0,0 +1,44 @@ +""" +This type stub file was generated by pyright. +""" + +from abc import ABC, abstractmethod +from typing import List +from .uri import Uri +from .uri_resolution_step import IUriResolutionStep + +class IUriResolutionContext(ABC): + @abstractmethod + def is_resolving(self, uri: Uri) -> bool: + ... + + @abstractmethod + def start_resolving(self, uri: Uri) -> None: + ... + + @abstractmethod + def stop_resolving(self, uri: Uri) -> None: + ... + + @abstractmethod + def track_step(self, step: IUriResolutionStep) -> None: + ... + + @abstractmethod + def get_history(self) -> List[IUriResolutionStep]: + ... + + @abstractmethod + def get_resolution_path(self) -> List[Uri]: + ... + + @abstractmethod + def create_sub_history_context(self) -> IUriResolutionContext: + ... + + @abstractmethod + def create_sub_context(self) -> IUriResolutionContext: + ... + + + diff --git a/packages/polywrap-client-config-builder/typings/polywrap_core/types/uri_resolution_step.pyi b/packages/polywrap-client-config-builder/typings/polywrap_core/types/uri_resolution_step.pyi new file mode 100644 index 00000000..19acdd39 --- /dev/null +++ b/packages/polywrap-client-config-builder/typings/polywrap_core/types/uri_resolution_step.pyi @@ -0,0 +1,20 @@ +""" +This type stub file was generated by pyright. +""" + +from dataclasses import dataclass +from typing import Optional, TYPE_CHECKING +from result import Result +from .uri import Uri +from .uri_package_wrapper import UriPackageOrWrapper + +if TYPE_CHECKING: + ... +@dataclass(slots=True, kw_only=True) +class IUriResolutionStep: + source_uri: Uri + result: Result[UriPackageOrWrapper, Exception] + description: Optional[str] = ... + sub_history: Optional[IUriResolutionStep] = ... + + diff --git a/packages/polywrap-client-config-builder/typings/polywrap_core/types/uri_resolver.pyi b/packages/polywrap-client-config-builder/typings/polywrap_core/types/uri_resolver.pyi new file mode 100644 index 00000000..82ed244e --- /dev/null +++ b/packages/polywrap-client-config-builder/typings/polywrap_core/types/uri_resolver.pyi @@ -0,0 +1,35 @@ +""" +This type stub file was generated by pyright. +""" + +from abc import ABC, abstractmethod +from dataclasses import dataclass +from typing import Optional, TYPE_CHECKING +from result import Result +from .uri import Uri +from .uri_resolution_context import IUriResolutionContext +from .client import Client +from .uri_package_wrapper import UriPackageOrWrapper + +if TYPE_CHECKING: + ... +@dataclass(slots=True, kw_only=True) +class TryResolveUriOptions: + """ + Args: + no_cache_read: If set to true, the resolveUri function will not use the cache to resolve the uri. + no_cache_write: If set to true, the resolveUri function will not cache the results + config: Override the client's config for all resolutions. + context_id: Id used to track context data set internally. + """ + uri: Uri + resolution_context: Optional[IUriResolutionContext] = ... + + +class IUriResolver(ABC): + @abstractmethod + async def try_resolve_uri(self, uri: Uri, client: Client, resolution_context: IUriResolutionContext) -> Result[UriPackageOrWrapper, Exception]: + ... + + + diff --git a/packages/polywrap-client-config-builder/typings/polywrap_core/types/uri_resolver_handler.pyi b/packages/polywrap-client-config-builder/typings/polywrap_core/types/uri_resolver_handler.pyi new file mode 100644 index 00000000..e3171cdc --- /dev/null +++ b/packages/polywrap-client-config-builder/typings/polywrap_core/types/uri_resolver_handler.pyi @@ -0,0 +1,19 @@ +""" +This type stub file was generated by pyright. +""" + +from abc import ABC, abstractmethod +from typing import TYPE_CHECKING +from result import Result +from .uri_resolver import TryResolveUriOptions +from .uri_package_wrapper import UriPackageOrWrapper + +if TYPE_CHECKING: + ... +class UriResolverHandler(ABC): + @abstractmethod + async def try_resolve_uri(self, options: TryResolveUriOptions) -> Result[UriPackageOrWrapper, Exception]: + ... + + + diff --git a/packages/polywrap-client-config-builder/typings/polywrap_core/types/uri_wrapper.pyi b/packages/polywrap-client-config-builder/typings/polywrap_core/types/uri_wrapper.pyi new file mode 100644 index 00000000..408529a8 --- /dev/null +++ b/packages/polywrap-client-config-builder/typings/polywrap_core/types/uri_wrapper.pyi @@ -0,0 +1,15 @@ +""" +This type stub file was generated by pyright. +""" + +from dataclasses import dataclass +from .uri import Uri +from .wrapper import Wrapper + +@dataclass(slots=True, kw_only=True) +class UriWrapper: + uri: Uri + wrapper: Wrapper + ... + + diff --git a/packages/polywrap-client-config-builder/typings/polywrap_core/types/wasm_package.pyi b/packages/polywrap-client-config-builder/typings/polywrap_core/types/wasm_package.pyi new file mode 100644 index 00000000..5e92e511 --- /dev/null +++ b/packages/polywrap-client-config-builder/typings/polywrap_core/types/wasm_package.pyi @@ -0,0 +1,14 @@ +""" +This type stub file was generated by pyright. +""" + +from abc import ABC, abstractmethod +from .wrapper import Wrapper + +class IWasmPackage(ABC): + @abstractmethod + def create_wrapper(self) -> Wrapper: + ... + + + diff --git a/packages/polywrap-client-config-builder/typings/polywrap_core/types/wrapper.pyi b/packages/polywrap-client-config-builder/typings/polywrap_core/types/wrapper.pyi new file mode 100644 index 00000000..34573312 --- /dev/null +++ b/packages/polywrap-client-config-builder/typings/polywrap_core/types/wrapper.pyi @@ -0,0 +1,28 @@ +""" +This type stub file was generated by pyright. +""" + +from abc import abstractmethod +from typing import Dict, Union +from .client import Client, GetFileOptions +from .invoke import Invocable, InvocableResult, InvokeOptions, Invoker + +class Wrapper(Invocable): + """ + Invoke the Wrapper based on the provided [[InvokeOptions]] + + Args: + options: Options for this invocation. + client: The client instance requesting this invocation. This client will be used for any sub-invokes that occur. + """ + @abstractmethod + async def invoke(self, options: InvokeOptions, invoker: Invoker) -> InvocableResult: + ... + + @abstractmethod + async def get_file(self, options: GetFileOptions, client: Client) -> Union[str, bytes]: + ... + + + +WrapperCache = Dict[str, Wrapper] diff --git a/packages/polywrap-client-config-builder/typings/polywrap_core/uri_resolution/__init__.pyi b/packages/polywrap-client-config-builder/typings/polywrap_core/uri_resolution/__init__.pyi new file mode 100644 index 00000000..a4101f84 --- /dev/null +++ b/packages/polywrap-client-config-builder/typings/polywrap_core/uri_resolution/__init__.pyi @@ -0,0 +1,7 @@ +""" +This type stub file was generated by pyright. +""" + +from .uri_resolution_context import * +from .uri_resolution_result import * + diff --git a/packages/polywrap-client-config-builder/typings/polywrap_core/uri_resolution/uri_resolution_context.pyi b/packages/polywrap-client-config-builder/typings/polywrap_core/uri_resolution/uri_resolution_context.pyi new file mode 100644 index 00000000..bd999afc --- /dev/null +++ b/packages/polywrap-client-config-builder/typings/polywrap_core/uri_resolution/uri_resolution_context.pyi @@ -0,0 +1,41 @@ +""" +This type stub file was generated by pyright. +""" + +from typing import List, Optional, Set +from ..types import IUriResolutionContext, IUriResolutionStep, Uri + +class UriResolutionContext(IUriResolutionContext): + resolving_uri_set: Set[Uri] + resolution_path: List[Uri] + history: List[IUriResolutionStep] + __slots__ = ... + def __init__(self, resolving_uri_set: Optional[Set[Uri]] = ..., resolution_path: Optional[List[Uri]] = ..., history: Optional[List[IUriResolutionStep]] = ...) -> None: + ... + + def is_resolving(self, uri: Uri) -> bool: + ... + + def start_resolving(self, uri: Uri) -> None: + ... + + def stop_resolving(self, uri: Uri) -> None: + ... + + def track_step(self, step: IUriResolutionStep) -> None: + ... + + def get_history(self) -> List[IUriResolutionStep]: + ... + + def get_resolution_path(self) -> List[Uri]: + ... + + def create_sub_history_context(self) -> UriResolutionContext: + ... + + def create_sub_context(self) -> UriResolutionContext: + ... + + + diff --git a/packages/polywrap-client-config-builder/typings/polywrap_core/uri_resolution/uri_resolution_result.pyi b/packages/polywrap-client-config-builder/typings/polywrap_core/uri_resolution/uri_resolution_result.pyi new file mode 100644 index 00000000..e0d4c9e0 --- /dev/null +++ b/packages/polywrap-client-config-builder/typings/polywrap_core/uri_resolution/uri_resolution_result.pyi @@ -0,0 +1,21 @@ +""" +This type stub file was generated by pyright. +""" + +from typing import List, Optional +from result import Result +from ..types import IUriResolutionStep, IWasmPackage, Uri, UriPackageOrWrapper, Wrapper + +class UriResolutionResult: + result: Result[UriPackageOrWrapper, Exception] + history: Optional[List[IUriResolutionStep]] + @staticmethod + def ok(uri: Uri, package: Optional[IWasmPackage] = ..., wrapper: Optional[Wrapper] = ...) -> Result[UriPackageOrWrapper, Exception]: + ... + + @staticmethod + def err(error: Exception) -> Result[UriPackageOrWrapper, Exception]: + ... + + + diff --git a/packages/polywrap-client-config-builder/typings/polywrap_core/utils/__init__.pyi b/packages/polywrap-client-config-builder/typings/polywrap_core/utils/__init__.pyi new file mode 100644 index 00000000..b2a379f8 --- /dev/null +++ b/packages/polywrap-client-config-builder/typings/polywrap_core/utils/__init__.pyi @@ -0,0 +1,9 @@ +""" +This type stub file was generated by pyright. +""" + +from .get_env_from_uri_history import * +from .init_wrapper import * +from .instance_of import * +from .maybe_async import * + diff --git a/packages/polywrap-client-config-builder/typings/polywrap_core/utils/get_env_from_uri_history.pyi b/packages/polywrap-client-config-builder/typings/polywrap_core/utils/get_env_from_uri_history.pyi new file mode 100644 index 00000000..09366f78 --- /dev/null +++ b/packages/polywrap-client-config-builder/typings/polywrap_core/utils/get_env_from_uri_history.pyi @@ -0,0 +1,10 @@ +""" +This type stub file was generated by pyright. +""" + +from typing import List, Union +from ..types import Client, Env, Uri + +def get_env_from_uri_history(uri_history: List[Uri], client: Client) -> Union[Env, None]: + ... + diff --git a/packages/polywrap-client-config-builder/typings/polywrap_core/utils/init_wrapper.pyi b/packages/polywrap-client-config-builder/typings/polywrap_core/utils/init_wrapper.pyi new file mode 100644 index 00000000..e235f6b0 --- /dev/null +++ b/packages/polywrap-client-config-builder/typings/polywrap_core/utils/init_wrapper.pyi @@ -0,0 +1,10 @@ +""" +This type stub file was generated by pyright. +""" + +from typing import Any +from ..types import Wrapper + +async def init_wrapper(package_or_wrapper: Any) -> Wrapper: + ... + diff --git a/packages/polywrap-client-config-builder/typings/polywrap_core/utils/instance_of.pyi b/packages/polywrap-client-config-builder/typings/polywrap_core/utils/instance_of.pyi new file mode 100644 index 00000000..84ac59e0 --- /dev/null +++ b/packages/polywrap-client-config-builder/typings/polywrap_core/utils/instance_of.pyi @@ -0,0 +1,9 @@ +""" +This type stub file was generated by pyright. +""" + +from typing import Any + +def instance_of(obj: Any, cls: Any): # -> bool: + ... + diff --git a/packages/polywrap-client-config-builder/typings/polywrap_core/utils/maybe_async.pyi b/packages/polywrap-client-config-builder/typings/polywrap_core/utils/maybe_async.pyi new file mode 100644 index 00000000..e6e6f0be --- /dev/null +++ b/packages/polywrap-client-config-builder/typings/polywrap_core/utils/maybe_async.pyi @@ -0,0 +1,12 @@ +""" +This type stub file was generated by pyright. +""" + +from typing import Any, Awaitable, Callable, Optional, Union + +def is_coroutine(test: Optional[Union[Awaitable[Any], Any]] = ...) -> bool: + ... + +async def execute_maybe_async_function(func: Callable[..., Any], *args: Any) -> Any: + ... + diff --git a/packages/polywrap-client-config-builder/yarn.lock b/packages/polywrap-client-config-builder/yarn.lock new file mode 100644 index 00000000..fb57ccd1 --- /dev/null +++ b/packages/polywrap-client-config-builder/yarn.lock @@ -0,0 +1,4 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + diff --git a/python-monorepo.code-workspace b/python-monorepo.code-workspace index 15d9458c..5dd457d9 100644 --- a/python-monorepo.code-workspace +++ b/python-monorepo.code-workspace @@ -31,6 +31,10 @@ { "name": "polywrap-result", "path": "packages/polywrap-result" + }, + { + "name": "polywrap-client-config-builder", + "path": "packages/polywrap-client-config-builder" } ], "settings": { From a47163b3c06567326bb3e1bfc1fd578b27331926 Mon Sep 17 00:00:00 2001 From: DaoAdvocate <12145726+rihp@users.noreply.github.com> Date: Mon, 31 Oct 2022 22:32:33 +0100 Subject: [PATCH 02/40] wip: client config builder package --- .../polywrap_client_config_builder/client_config_builder.py | 1 - packages/polywrap-client-config-builder/pyproject.toml | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/polywrap-client-config-builder/polywrap_client_config_builder/client_config_builder.py b/packages/polywrap-client-config-builder/polywrap_client_config_builder/client_config_builder.py index aed9fc81..14e51a16 100644 --- a/packages/polywrap-client-config-builder/polywrap_client_config_builder/client_config_builder.py +++ b/packages/polywrap-client-config-builder/polywrap_client_config_builder/client_config_builder.py @@ -15,7 +15,6 @@ print(ClientConfig) -@dataclass(slots=True, kw_only=True) class ClientConfigBuilder(): """ Used to instantiate the `ClientConfig` object necessary to invoke any wrapper. diff --git a/packages/polywrap-client-config-builder/pyproject.toml b/packages/polywrap-client-config-builder/pyproject.toml index f6fc249a..b718cd91 100644 --- a/packages/polywrap-client-config-builder/pyproject.toml +++ b/packages/polywrap-client-config-builder/pyproject.toml @@ -6,7 +6,7 @@ build-backend = "poetry.core.masonry.api" name = "polywrap-client-config-builder" version = "0.1.0" description = "" -authors = ["Cesar ", "Niraj "] +authors = ["Media ", "Cesar ", "Niraj "] [tool.poetry.dependencies] python = "^3.10" From b345b1d587db59a75bbad994846494687f15e190 Mon Sep 17 00:00:00 2001 From: DaoAdvocate <12145726+rihp@users.noreply.github.com> Date: Tue, 1 Nov 2022 00:17:44 +0100 Subject: [PATCH 03/40] wip: client config builder, envs and resolvers --- .../client_config_builder.py | 42 ++++++++++++------- .../default_client_config.py | 25 +++++++++++ .../tests/test_client_config_builder.py | 7 +++- 3 files changed, 57 insertions(+), 17 deletions(-) create mode 100644 packages/polywrap-client-config-builder/polywrap_client_config_builder/default_client_config.py diff --git a/packages/polywrap-client-config-builder/polywrap_client_config_builder/client_config_builder.py b/packages/polywrap-client-config-builder/polywrap_client_config_builder/client_config_builder.py index 14e51a16..03070690 100644 --- a/packages/polywrap-client-config-builder/polywrap_client_config_builder/client_config_builder.py +++ b/packages/polywrap-client-config-builder/polywrap_client_config_builder/client_config_builder.py @@ -1,13 +1,9 @@ from polywrap_core import Uri, ClientConfig -from dataclasses import dataclass - from polywrap_core.types.env import Env from typing import Any, Dict, List - from polywrap_core.types.uri_resolver import IUriResolver from polywrap_core.types.wrapper import Wrapper, WrapperCache - -# from "./bundles" import get_default_client_config +from default_client_config import get_default_client_config # Replicate this file # except for plugins, interface, and redirects as they are not yet impl in python @@ -19,12 +15,19 @@ class ClientConfigBuilder(): """ Used to instantiate the `ClientConfig` object necessary to invoke any wrapper. """ - envs: List[Env] - resolver: IUriResolver + # plugins: # interfaces # redirects + + def __init__(self, uri: str): + self._config: dict[str, Uri ]= { + 'envs': list[Uri], + } + self.envs: List[Env] + self.resolver: IUriResolver + def add(self, config: ClientConfig): """ Appends each property of the supplied config object to the corresponding array of the builder's config. @@ -42,20 +45,26 @@ def add_defaults(self, wrapper_cache: WrapperCache | Any ={'blank': Wrapper}): """ Adds the defaultClientConfig object. """ - pass + return get_default_client_config() + - def add_env(self, uri: Uri | str, env: Dict[str, Any] ): + def add_env(self, uri: str | Uri, env: Dict[str, Any] ): """ Function that takes in an environment and an Uri; - If the env is already defined, its values are updated - If the env is not defined, the values are added to the Env array """ - env_uri = Uri.parse_uri(uri) - - Uri.equals(x.uri, env_uri) + if type(uri) == str: + env_uri: Uri = Uri.parse_uri(uri) + elif type(uri) == Uri: + env_uri: Uri = uri + else: + raise TypeError("uri is not string nor URI") + + idx = self.envs.index(env_uri) + + # Uri.equals(x.uri, ) - idx = self.envs.index() - if idx >= 0: self.envs[idx].env = {**self.envs[idx].env, **env,} else: @@ -81,4 +90,7 @@ def build(self) -> ClientConfig: if not self.resolver: raise Exception('No Uri Resolver provided') - pass \ No newline at end of file + pass + + def build_partial(): + return self._config \ No newline at end of file diff --git a/packages/polywrap-client-config-builder/polywrap_client_config_builder/default_client_config.py b/packages/polywrap-client-config-builder/polywrap_client_config_builder/default_client_config.py new file mode 100644 index 00000000..c0efadf0 --- /dev/null +++ b/packages/polywrap-client-config-builder/polywrap_client_config_builder/default_client_config.py @@ -0,0 +1,25 @@ +from typing import Any +from polywrap_core import Uri, ClientConfig +from polywrap_uri_resolvers import BaseUriResolver + + +def get_default_client_config() -> dict: + return { + 'envs': [ + { + 'uri': Uri(defaultWrappers.graphNode), + 'env': { + 'provider': "https://api.thegraph.com", + }, + }, + { + 'uri': Uri("wrap://ens/ipfs.polywrap.eth"), + 'env': { + 'provider': defaultIpfsProviders[0], + 'fallbackProviders': defaultIpfsProviders.slice(1), + }, + }, + ], + 'resolver': BaseUriResolver + + } \ No newline at end of file diff --git a/packages/polywrap-client-config-builder/tests/test_client_config_builder.py b/packages/polywrap-client-config-builder/tests/test_client_config_builder.py index f7af5f6b..c6894bf9 100644 --- a/packages/polywrap-client-config-builder/tests/test_client_config_builder.py +++ b/packages/polywrap-client-config-builder/tests/test_client_config_builder.py @@ -1,3 +1,4 @@ +from multiprocessing.connection import Client from typing import List from polywrap_core.types.env import Env from polywrap_core.types.uri import Uri @@ -9,9 +10,11 @@ Env(uri= Uri("wrap://ens/test.plugin.two"), env= { 'test': "value" }), ] +client = ClientConfigBuilder() + def test_client_config_builder_adds_default_config(): - ClientConfigBuilder.add_defaults() - pass + client.add_defaults() + assert False def test_client_config_builder_adds_config(): envs: List[Env] = [] From 58e0b0e344d229fada4cb76c71dce77938ccbdab Mon Sep 17 00:00:00 2001 From: DaoAdvocate <12145726+rihp@users.noreply.github.com> Date: Tue, 1 Nov 2022 00:20:12 +0100 Subject: [PATCH 04/40] typings and module errors --- .../client_config_builder.py | 28 ++++++++++++++++++- .../default_client_config.py | 22 --------------- 2 files changed, 27 insertions(+), 23 deletions(-) diff --git a/packages/polywrap-client-config-builder/polywrap_client_config_builder/client_config_builder.py b/packages/polywrap-client-config-builder/polywrap_client_config_builder/client_config_builder.py index 03070690..c886c389 100644 --- a/packages/polywrap-client-config-builder/polywrap_client_config_builder/client_config_builder.py +++ b/packages/polywrap-client-config-builder/polywrap_client_config_builder/client_config_builder.py @@ -3,7 +3,12 @@ from typing import Any, Dict, List from polywrap_core.types.uri_resolver import IUriResolver from polywrap_core.types.wrapper import Wrapper, WrapperCache -from default_client_config import get_default_client_config + + + + + + # Replicate this file # except for plugins, interface, and redirects as they are not yet impl in python @@ -45,6 +50,27 @@ def add_defaults(self, wrapper_cache: WrapperCache | Any ={'blank': Wrapper}): """ Adds the defaultClientConfig object. """ + + def get_default_client_config() -> dict[str, object]: + return { + 'envs': [ + { + 'uri': Uri(defaultWrappers.graphNode), + 'env': { + 'provider': "https://api.thegraph.com", + }, + }, + { + 'uri': Uri("wrap://ens/ipfs.polywrap.eth"), + 'env': { + 'provider': defaultIpfsProviders[0], + 'fallbackProviders': defaultIpfsProviders.slice(1), + }, + }, + ], + 'resolver': BaseUriResolver + + } return get_default_client_config() diff --git a/packages/polywrap-client-config-builder/polywrap_client_config_builder/default_client_config.py b/packages/polywrap-client-config-builder/polywrap_client_config_builder/default_client_config.py index c0efadf0..c4638964 100644 --- a/packages/polywrap-client-config-builder/polywrap_client_config_builder/default_client_config.py +++ b/packages/polywrap-client-config-builder/polywrap_client_config_builder/default_client_config.py @@ -1,25 +1,3 @@ from typing import Any from polywrap_core import Uri, ClientConfig from polywrap_uri_resolvers import BaseUriResolver - - -def get_default_client_config() -> dict: - return { - 'envs': [ - { - 'uri': Uri(defaultWrappers.graphNode), - 'env': { - 'provider': "https://api.thegraph.com", - }, - }, - { - 'uri': Uri("wrap://ens/ipfs.polywrap.eth"), - 'env': { - 'provider': defaultIpfsProviders[0], - 'fallbackProviders': defaultIpfsProviders.slice(1), - }, - }, - ], - 'resolver': BaseUriResolver - - } \ No newline at end of file From db3768e17d94ed35501c6d4ec4574f1b9f3c1264 Mon Sep 17 00:00:00 2001 From: DaoAdvocate <12145726+rihp@users.noreply.github.com> Date: Tue, 1 Nov 2022 00:30:21 +0100 Subject: [PATCH 05/40] wip: client config builder --- .../client_config_builder.py | 33 +++++++++++-------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/packages/polywrap-client-config-builder/polywrap_client_config_builder/client_config_builder.py b/packages/polywrap-client-config-builder/polywrap_client_config_builder/client_config_builder.py index c886c389..323c5c36 100644 --- a/packages/polywrap-client-config-builder/polywrap_client_config_builder/client_config_builder.py +++ b/packages/polywrap-client-config-builder/polywrap_client_config_builder/client_config_builder.py @@ -3,12 +3,8 @@ from typing import Any, Dict, List from polywrap_core.types.uri_resolver import IUriResolver from polywrap_core.types.wrapper import Wrapper, WrapperCache - - - - - - +from polywrap_core import Uri, ClientConfig +from polywrap_uri_resolvers import BaseUriResolver # Replicate this file # except for plugins, interface, and redirects as they are not yet impl in python @@ -21,18 +17,16 @@ class ClientConfigBuilder(): Used to instantiate the `ClientConfig` object necessary to invoke any wrapper. """ - # plugins: - # interfaces - # redirects - - def __init__(self, uri: str): + def __init__(self): self._config: dict[str, Uri ]= { 'envs': list[Uri], } self.envs: List[Env] self.resolver: IUriResolver - + # self.plugins: + # self.interfaces: + # self.redirects: def add(self, config: ClientConfig): """ Appends each property of the supplied config object to the corresponding array of the builder's config. @@ -51,11 +45,22 @@ def add_defaults(self, wrapper_cache: WrapperCache | Any ={'blank': Wrapper}): Adds the defaultClientConfig object. """ + defaultWrappers = { + 'sha3': "wrap://ens/goerli/sha3.wrappers.eth", + 'uts46': "wrap://ens/goerli/uts46-lite.wrappers.eth", + 'graphNode': "wrap://ens/goerli/graph-node.wrappers.eth", + } + + defaultIpfsProviders = [ + "https://ipfs.wrappers.io", + "https://ipfs.io", + ] + def get_default_client_config() -> dict[str, object]: return { 'envs': [ { - 'uri': Uri(defaultWrappers.graphNode), + 'uri': Uri(defaultWrappers['graphNode']), 'env': { 'provider': "https://api.thegraph.com", }, @@ -64,7 +69,7 @@ def get_default_client_config() -> dict[str, object]: 'uri': Uri("wrap://ens/ipfs.polywrap.eth"), 'env': { 'provider': defaultIpfsProviders[0], - 'fallbackProviders': defaultIpfsProviders.slice(1), + 'fallbackProviders': defaultIpfsProviders[1:], }, }, ], From 21527562b44727cf68fc57738323368f70144fa7 Mon Sep 17 00:00:00 2001 From: DaoAdvocate <12145726+rihp@users.noreply.github.com> Date: Tue, 1 Nov 2022 00:31:59 +0100 Subject: [PATCH 06/40] wip: client config builder --- .../polywrap_client_config_builder/client_config_builder.py | 2 +- .../tests/test_client_config_builder.py | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/polywrap-client-config-builder/polywrap_client_config_builder/client_config_builder.py b/packages/polywrap-client-config-builder/polywrap_client_config_builder/client_config_builder.py index 323c5c36..ad5bf355 100644 --- a/packages/polywrap-client-config-builder/polywrap_client_config_builder/client_config_builder.py +++ b/packages/polywrap-client-config-builder/polywrap_client_config_builder/client_config_builder.py @@ -123,5 +123,5 @@ def build(self) -> ClientConfig: pass - def build_partial(): + def build_partial(self): return self._config \ No newline at end of file diff --git a/packages/polywrap-client-config-builder/tests/test_client_config_builder.py b/packages/polywrap-client-config-builder/tests/test_client_config_builder.py index c6894bf9..5949fdbf 100644 --- a/packages/polywrap-client-config-builder/tests/test_client_config_builder.py +++ b/packages/polywrap-client-config-builder/tests/test_client_config_builder.py @@ -19,8 +19,6 @@ def test_client_config_builder_adds_default_config(): def test_client_config_builder_adds_config(): envs: List[Env] = [] resolver: IUriResolver = IUriResolver() - - config = ClientConfigBuilder(env).add({}) pass From b4bbf6cedd0fa60c69db44b30d71cbfd7298e9ec Mon Sep 17 00:00:00 2001 From: DaoAdvocate <12145726+rihp@users.noreply.github.com> Date: Tue, 1 Nov 2022 20:16:04 +0100 Subject: [PATCH 07/40] wip: add_envs, and from/convert functions --- .../client_config_builder.py | 10 ++++++++-- .../tests/test_client_config_builder.py | 12 +++++++----- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/packages/polywrap-client-config-builder/polywrap_client_config_builder/client_config_builder.py b/packages/polywrap-client-config-builder/polywrap_client_config_builder/client_config_builder.py index ad5bf355..1aefe273 100644 --- a/packages/polywrap-client-config-builder/polywrap_client_config_builder/client_config_builder.py +++ b/packages/polywrap-client-config-builder/polywrap_client_config_builder/client_config_builder.py @@ -81,9 +81,10 @@ def get_default_client_config() -> dict[str, object]: def add_env(self, uri: str | Uri, env: Dict[str, Any] ): """ - Function that takes in an environment and an Uri; + Function that takes in an environment object and an Uri; + - It parses the URI - If the env is already defined, its values are updated - - If the env is not defined, the values are added to the Env array + - If the env is not defined, the values are added to the end of the Env array """ if type(uri) == str: env_uri: Uri = Uri.parse_uri(uri) @@ -102,6 +103,11 @@ def add_env(self, uri: str | Uri, env: Dict[str, Any] ): self.envs.append(Env(uri=env_uri, env=env)) return self + def add_envs(self, envs: list[Env]) -> object: + for env in envs: + self.add_envs(env.uri, env.env) + return self + def remove_env(self, uri: Uri | str ): pass diff --git a/packages/polywrap-client-config-builder/tests/test_client_config_builder.py b/packages/polywrap-client-config-builder/tests/test_client_config_builder.py index 5949fdbf..bee60766 100644 --- a/packages/polywrap-client-config-builder/tests/test_client_config_builder.py +++ b/packages/polywrap-client-config-builder/tests/test_client_config_builder.py @@ -13,14 +13,16 @@ client = ClientConfigBuilder() def test_client_config_builder_adds_default_config(): + print(client) client.add_defaults() + print(client) assert False -def test_client_config_builder_adds_config(): - envs: List[Env] = [] - resolver: IUriResolver = IUriResolver() - config = ClientConfigBuilder(env).add({}) - pass +# def test_client_config_builder_adds_config(): +# envs: List[Env] = [] +# resolver: IUriResolver = IUriResolver() +# config = ClientConfigBuilder(env).add({}) +# pass def test_client_config_builder_adds_uri_resolver(): pass From c311251bc2075f561a5ba8ddd7e1a4a6655a6c34 Mon Sep 17 00:00:00 2001 From: DaoAdvocate <12145726+rihp@users.noreply.github.com> Date: Tue, 1 Nov 2022 20:43:43 +0100 Subject: [PATCH 08/40] wip: --- .../client_config_builder.py | 16 ++++++++-------- .../tests/test_client_config_builder.py | 12 +++++++----- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/packages/polywrap-client-config-builder/polywrap_client_config_builder/client_config_builder.py b/packages/polywrap-client-config-builder/polywrap_client_config_builder/client_config_builder.py index 1aefe273..915ef248 100644 --- a/packages/polywrap-client-config-builder/polywrap_client_config_builder/client_config_builder.py +++ b/packages/polywrap-client-config-builder/polywrap_client_config_builder/client_config_builder.py @@ -1,4 +1,3 @@ -from polywrap_core import Uri, ClientConfig from polywrap_core.types.env import Env from typing import Any, Dict, List from polywrap_core.types.uri_resolver import IUriResolver @@ -17,7 +16,6 @@ class ClientConfigBuilder(): Used to instantiate the `ClientConfig` object necessary to invoke any wrapper. """ - def __init__(self): self._config: dict[str, Uri ]= { 'envs': list[Uri], @@ -86,12 +84,14 @@ def add_env(self, uri: str | Uri, env: Dict[str, Any] ): - If the env is already defined, its values are updated - If the env is not defined, the values are added to the end of the Env array """ - if type(uri) == str: - env_uri: Uri = Uri.parse_uri(uri) - elif type(uri) == Uri: - env_uri: Uri = uri - else: - raise TypeError("uri is not string nor URI") + # if type(uri) == str: + # env_uri: Uri = Uri.parse_uri(uri) + # elif type(uri) == Uri: + # env_uri: Uri = uri + # else: + # raise TypeError("uri is not string nor URI") + + env_uri: Uri = Uri.convert(uri) idx = self.envs.index(env_uri) diff --git a/packages/polywrap-client-config-builder/tests/test_client_config_builder.py b/packages/polywrap-client-config-builder/tests/test_client_config_builder.py index bee60766..a98a63a2 100644 --- a/packages/polywrap-client-config-builder/tests/test_client_config_builder.py +++ b/packages/polywrap-client-config-builder/tests/test_client_config_builder.py @@ -13,9 +13,12 @@ client = ClientConfigBuilder() def test_client_config_builder_adds_default_config(): - print(client) - client.add_defaults() - print(client) + print(client.build_partial()) + updated_client = client.add_defaults() + print(client.add_defaults().build_partial()) + print(type(client.build_partial())) + print(type(client.build())) + assert False # def test_client_config_builder_adds_config(): @@ -25,5 +28,4 @@ def test_client_config_builder_adds_default_config(): # pass def test_client_config_builder_adds_uri_resolver(): - pass - + pass \ No newline at end of file From 68ede2fe1d3bff90127cc72c8b9c424a70365183 Mon Sep 17 00:00:00 2001 From: DaoAdvocate <12145726+rihp@users.noreply.github.com> Date: Tue, 1 Nov 2022 20:47:40 +0100 Subject: [PATCH 09/40] default config class --- .../polywrap_client_config_builder/client_config_builder.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/polywrap-client-config-builder/polywrap_client_config_builder/client_config_builder.py b/packages/polywrap-client-config-builder/polywrap_client_config_builder/client_config_builder.py index 915ef248..0ba2c1ba 100644 --- a/packages/polywrap-client-config-builder/polywrap_client_config_builder/client_config_builder.py +++ b/packages/polywrap-client-config-builder/polywrap_client_config_builder/client_config_builder.py @@ -17,8 +17,8 @@ class ClientConfigBuilder(): """ def __init__(self): - self._config: dict[str, Uri ]= { - 'envs': list[Uri], + self._config: dict[str, list[Uri]] = { + 'envs': [], } self.envs: List[Env] self.resolver: IUriResolver From 51329c893ba0d58726c9ffe6b91a9b1fe1b075f5 Mon Sep 17 00:00:00 2001 From: DaoAdvocate <12145726+rihp@users.noreply.github.com> Date: Wed, 2 Nov 2022 12:47:50 +0100 Subject: [PATCH 10/40] wip: sanitize_uri function and improvements --- .../client_config_builder.py | 31 ++++++++++++++----- .../tests/test_client_config_builder.py | 3 +- 2 files changed, 25 insertions(+), 9 deletions(-) diff --git a/packages/polywrap-client-config-builder/polywrap_client_config_builder/client_config_builder.py b/packages/polywrap-client-config-builder/polywrap_client_config_builder/client_config_builder.py index 0ba2c1ba..28cd8e73 100644 --- a/packages/polywrap-client-config-builder/polywrap_client_config_builder/client_config_builder.py +++ b/packages/polywrap-client-config-builder/polywrap_client_config_builder/client_config_builder.py @@ -1,3 +1,4 @@ +from multiprocessing.connection import Client from polywrap_core.types.env import Env from typing import Any, Dict, List from polywrap_core.types.uri_resolver import IUriResolver @@ -11,21 +12,34 @@ print(ClientConfig) +def sanitize_uri(uri: str | Uri) -> Uri + """ + This is the Uri.from function of the JS client + """ + if type(uri) == str: + return Uri(uri) + if Uri.is_uri(uri): + return uri + + raise TypeError("Unknown uri type, cannot convert") + class ClientConfigBuilder(): """ Used to instantiate the `ClientConfig` object necessary to invoke any wrapper. """ def __init__(self): - self._config: dict[str, list[Uri]] = { - 'envs': [], - } self.envs: List[Env] self.resolver: IUriResolver # self.plugins: # self.interfaces: # self.redirects: - def add(self, config: ClientConfig): + + def __config(): + self.envs = [] + self.resolvers = [] + + def add(self, config: ClientConfig) -> ClientConfigBuilder: """ Appends each property of the supplied config object to the corresponding array of the builder's config. """ @@ -77,8 +91,9 @@ def get_default_client_config() -> dict[str, object]: return get_default_client_config() - def add_env(self, uri: str | Uri, env: Dict[str, Any] ): + def add_env(self, uri: Uri | str, env: Record[str, Any] ) -> ClientConfigBuilder: """ + see: https://github.com/polywrap/toolchain/blob/b57b1393d1aa5f82f39741d297040f84bf799ff1/packages/js/client-config-builder/src/ClientConfigBuilder.ts#L153-L168 Function that takes in an environment object and an Uri; - It parses the URI - If the env is already defined, its values are updated @@ -91,9 +106,9 @@ def add_env(self, uri: str | Uri, env: Dict[str, Any] ): # else: # raise TypeError("uri is not string nor URI") - env_uri: Uri = Uri.convert(uri) + env_uri: Uri = sanitize_uri(uri) - idx = self.envs.index(env_uri) + idx = self.__config # Uri.equals(x.uri, ) @@ -109,9 +124,11 @@ def add_envs(self, envs: list[Env]) -> object: return self def remove_env(self, uri: Uri | str ): + # very similar to add_env pass def set_env(self, uri: Uri | str, env: Dict[str, Any] ): + # very similar to add_env pass def set_resolver(self, resolver: IUriResolver): diff --git a/packages/polywrap-client-config-builder/tests/test_client_config_builder.py b/packages/polywrap-client-config-builder/tests/test_client_config_builder.py index a98a63a2..86da421b 100644 --- a/packages/polywrap-client-config-builder/tests/test_client_config_builder.py +++ b/packages/polywrap-client-config-builder/tests/test_client_config_builder.py @@ -14,8 +14,7 @@ def test_client_config_builder_adds_default_config(): print(client.build_partial()) - updated_client = client.add_defaults() - print(client.add_defaults().build_partial()) + # print(client.add_defaults().build_partial()) print(type(client.build_partial())) print(type(client.build())) From 37a1eb1139c50143b3b0a192506241fcfbd3d957 Mon Sep 17 00:00:00 2001 From: DaoAdvocate <12145726+rihp@users.noreply.github.com> Date: Wed, 2 Nov 2022 17:05:27 +0100 Subject: [PATCH 11/40] wip: client config add_env --- .../polywrap_client_config_builder/client_config_builder.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/polywrap-client-config-builder/polywrap_client_config_builder/client_config_builder.py b/packages/polywrap-client-config-builder/polywrap_client_config_builder/client_config_builder.py index 28cd8e73..a8c1e4b0 100644 --- a/packages/polywrap-client-config-builder/polywrap_client_config_builder/client_config_builder.py +++ b/packages/polywrap-client-config-builder/polywrap_client_config_builder/client_config_builder.py @@ -146,5 +146,5 @@ def build(self) -> ClientConfig: pass - def build_partial(self): + def build_partial(self) -> ClientConfigBuilder: return self._config \ No newline at end of file From a342ed02731c1cecd9d5caacbe6d29e35de2c5ae Mon Sep 17 00:00:00 2001 From: DaoAdvocate <12145726+rihp@users.noreply.github.com> Date: Fri, 4 Nov 2022 14:46:28 +0100 Subject: [PATCH 12/40] wip: v0.10 refactor --- .../__init__.py | 5 +++- .../base_client_config.py | 0 .../client_config.py | 28 +++++++++++++++++++ .../client_config_builder.py | 3 +- 4 files changed, 33 insertions(+), 3 deletions(-) create mode 100644 packages/polywrap-client-config-builder/polywrap_client_config_builder/base_client_config.py create mode 100644 packages/polywrap-client-config-builder/polywrap_client_config_builder/client_config.py diff --git a/packages/polywrap-client-config-builder/polywrap_client_config_builder/__init__.py b/packages/polywrap-client-config-builder/polywrap_client_config_builder/__init__.py index 3238b04f..7e0e3e0d 100644 --- a/packages/polywrap-client-config-builder/polywrap_client_config_builder/__init__.py +++ b/packages/polywrap-client-config-builder/polywrap_client_config_builder/__init__.py @@ -1 +1,4 @@ -from .client_config_builder import * \ No newline at end of file +from .client_config_builder import * +from .base_client_config import * +from .client_config import * +# from "./bundles" import * \ No newline at end of file diff --git a/packages/polywrap-client-config-builder/polywrap_client_config_builder/base_client_config.py b/packages/polywrap-client-config-builder/polywrap_client_config_builder/base_client_config.py new file mode 100644 index 00000000..e69de29b diff --git a/packages/polywrap-client-config-builder/polywrap_client_config_builder/client_config.py b/packages/polywrap-client-config-builder/polywrap_client_config_builder/client_config.py new file mode 100644 index 00000000..9b6f9921 --- /dev/null +++ b/packages/polywrap-client-config-builder/polywrap_client_config_builder/client_config.py @@ -0,0 +1,28 @@ +# Polywrap Python Client - https://polywrap.io +# https://github.com/polywrap/toolchain/blob/origin-0.10-dev/packages/js/client-config-builder/src/ClientConfig.ts + + +from polywrap_core import Uri, Env +from polywrap_uri_resolvers import uriresolverlike +from dataclasses import dataclass +from typing import TypeVar, Generic, List + +TUri = TypeVar('TUri', Uri, str) + +# export interface ClientConfig { + + +@dataclass(slots=True, kw_only=True) # TODO Check if with or without slots +class ClientConfig(Generic[TUri]): + """ + This object is used to configure the polywrap client before it executes a call + The ClientConfig class is created and modified with the ClientConfigBuilder module + + Defined initially here: + https://github.com/polywrap/toolchain/blob/origin/packages/js/core/src/types/Client.ts + """ + envs: List[Env] + #resolver: IUriResolver # -> UriResolverLike + #interfaces: InterfaceImplementations + #plugins: PluginRegistration + #redirects: UriRedirect \ No newline at end of file diff --git a/packages/polywrap-client-config-builder/polywrap_client_config_builder/client_config_builder.py b/packages/polywrap-client-config-builder/polywrap_client_config_builder/client_config_builder.py index a8c1e4b0..bd103996 100644 --- a/packages/polywrap-client-config-builder/polywrap_client_config_builder/client_config_builder.py +++ b/packages/polywrap-client-config-builder/polywrap_client_config_builder/client_config_builder.py @@ -8,8 +8,7 @@ # Replicate this file # except for plugins, interface, and redirects as they are not yet impl in python -# https://github.com/polywrap/toolchain/blob/origin/packages/js/client-config-builder/src/ClientConfigBuilder.ts - +# https://github.com/polywrap/toolchain/tree/origin-0.10-dev/packages/js/client-config-builder/src print(ClientConfig) def sanitize_uri(uri: str | Uri) -> Uri From cce216c42c21b70ef25ff501dc4730f0ff31aa5e Mon Sep 17 00:00:00 2001 From: DaoAdvocate <12145726+rihp@users.noreply.github.com> Date: Fri, 4 Nov 2022 16:14:50 +0100 Subject: [PATCH 13/40] wip: v0.10 refactor: starting to flesh out interfaces --- .../__init__.py | 1 + .../base_client_config.py | 11 ++++++ .../client_config_builder.py | 15 +++++++- .../interface_client_config_builder.py | 37 +++++++++++++++++++ 4 files changed, 62 insertions(+), 2 deletions(-) create mode 100644 packages/polywrap-client-config-builder/polywrap_client_config_builder/interface_client_config_builder.py diff --git a/packages/polywrap-client-config-builder/polywrap_client_config_builder/__init__.py b/packages/polywrap-client-config-builder/polywrap_client_config_builder/__init__.py index 7e0e3e0d..2355b006 100644 --- a/packages/polywrap-client-config-builder/polywrap_client_config_builder/__init__.py +++ b/packages/polywrap-client-config-builder/polywrap_client_config_builder/__init__.py @@ -1,4 +1,5 @@ from .client_config_builder import * from .base_client_config import * from .client_config import * +from .interface_client_config_builder import * # from "./bundles" import * \ No newline at end of file diff --git a/packages/polywrap-client-config-builder/polywrap_client_config_builder/base_client_config.py b/packages/polywrap-client-config-builder/polywrap_client_config_builder/base_client_config.py index e69de29b..1bfe9e42 100644 --- a/packages/polywrap-client-config-builder/polywrap_client_config_builder/base_client_config.py +++ b/packages/polywrap-client-config-builder/polywrap_client_config_builder/base_client_config.py @@ -0,0 +1,11 @@ +from client_config import ClientConfig +from interface_client_config_builder import IClientConfigBuilder +from client_config_builder import ClientConfigBuilder + + + +class BaseClientConfigBuilder(IClientConfigBuilder): + """A concrete class of the Client Config Builder, which uses the IClientConfigBuilder Abstract Base Class""" + + + diff --git a/packages/polywrap-client-config-builder/polywrap_client_config_builder/client_config_builder.py b/packages/polywrap-client-config-builder/polywrap_client_config_builder/client_config_builder.py index bd103996..83b7f909 100644 --- a/packages/polywrap-client-config-builder/polywrap_client_config_builder/client_config_builder.py +++ b/packages/polywrap-client-config-builder/polywrap_client_config_builder/client_config_builder.py @@ -6,6 +6,16 @@ from polywrap_core import Uri, ClientConfig from polywrap_uri_resolvers import BaseUriResolver +# from bundles import get_default_config +#from base_client_config_builder import base_client_config_builder +# from polywrap_core import Uri, IUriResolver +#from polywrap_core import core_client_config -> doesnt exist in python client + + +# from polywrap_uri_resolvers import IWrapperCache, LegacyRedirectsResolver, PackageToWrapperCacheResolver, RecursiveResolver, StaticResolver, WrapperCache +from polywrap_uri_resolvers import BaseUriResolver + + # Replicate this file # except for plugins, interface, and redirects as they are not yet impl in python # https://github.com/polywrap/toolchain/tree/origin-0.10-dev/packages/js/client-config-builder/src @@ -22,7 +32,8 @@ def sanitize_uri(uri: str | Uri) -> Uri raise TypeError("Unknown uri type, cannot convert") -class ClientConfigBuilder(): + +class ClientConfigBuilder(BaseClientConfigBuilder): """ Used to instantiate the `ClientConfig` object necessary to invoke any wrapper. """ @@ -34,7 +45,7 @@ def __init__(self): # self.interfaces: # self.redirects: - def __config(): + def __config(self): self.envs = [] self.resolvers = [] diff --git a/packages/polywrap-client-config-builder/polywrap_client_config_builder/interface_client_config_builder.py b/packages/polywrap-client-config-builder/polywrap_client_config_builder/interface_client_config_builder.py new file mode 100644 index 00000000..9ab49857 --- /dev/null +++ b/packages/polywrap-client-config-builder/polywrap_client_config_builder/interface_client_config_builder.py @@ -0,0 +1,37 @@ +from client_config import ClientConfig + +from polywrap_core import Uri, Env # missing CoreClientConfig, IUriPackage, IUriWrapper, IUriRedirect + +from polywrap_uri_resolvers import BaseUriResolver +from abc import ABC, abstractmethod + + +class IClientConfigBuilder(ABC): + """Defines the basic interface for the Client Config Builder""" + + @abstractmethod + def build() -> ClientConfig[Uri]: + pass + + @abstractmethod + def build_core_config() -> CoreClientConfif : + pass + + # @abstractmethod + # def add(config: ) + + @abstractmethod + def add_defaults() -> IClientConfigBuilder: + pass + + @abstractmethod + def add_env(): + pass + + @abstractmethod + def add_envs(): + pass + + @abstractmethod + def remove_env(): + pass From bf79acc616c0d65e6c23c856c7c7f77ea4a2c052 Mon Sep 17 00:00:00 2001 From: DaoAdvocate <12145726+rihp@users.noreply.github.com> Date: Fri, 4 Nov 2022 16:43:08 +0100 Subject: [PATCH 14/40] wip: clientconfig dataclass and interfaces --- .../polywrap_client_config_builder/client_config.py | 13 +++---------- .../interface_client_config_builder.py | 2 +- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/packages/polywrap-client-config-builder/polywrap_client_config_builder/client_config.py b/packages/polywrap-client-config-builder/polywrap_client_config_builder/client_config.py index 9b6f9921..61622223 100644 --- a/packages/polywrap-client-config-builder/polywrap_client_config_builder/client_config.py +++ b/packages/polywrap-client-config-builder/polywrap_client_config_builder/client_config.py @@ -3,26 +3,19 @@ from polywrap_core import Uri, Env -from polywrap_uri_resolvers import uriresolverlike +# from polywrap_uri_resolvers import uriresolverlike -> Do this after finishing Envs from dataclasses import dataclass from typing import TypeVar, Generic, List TUri = TypeVar('TUri', Uri, str) - -# export interface ClientConfig { - - @dataclass(slots=True, kw_only=True) # TODO Check if with or without slots class ClientConfig(Generic[TUri]): """ - This object is used to configure the polywrap client before it executes a call + This Abstract class is used to configure the polywrap client before it executes a call The ClientConfig class is created and modified with the ClientConfigBuilder module - - Defined initially here: - https://github.com/polywrap/toolchain/blob/origin/packages/js/core/src/types/Client.ts """ envs: List[Env] - #resolver: IUriResolver # -> UriResolverLike + resolver: List[Any] # IUriResolver # -> UriResolverLike #interfaces: InterfaceImplementations #plugins: PluginRegistration #redirects: UriRedirect \ No newline at end of file diff --git a/packages/polywrap-client-config-builder/polywrap_client_config_builder/interface_client_config_builder.py b/packages/polywrap-client-config-builder/polywrap_client_config_builder/interface_client_config_builder.py index 9ab49857..8a1d3f2a 100644 --- a/packages/polywrap-client-config-builder/polywrap_client_config_builder/interface_client_config_builder.py +++ b/packages/polywrap-client-config-builder/polywrap_client_config_builder/interface_client_config_builder.py @@ -14,7 +14,7 @@ def build() -> ClientConfig[Uri]: pass @abstractmethod - def build_core_config() -> CoreClientConfif : + def build_core_config() -> CoreClientConfig : pass # @abstractmethod From f6658092314b3fbb66f401c22eecfca785c8076a Mon Sep 17 00:00:00 2001 From: DaoAdvocate <12145726+rihp@users.noreply.github.com> Date: Sat, 5 Nov 2022 23:37:16 +0100 Subject: [PATCH 15/40] wip: making envs work --- .../base_client_config.py | 8 +++--- .../client_config.py | 11 +++----- .../client_config_builder.py | 22 ++++++++-------- .../interface_client_config_builder.py | 25 +++++++++++++------ .../tests/test_client_config_builder.py | 17 ++++++++++++- 5 files changed, 51 insertions(+), 32 deletions(-) diff --git a/packages/polywrap-client-config-builder/polywrap_client_config_builder/base_client_config.py b/packages/polywrap-client-config-builder/polywrap_client_config_builder/base_client_config.py index 1bfe9e42..67388667 100644 --- a/packages/polywrap-client-config-builder/polywrap_client_config_builder/base_client_config.py +++ b/packages/polywrap-client-config-builder/polywrap_client_config_builder/base_client_config.py @@ -1,11 +1,11 @@ -from client_config import ClientConfig -from interface_client_config_builder import IClientConfigBuilder -from client_config_builder import ClientConfigBuilder +#from .client_config import ClientConfig +from .interface_client_config_builder import IClientConfigBuilder +#from .client_config_builder import ClientConfigBuilder class BaseClientConfigBuilder(IClientConfigBuilder): """A concrete class of the Client Config Builder, which uses the IClientConfigBuilder Abstract Base Class""" - + pass diff --git a/packages/polywrap-client-config-builder/polywrap_client_config_builder/client_config.py b/packages/polywrap-client-config-builder/polywrap_client_config_builder/client_config.py index 61622223..4a503349 100644 --- a/packages/polywrap-client-config-builder/polywrap_client_config_builder/client_config.py +++ b/packages/polywrap-client-config-builder/polywrap_client_config_builder/client_config.py @@ -7,15 +7,12 @@ from dataclasses import dataclass from typing import TypeVar, Generic, List -TUri = TypeVar('TUri', Uri, str) -@dataclass(slots=True, kw_only=True) # TODO Check if with or without slots -class ClientConfig(Generic[TUri]): +#TUri = TypeVar('TUri', Uri) +@dataclass(slots=True, kw_only=True) +class ClientConfig: """ This Abstract class is used to configure the polywrap client before it executes a call The ClientConfig class is created and modified with the ClientConfigBuilder module """ envs: List[Env] - resolver: List[Any] # IUriResolver # -> UriResolverLike - #interfaces: InterfaceImplementations - #plugins: PluginRegistration - #redirects: UriRedirect \ No newline at end of file + #resolver: List[Any] # IUriResolver # -> UriResolverLike \ No newline at end of file diff --git a/packages/polywrap-client-config-builder/polywrap_client_config_builder/client_config_builder.py b/packages/polywrap-client-config-builder/polywrap_client_config_builder/client_config_builder.py index 83b7f909..50ee9313 100644 --- a/packages/polywrap-client-config-builder/polywrap_client_config_builder/client_config_builder.py +++ b/packages/polywrap-client-config-builder/polywrap_client_config_builder/client_config_builder.py @@ -5,6 +5,7 @@ from polywrap_core.types.wrapper import Wrapper, WrapperCache from polywrap_core import Uri, ClientConfig from polywrap_uri_resolvers import BaseUriResolver +from .base_client_config import BaseClientConfigBuilder # from bundles import get_default_config #from base_client_config_builder import base_client_config_builder @@ -21,7 +22,7 @@ # https://github.com/polywrap/toolchain/tree/origin-0.10-dev/packages/js/client-config-builder/src print(ClientConfig) -def sanitize_uri(uri: str | Uri) -> Uri +def sanitize_uri(uri: str | Uri) -> Uri: """ This is the Uri.from function of the JS client """ @@ -40,16 +41,13 @@ class ClientConfigBuilder(BaseClientConfigBuilder): def __init__(self): self.envs: List[Env] - self.resolver: IUriResolver + #self.resolver#: IUriResolver # self.plugins: # self.interfaces: # self.redirects: +# - def __config(self): - self.envs = [] - self.resolvers = [] - - def add(self, config: ClientConfig) -> ClientConfigBuilder: + def add(self, config: ClientConfig):# -> ClientConfigBuilder: """ Appends each property of the supplied config object to the corresponding array of the builder's config. """ @@ -101,7 +99,7 @@ def get_default_client_config() -> dict[str, object]: return get_default_client_config() - def add_env(self, uri: Uri | str, env: Record[str, Any] ) -> ClientConfigBuilder: + def add_env(self, uri: Uri | str, env: Env): #: Record[str, Any] ) -> ClientConfigBuilder: """ see: https://github.com/polywrap/toolchain/blob/b57b1393d1aa5f82f39741d297040f84bf799ff1/packages/js/client-config-builder/src/ClientConfigBuilder.ts#L153-L168 Function that takes in an environment object and an Uri; @@ -118,7 +116,7 @@ def add_env(self, uri: Uri | str, env: Record[str, Any] ) -> ClientConfigBuilder env_uri: Uri = sanitize_uri(uri) - idx = self.__config + idx = self._config # Uri.equals(x.uri, ) @@ -151,10 +149,10 @@ def build(self) -> ClientConfig: Returns a sanitized config object from the builder's config. """ - if not self.resolver: - raise Exception('No Uri Resolver provided') + # if not self.resolvers: + # raise Exception('No Uri Resolver provided') pass - def build_partial(self) -> ClientConfigBuilder: + def build_partial(self):# -> ClientConfigBuilder: return self._config \ No newline at end of file diff --git a/packages/polywrap-client-config-builder/polywrap_client_config_builder/interface_client_config_builder.py b/packages/polywrap-client-config-builder/polywrap_client_config_builder/interface_client_config_builder.py index 8a1d3f2a..e1b7939b 100644 --- a/packages/polywrap-client-config-builder/polywrap_client_config_builder/interface_client_config_builder.py +++ b/packages/polywrap-client-config-builder/polywrap_client_config_builder/interface_client_config_builder.py @@ -1,28 +1,37 @@ -from client_config import ClientConfig +from .client_config import ClientConfig from polywrap_core import Uri, Env # missing CoreClientConfig, IUriPackage, IUriWrapper, IUriRedirect from polywrap_uri_resolvers import BaseUriResolver from abc import ABC, abstractmethod - +from functools import partial class IClientConfigBuilder(ABC): """Defines the basic interface for the Client Config Builder""" - @abstractmethod - def build() -> ClientConfig[Uri]: + + def add(self, config) -> ClientConfig: + """Appends each property of the supplied config object to the corresponding array of the builder's config.""" + self.add_envs(config.envs) pass + @abstractmethod - def build_core_config() -> CoreClientConfig : + def build():# -> ClientConfig[Uri]: + """Returns a sanitized config object from the builder's config.""" pass + # @abstractmethod + # def build_core_config() -> CoreClientConfig: + # pass + # @abstractmethod # def add(config: ) - @abstractmethod - def add_defaults() -> IClientConfigBuilder: - pass + # @abstractmethod + # def add_defaults(self) -> IClientConfigBuilder: + # """Adds the defaultClientConfig object.""" + # pass @abstractmethod def add_env(): diff --git a/packages/polywrap-client-config-builder/tests/test_client_config_builder.py b/packages/polywrap-client-config-builder/tests/test_client_config_builder.py index 86da421b..85859937 100644 --- a/packages/polywrap-client-config-builder/tests/test_client_config_builder.py +++ b/packages/polywrap-client-config-builder/tests/test_client_config_builder.py @@ -4,18 +4,29 @@ from polywrap_core.types.uri import Uri from polywrap_core.types.uri_resolver import IUriResolver from polywrap_client_config_builder import ClientConfigBuilder +import pytest test_envs: List[Env] = [ Env(uri = Uri("wrap://ens/test.plugin.one"), env = { 'test': "value" }), - Env(uri= Uri("wrap://ens/test.plugin.two"), env= { 'test': "value" }), + Env(uri = Uri("wrap://ens/test.plugin.two"), env = { 'test': "value" }), ] client = ClientConfigBuilder() +def test_client_config_builder_adds_envs(test_envs: List[Env]): + print(client) + for env in test_envs: + print('adding an env', env) + client.add_env(env.uri, env.env) + + print(client) + return client + def test_client_config_builder_adds_default_config(): print(client.build_partial()) # print(client.add_defaults().build_partial()) print(type(client.build_partial())) + print(client.envs) print(type(client.build())) assert False @@ -27,4 +38,8 @@ def test_client_config_builder_adds_default_config(): # pass def test_client_config_builder_adds_uri_resolver(): + pass + +@pytest.mark.skip("Not implemented") +def test_client_config_builder_adds_plugin(): pass \ No newline at end of file From 112944fa45670a5e338204ec05eb3c58059874f0 Mon Sep 17 00:00:00 2001 From: DaoAdvocate <12145726+rihp@users.noreply.github.com> Date: Sun, 6 Nov 2022 00:35:30 +0100 Subject: [PATCH 16/40] wip: simple envs feature --- .../base_client_config.py | 104 +++++++++++++++++- .../client_config_builder.py | 90 +-------------- .../interface_client_config_builder.py | 23 ++-- .../tests/test_client_config_builder.py | 32 +++--- 4 files changed, 131 insertions(+), 118 deletions(-) diff --git a/packages/polywrap-client-config-builder/polywrap_client_config_builder/base_client_config.py b/packages/polywrap-client-config-builder/polywrap_client_config_builder/base_client_config.py index 67388667..c6a06bcd 100644 --- a/packages/polywrap-client-config-builder/polywrap_client_config_builder/base_client_config.py +++ b/packages/polywrap-client-config-builder/polywrap_client_config_builder/base_client_config.py @@ -1,11 +1,111 @@ -#from .client_config import ClientConfig +from .client_config import ClientConfig from .interface_client_config_builder import IClientConfigBuilder +from polywrap_core.types.uri import Uri +from polywrap_core.types.env import Env +from typing import Any, Dict + #from .client_config_builder import ClientConfigBuilder class BaseClientConfigBuilder(IClientConfigBuilder): """A concrete class of the Client Config Builder, which uses the IClientConfigBuilder Abstract Base Class""" - pass + def __init__(self): + self._config = { + 'envs': [], + #'resolvers': [] + } + + def __str__(self) -> str: + return self._config.__str__() + + @property + def authority(self) -> str: + return self._config.authority + + def add(self, config: ClientConfig):# -> ClientConfigBuilder: + """ + Appends each property of the supplied config object to the corresponding array of the builder's config. + """ + if config.envs: + for env in config.envs: + self.add_env(env.uri, env.env) + + if config.resolver: + self.set_resolver(config.resolver) + + return self + + + def add_env(self, uri: Uri, env: Env): #: Record[str, Any] ) -> ClientConfigBuilder: + """ + see: https://github.com/polywrap/toolchain/blob/b57b1393d1aa5f82f39741d297040f84bf799ff1/packages/js/client-config-builder/src/ClientConfigBuilder.ts#L153-L168 + Function that takes in an environment object and an Uri; + - It parses the URI + - If the env is already defined, its values are updated + - If the env is not defined, the values are added to the end of the Env array + """ + # if type(uri) == str: + # env_uri: Uri = Uri.parse_uri(uri) + # elif type(uri) == Uri: + # env_uri: Uri = uri + # else: + # raise TypeError("uri is not string nor URI") + + + def sanitize_uri(uri: str | Uri) -> Uri: + """ + This is the Uri.from function of the JS client + """ + if type(uri) == str: + return Uri(uri) + if Uri.is_uri(uri): + return uri + + raise TypeError("Unknown uri type, cannot convert") + + env_uri: Uri = sanitize_uri(uri) + print(uri, env) + print('sanitized uri', env_uri) + #idx = self._config + + # Uri.equals(x.uri, ) + + # if idx >= 0: + # self.envs[idx].env = {**self.envs[idx].env, **env,} + # else: + # self.envs.append(Env(uri=env_uri, env=env)) + return self + + def add_envs(self, envs: list[Env]) -> object: + for env in envs: + self.add_envs(env.uri, env.env) + return self + + def remove_env(self, uri: Uri | str ): + # very similar to add_env + pass + + def set_env(self, uri: Uri | str, env: Dict[str, Any] ): + # very similar to add_env + pass + + #def set_resolver(self, resolver: IUriResolver): + # self.resolver = resolver + # return self + + + def build(self) -> ClientConfig: + """ + Returns a sanitized config object from the builder's config. + """ + + # if not self.resolvers: + # raise Exception('No Uri Resolver provided') + + pass + + # def build_partial(self):# -> ClientConfigBuilder: + # return self._config diff --git a/packages/polywrap-client-config-builder/polywrap_client_config_builder/client_config_builder.py b/packages/polywrap-client-config-builder/polywrap_client_config_builder/client_config_builder.py index 50ee9313..592f08fe 100644 --- a/packages/polywrap-client-config-builder/polywrap_client_config_builder/client_config_builder.py +++ b/packages/polywrap-client-config-builder/polywrap_client_config_builder/client_config_builder.py @@ -22,16 +22,6 @@ # https://github.com/polywrap/toolchain/tree/origin-0.10-dev/packages/js/client-config-builder/src print(ClientConfig) -def sanitize_uri(uri: str | Uri) -> Uri: - """ - This is the Uri.from function of the JS client - """ - if type(uri) == str: - return Uri(uri) - if Uri.is_uri(uri): - return uri - - raise TypeError("Unknown uri type, cannot convert") class ClientConfigBuilder(BaseClientConfigBuilder): @@ -39,27 +29,7 @@ class ClientConfigBuilder(BaseClientConfigBuilder): Used to instantiate the `ClientConfig` object necessary to invoke any wrapper. """ - def __init__(self): - self.envs: List[Env] - #self.resolver#: IUriResolver - # self.plugins: - # self.interfaces: - # self.redirects: -# - - def add(self, config: ClientConfig):# -> ClientConfigBuilder: - """ - Appends each property of the supplied config object to the corresponding array of the builder's config. - """ - if config.envs: - for env in config.envs: - self.add_env(env.uri, env.env) - - if config.resolver: - self.set_resolver(config.resolver) - - return self - + def add_defaults(self, wrapper_cache: WrapperCache | Any ={'blank': Wrapper}): """ Adds the defaultClientConfig object. @@ -98,61 +68,3 @@ def get_default_client_config() -> dict[str, object]: } return get_default_client_config() - - def add_env(self, uri: Uri | str, env: Env): #: Record[str, Any] ) -> ClientConfigBuilder: - """ - see: https://github.com/polywrap/toolchain/blob/b57b1393d1aa5f82f39741d297040f84bf799ff1/packages/js/client-config-builder/src/ClientConfigBuilder.ts#L153-L168 - Function that takes in an environment object and an Uri; - - It parses the URI - - If the env is already defined, its values are updated - - If the env is not defined, the values are added to the end of the Env array - """ - # if type(uri) == str: - # env_uri: Uri = Uri.parse_uri(uri) - # elif type(uri) == Uri: - # env_uri: Uri = uri - # else: - # raise TypeError("uri is not string nor URI") - - env_uri: Uri = sanitize_uri(uri) - - idx = self._config - - # Uri.equals(x.uri, ) - - if idx >= 0: - self.envs[idx].env = {**self.envs[idx].env, **env,} - else: - self.envs.append(Env(uri=env_uri, env=env)) - return self - - def add_envs(self, envs: list[Env]) -> object: - for env in envs: - self.add_envs(env.uri, env.env) - return self - - def remove_env(self, uri: Uri | str ): - # very similar to add_env - pass - - def set_env(self, uri: Uri | str, env: Dict[str, Any] ): - # very similar to add_env - pass - - def set_resolver(self, resolver: IUriResolver): - self.resolver = resolver - return self - - - def build(self) -> ClientConfig: - """ - Returns a sanitized config object from the builder's config. - """ - - # if not self.resolvers: - # raise Exception('No Uri Resolver provided') - - pass - - def build_partial(self):# -> ClientConfigBuilder: - return self._config \ No newline at end of file diff --git a/packages/polywrap-client-config-builder/polywrap_client_config_builder/interface_client_config_builder.py b/packages/polywrap-client-config-builder/polywrap_client_config_builder/interface_client_config_builder.py index e1b7939b..a8fddd11 100644 --- a/packages/polywrap-client-config-builder/polywrap_client_config_builder/interface_client_config_builder.py +++ b/packages/polywrap-client-config-builder/polywrap_client_config_builder/interface_client_config_builder.py @@ -1,4 +1,4 @@ -from .client_config import ClientConfig +# from .client_config import ClientConfig from polywrap_core import Uri, Env # missing CoreClientConfig, IUriPackage, IUriWrapper, IUriRedirect @@ -10,11 +10,10 @@ class IClientConfigBuilder(ABC): """Defines the basic interface for the Client Config Builder""" - def add(self, config) -> ClientConfig: - """Appends each property of the supplied config object to the corresponding array of the builder's config.""" - self.add_envs(config.envs) - pass - + # def add(self, config) -> ClientConfig: + # """Appends each property of the supplied config object to the corresponding array of the builder's config.""" + # self.add_envs(config.envs) + # pass @abstractmethod def build():# -> ClientConfig[Uri]: @@ -37,10 +36,10 @@ def build():# -> ClientConfig[Uri]: def add_env(): pass - @abstractmethod - def add_envs(): - pass + # @abstractmethod + # def add_envs(): + # pass - @abstractmethod - def remove_env(): - pass + # @abstractmethod + # def remove_env(): + # pass diff --git a/packages/polywrap-client-config-builder/tests/test_client_config_builder.py b/packages/polywrap-client-config-builder/tests/test_client_config_builder.py index 85859937..d8a6a21a 100644 --- a/packages/polywrap-client-config-builder/tests/test_client_config_builder.py +++ b/packages/polywrap-client-config-builder/tests/test_client_config_builder.py @@ -1,4 +1,3 @@ -from multiprocessing.connection import Client from typing import List from polywrap_core.types.env import Env from polywrap_core.types.uri import Uri @@ -11,26 +10,29 @@ Env(uri = Uri("wrap://ens/test.plugin.two"), env = { 'test': "value" }), ] -client = ClientConfigBuilder() -def test_client_config_builder_adds_envs(test_envs: List[Env]): +def test_client_config_builder_add_env(): + client = ClientConfigBuilder().add_env( + Uri("wrap://ens/test.plugin.one"), + Env(uri = Uri("wrap://ens/test.plugin.one"), env = { 'test': "value" }), + ) + print(client._config['envs']) + print(client) for env in test_envs: print('adding an env', env) - client.add_env(env.uri, env.env) + client = client.add_env(env.uri, env.env) print(client) - return client - -def test_client_config_builder_adds_default_config(): - print(client.build_partial()) - # print(client.add_defaults().build_partial()) - print(type(client.build_partial())) - print(client.envs) - print(type(client.build())) - - assert False - + return False + +# def test_client_config_builder_adds_default_config(): +# #print(client.build_partial()) +# # print(client.add_defaults().build_partial()) +# #print(type(client.build_partial())) +# print(client.envs) +# print(type(client.build())) +# pass # def test_client_config_builder_adds_config(): # envs: List[Env] = [] # resolver: IUriResolver = IUriResolver() From 723fd45ed21950ca2fd835244246e45dad64a1fe Mon Sep 17 00:00:00 2001 From: DaoAdvocate <12145726+rihp@users.noreply.github.com> Date: Sun, 6 Nov 2022 00:57:55 +0100 Subject: [PATCH 17/40] wip: simple envs feature add envs with bug --- .../base_client_config.py | 24 +++++++------------ .../tests/test_client_config_builder.py | 8 +++---- 2 files changed, 13 insertions(+), 19 deletions(-) diff --git a/packages/polywrap-client-config-builder/polywrap_client_config_builder/base_client_config.py b/packages/polywrap-client-config-builder/polywrap_client_config_builder/base_client_config.py index c6a06bcd..a52e415f 100644 --- a/packages/polywrap-client-config-builder/polywrap_client_config_builder/base_client_config.py +++ b/packages/polywrap-client-config-builder/polywrap_client_config_builder/base_client_config.py @@ -2,7 +2,7 @@ from .interface_client_config_builder import IClientConfigBuilder from polywrap_core.types.uri import Uri from polywrap_core.types.env import Env -from typing import Any, Dict +from typing import Any, Dict, List #from .client_config_builder import ClientConfigBuilder @@ -12,17 +12,17 @@ class BaseClientConfigBuilder(IClientConfigBuilder): """A concrete class of the Client Config Builder, which uses the IClientConfigBuilder Abstract Base Class""" def __init__(self): - self._config = { + self.config: Dict[str, list] = { 'envs': [], #'resolvers': [] } def __str__(self) -> str: - return self._config.__str__() + return self.config.__str__() @property def authority(self) -> str: - return self._config.authority + return self.config.authority def add(self, config: ClientConfig):# -> ClientConfigBuilder: """ @@ -32,8 +32,8 @@ def add(self, config: ClientConfig):# -> ClientConfigBuilder: for env in config.envs: self.add_env(env.uri, env.env) - if config.resolver: - self.set_resolver(config.resolver) + # if config.resolver: + # self.set_resolver(config.resolver) return self @@ -46,14 +46,8 @@ def add_env(self, uri: Uri, env: Env): #: Record[str, Any] ) -> ClientConfigBuil - If the env is already defined, its values are updated - If the env is not defined, the values are added to the end of the Env array """ - # if type(uri) == str: - # env_uri: Uri = Uri.parse_uri(uri) - # elif type(uri) == Uri: - # env_uri: Uri = uri - # else: - # raise TypeError("uri is not string nor URI") - + @staticmethod def sanitize_uri(uri: str | Uri) -> Uri: """ This is the Uri.from function of the JS client @@ -62,12 +56,12 @@ def sanitize_uri(uri: str | Uri) -> Uri: return Uri(uri) if Uri.is_uri(uri): return uri - raise TypeError("Unknown uri type, cannot convert") env_uri: Uri = sanitize_uri(uri) print(uri, env) print('sanitized uri', env_uri) + self.config['envs'].append(Env(uri=env_uri, env=env) ) #idx = self._config # Uri.equals(x.uri, ) @@ -80,7 +74,7 @@ def sanitize_uri(uri: str | Uri) -> Uri: def add_envs(self, envs: list[Env]) -> object: for env in envs: - self.add_envs(env.uri, env.env) + self.config.envs[env.env] = env.uri return self def remove_env(self, uri: Uri | str ): diff --git a/packages/polywrap-client-config-builder/tests/test_client_config_builder.py b/packages/polywrap-client-config-builder/tests/test_client_config_builder.py index d8a6a21a..1a0d0480 100644 --- a/packages/polywrap-client-config-builder/tests/test_client_config_builder.py +++ b/packages/polywrap-client-config-builder/tests/test_client_config_builder.py @@ -13,10 +13,10 @@ def test_client_config_builder_add_env(): client = ClientConfigBuilder().add_env( - Uri("wrap://ens/test.plugin.one"), - Env(uri = Uri("wrap://ens/test.plugin.one"), env = { 'test': "value" }), + uri=Uri("wrap://ens/test.plugin.one"), + env=Env(uri=Uri("wrap://ens/test.plugin.one"), env={ 'test': "value" }), ) - print(client._config['envs']) + print(client.config['envs']) print(client) for env in test_envs: @@ -24,7 +24,7 @@ def test_client_config_builder_add_env(): client = client.add_env(env.uri, env.env) print(client) - return False + assert False # def test_client_config_builder_adds_default_config(): # #print(client.build_partial()) From 1df2474393fba2e6b217856802a8de9a24fa79d7 Mon Sep 17 00:00:00 2001 From: DaoAdvocate <12145726+rihp@users.noreply.github.com> Date: Sun, 6 Nov 2022 17:25:12 +0100 Subject: [PATCH 18/40] wip: client config builder add env function should also update the env of the uri if the uri is already loaded --- .../base_client_config.py | 27 +++++++++++++--- .../interface_client_config_builder.py | 6 ++-- .../tests/test_client_config_builder.py | 31 +++++++++++-------- 3 files changed, 43 insertions(+), 21 deletions(-) diff --git a/packages/polywrap-client-config-builder/polywrap_client_config_builder/base_client_config.py b/packages/polywrap-client-config-builder/polywrap_client_config_builder/base_client_config.py index a52e415f..a1b07373 100644 --- a/packages/polywrap-client-config-builder/polywrap_client_config_builder/base_client_config.py +++ b/packages/polywrap-client-config-builder/polywrap_client_config_builder/base_client_config.py @@ -12,7 +12,7 @@ class BaseClientConfigBuilder(IClientConfigBuilder): """A concrete class of the Client Config Builder, which uses the IClientConfigBuilder Abstract Base Class""" def __init__(self): - self.config: Dict[str, list] = { + self.config: Dict[str, list[Env]] = { 'envs': [], #'resolvers': [] } @@ -38,7 +38,7 @@ def add(self, config: ClientConfig):# -> ClientConfigBuilder: return self - def add_env(self, uri: Uri, env: Env): #: Record[str, Any] ) -> ClientConfigBuilder: + def add_env(self, uri: Uri, env: Dict[str, Any]): #: Record[str, Any] ) -> ClientConfigBuilder: """ see: https://github.com/polywrap/toolchain/blob/b57b1393d1aa5f82f39741d297040f84bf799ff1/packages/js/client-config-builder/src/ClientConfigBuilder.ts#L153-L168 Function that takes in an environment object and an Uri; @@ -59,11 +59,28 @@ def sanitize_uri(uri: str | Uri) -> Uri: raise TypeError("Unknown uri type, cannot convert") env_uri: Uri = sanitize_uri(uri) - print(uri, env) - print('sanitized uri', env_uri) - self.config['envs'].append(Env(uri=env_uri, env=env) ) + print('sanitizing uri:', env_uri, "env:", env) + + Env(uri=env_uri, env=env) + print('appending env:', env_uri) + print(self.config['envs']) + + for client_env in self.config['envs']: + if client_env.env == env_uri: + print('this URI already exists in the config, and updating the env:', env_uri) + + client_env['env'] = env + return self + try: + print(self.config['envs'].index(Env(uri=env_uri, env=env))) + print("env already exists, updating") + except ValueError: + self.config['envs'].append(Env(uri=env_uri, env=env)) + #self.config['envs'].append(Env(uri=env_uri, env=env) ) + #idx = self._config + # Uri.equals(x.uri, ) # if idx >= 0: diff --git a/packages/polywrap-client-config-builder/polywrap_client_config_builder/interface_client_config_builder.py b/packages/polywrap-client-config-builder/polywrap_client_config_builder/interface_client_config_builder.py index a8fddd11..b0542340 100644 --- a/packages/polywrap-client-config-builder/polywrap_client_config_builder/interface_client_config_builder.py +++ b/packages/polywrap-client-config-builder/polywrap_client_config_builder/interface_client_config_builder.py @@ -1,10 +1,10 @@ # from .client_config import ClientConfig - from polywrap_core import Uri, Env # missing CoreClientConfig, IUriPackage, IUriWrapper, IUriRedirect - +#from .base_client_config import BaseClientConfigBuilder from polywrap_uri_resolvers import BaseUriResolver from abc import ABC, abstractmethod from functools import partial +from typing import Any, Dict, List class IClientConfigBuilder(ABC): """Defines the basic interface for the Client Config Builder""" @@ -33,7 +33,7 @@ def build():# -> ClientConfig[Uri]: # pass @abstractmethod - def add_env(): + def add_env(self, uri: Uri, env: Dict[str, Any]):# -> IClientConfigBuilder: pass # @abstractmethod diff --git a/packages/polywrap-client-config-builder/tests/test_client_config_builder.py b/packages/polywrap-client-config-builder/tests/test_client_config_builder.py index 1a0d0480..9572ccbe 100644 --- a/packages/polywrap-client-config-builder/tests/test_client_config_builder.py +++ b/packages/polywrap-client-config-builder/tests/test_client_config_builder.py @@ -5,27 +5,32 @@ from polywrap_client_config_builder import ClientConfigBuilder import pytest -test_envs: List[Env] = [ - Env(uri = Uri("wrap://ens/test.plugin.one"), env = { 'test': "value" }), - Env(uri = Uri("wrap://ens/test.plugin.two"), env = { 'test': "value" }), +test_envs1: List[Env] = [ + Env(uri = Uri("wrap://ens/test.plugin.one"), env = { 'color': "green", 'size': "medium" }), + Env(uri = Uri("wrap://ens/test.plugin.two"), env = { 'dog': "poodle", 'cat': "siamese" }), + ] + +test_envs2: List[Env] = [ + Env(uri = Uri("wrap://ens/test.plugin.one"), env = { 'color': "red", 'size': "small" }), + # Env(uri = Uri("wrap://ens/test.plugin.two"), env = { 'dog': "terrier", 'cat': "persian" }), + Env(uri = Uri("wrap://ens/test.plugin.three"), env = { 'vehicle': "bycicle", 'bird': "parrot", "fruit": "apple" }), ] def test_client_config_builder_add_env(): - client = ClientConfigBuilder().add_env( - uri=Uri("wrap://ens/test.plugin.one"), - env=Env(uri=Uri("wrap://ens/test.plugin.one"), env={ 'test': "value" }), - ) - print(client.config['envs']) + client = ClientConfigBuilder() # instantiate new client + for env in test_envs1: # add all the envs to client + client = client.add_env(env.uri, env.env) + #print(client.config['envs']) + assert client.config['envs'] == test_envs1 - print(client) - for env in test_envs: - print('adding an env', env) + for env in test_envs2: client = client.add_env(env.uri, env.env) - - print(client) + + print(client.config['envs']) assert False + # def test_client_config_builder_adds_default_config(): # #print(client.build_partial()) # # print(client.add_defaults().build_partial()) From 028c964a5b21b0210ae691ebe4b7d250ed9e4b56 Mon Sep 17 00:00:00 2001 From: DaoAdvocate <12145726+rihp@users.noreply.github.com> Date: Mon, 7 Nov 2022 09:54:22 +0100 Subject: [PATCH 19/40] wip: update_envs is able to update an env variable --- .../base_client_config.py | 101 ++++++++++++------ .../tests/test_client_config_builder.py | 37 +++++-- 2 files changed, 101 insertions(+), 37 deletions(-) diff --git a/packages/polywrap-client-config-builder/polywrap_client_config_builder/base_client_config.py b/packages/polywrap-client-config-builder/polywrap_client_config_builder/base_client_config.py index a1b07373..69d8a1b0 100644 --- a/packages/polywrap-client-config-builder/polywrap_client_config_builder/base_client_config.py +++ b/packages/polywrap-client-config-builder/polywrap_client_config_builder/base_client_config.py @@ -38,6 +38,51 @@ def add(self, config: ClientConfig):# -> ClientConfigBuilder: return self + + @staticmethod + def sanitize_uri(uri: str | Uri) -> Uri: + """ + This is the Uri.from function of the JS client + """ + if type(uri) == str: + return Uri(uri) + if Uri.is_uri(uri): + return uri + raise TypeError("Unknown uri type, cannot convert") + + + + def update_env(self, new_env: Env): + """ + Takes an Env class as input.(made of an uri and env variables) + If the env is already defined, its values are updated + If the env is not defined, raises an error + """ + # check the envs array and new env you want to load + print('loaded_envs', self.config['envs']) + print('new_env', new_env) + + # Check if both Envs have the same URI + all_uris: List[Uri | str] = [] + for e in self.config['envs']: + all_uris.append(e.uri) + + idx = all_uris.index(new_env.uri) + + if idx >= 0: + print("env already loaded in the envs array, updating") + self.config['envs'][idx] = new_env + return self + else: + print("env not loaded previously in the loaded_envs array, adding it for the first time") + # raise Exception("The Uri env has not been defined in the config") + return self.config['envs'].append(Env(uri=new_env.uri, env=new_env.env)) + + + print(update_env()) + assert False + + def add_env(self, uri: Uri, env: Dict[str, Any]): #: Record[str, Any] ) -> ClientConfigBuilder: """ see: https://github.com/polywrap/toolchain/blob/b57b1393d1aa5f82f39741d297040f84bf799ff1/packages/js/client-config-builder/src/ClientConfigBuilder.ts#L153-L168 @@ -46,36 +91,31 @@ def add_env(self, uri: Uri, env: Dict[str, Any]): #: Record[str, Any] ) -> Clien - If the env is already defined, its values are updated - If the env is not defined, the values are added to the end of the Env array """ + env_uri: Uri = self.sanitize_uri(uri) + self.config['envs'].append(Env(uri=env_uri, env=env)) + return self + + + # for client_env in self.config['envs']: + # print('here is the error', client_env) + # if client_env.env == env_uri: + # print('this URI already exists in the config, and updating the env:', env_uri) + # index = client_env['env'].index(client_env) + # client_env['env'][index] = env + # return self + # try: + # print(self.config['envs'].index(Env(uri=env_uri, env=env))) + # print("env already exists, updating") + # except ValueError: + # self.config['envs'].append(Env(uri=env_uri, env=env)) + + + + + + + - @staticmethod - def sanitize_uri(uri: str | Uri) -> Uri: - """ - This is the Uri.from function of the JS client - """ - if type(uri) == str: - return Uri(uri) - if Uri.is_uri(uri): - return uri - raise TypeError("Unknown uri type, cannot convert") - - env_uri: Uri = sanitize_uri(uri) - print('sanitizing uri:', env_uri, "env:", env) - - Env(uri=env_uri, env=env) - print('appending env:', env_uri) - print(self.config['envs']) - - for client_env in self.config['envs']: - if client_env.env == env_uri: - print('this URI already exists in the config, and updating the env:', env_uri) - - client_env['env'] = env - return self - try: - print(self.config['envs'].index(Env(uri=env_uri, env=env))) - print("env already exists, updating") - except ValueError: - self.config['envs'].append(Env(uri=env_uri, env=env)) #self.config['envs'].append(Env(uri=env_uri, env=env) ) #idx = self._config @@ -91,7 +131,8 @@ def sanitize_uri(uri: str | Uri) -> Uri: def add_envs(self, envs: list[Env]) -> object: for env in envs: - self.config.envs[env.env] = env.uri + pass + self.config['envs'][env.env] = env.uri return self def remove_env(self, uri: Uri | str ): diff --git a/packages/polywrap-client-config-builder/tests/test_client_config_builder.py b/packages/polywrap-client-config-builder/tests/test_client_config_builder.py index 9572ccbe..ab0dd6dc 100644 --- a/packages/polywrap-client-config-builder/tests/test_client_config_builder.py +++ b/packages/polywrap-client-config-builder/tests/test_client_config_builder.py @@ -5,29 +5,44 @@ from polywrap_client_config_builder import ClientConfigBuilder import pytest + +env_var1 = Env(uri = Uri("wrap://ens/test.plugin.one"), env = { 'color': "green", 'size': "medium" }) +env_var2 = Env(uri = Uri("wrap://ens/test.plugin.two"), env = { 'dog': "poodle", 'cat': "siamese" }) +env_var3 = Env(uri = Uri("wrap://ens/test.plugin.one"), env = { 'color': "red", 'size': "small" }) +env_var4 = Env(uri = Uri("wrap://ens/test.plugin.two"), env = { 'dog': "terrier", 'cat': "persian" }) +env_var5 = Env(uri = Uri("wrap://ens/test.plugin.three"), env = { 'vehicle': "bycicle", 'bird': "parrot", "fruit": "apple" }) + test_envs1: List[Env] = [ - Env(uri = Uri("wrap://ens/test.plugin.one"), env = { 'color': "green", 'size': "medium" }), - Env(uri = Uri("wrap://ens/test.plugin.two"), env = { 'dog': "poodle", 'cat': "siamese" }), + env_var1, + env_var2, ] test_envs2: List[Env] = [ - Env(uri = Uri("wrap://ens/test.plugin.one"), env = { 'color': "red", 'size': "small" }), - # Env(uri = Uri("wrap://ens/test.plugin.two"), env = { 'dog': "terrier", 'cat': "persian" }), - Env(uri = Uri("wrap://ens/test.plugin.three"), env = { 'vehicle': "bycicle", 'bird': "parrot", "fruit": "apple" }), + env_var3, env_var5 ] +@pytest.mark.skip(reason="wip") def test_client_config_builder_add_env(): client = ClientConfigBuilder() # instantiate new client for env in test_envs1: # add all the envs to client client = client.add_env(env.uri, env.env) - #print(client.config['envs']) assert client.config['envs'] == test_envs1 for env in test_envs2: client = client.add_env(env.uri, env.env) - print(client.config['envs']) + assert client.config['envs'] == [ + Env(uri=Uri('wrap://ens/test.plugin.one'), env={'color': 'red', 'size': 'small'}), + Env(uri=Uri("wrap://ens/test.plugin.two"), env={'dog': 'poodle', 'cat': 'siamese'}), + Env(uri=Uri("wrap://ens/test.plugin.three"), env={'vehicle': 'bycicle', 'bird': 'parrot', 'fruit': 'apple'})] + + +def test_client_config_builder_update_envs(): + client = ClientConfigBuilder() # instantiate new + client = client.add_env(env_var1.uri, env_var1.env) + client.update_env(env_var3) # add basic envs to client + print(client.config) assert False @@ -44,6 +59,14 @@ def test_client_config_builder_add_env(): # config = ClientConfigBuilder(env).add({}) # pass +@pytest.mark.skip(reason="not implemented yet") +def test_client_config_builder_adds_resolvers(): + """tests that the client config builder can add resolver objects and if they are already in the list, it will update them""" + client = ClientConfigBuilder() # instantiate new client + for resolver in test_resolvers1: + client = client.add_resolver(resolver) + assert client.config['resolvers'] == test_resolvers1 + def test_client_config_builder_adds_uri_resolver(): pass From 26b911da74dce4489170161a6d5a10260be62829 Mon Sep 17 00:00:00 2001 From: DaoAdvocate <12145726+rihp@users.noreply.github.com> Date: Mon, 7 Nov 2022 10:17:57 +0100 Subject: [PATCH 20/40] Envs add / update working alright --- .../base_client_config.py | 14 +++++----- .../tests/test_client_config_builder.py | 28 +++++++++++-------- 2 files changed, 23 insertions(+), 19 deletions(-) diff --git a/packages/polywrap-client-config-builder/polywrap_client_config_builder/base_client_config.py b/packages/polywrap-client-config-builder/polywrap_client_config_builder/base_client_config.py index 69d8a1b0..dc8e585b 100644 --- a/packages/polywrap-client-config-builder/polywrap_client_config_builder/base_client_config.py +++ b/packages/polywrap-client-config-builder/polywrap_client_config_builder/base_client_config.py @@ -67,20 +67,20 @@ def update_env(self, new_env: Env): for e in self.config['envs']: all_uris.append(e.uri) - idx = all_uris.index(new_env.uri) + try: + idx = all_uris.index(new_env.uri) + except ValueError: + idx = 'undefined' - if idx >= 0: + if type(idx) == int: print("env already loaded in the envs array, updating") self.config['envs'][idx] = new_env return self else: print("env not loaded previously in the loaded_envs array, adding it for the first time") - # raise Exception("The Uri env has not been defined in the config") - return self.config['envs'].append(Env(uri=new_env.uri, env=new_env.env)) - + self.config['envs'].append(Env(uri=new_env.uri, env=new_env.env)) + return self - print(update_env()) - assert False def add_env(self, uri: Uri, env: Dict[str, Any]): #: Record[str, Any] ) -> ClientConfigBuilder: diff --git a/packages/polywrap-client-config-builder/tests/test_client_config_builder.py b/packages/polywrap-client-config-builder/tests/test_client_config_builder.py index ab0dd6dc..4288dae7 100644 --- a/packages/polywrap-client-config-builder/tests/test_client_config_builder.py +++ b/packages/polywrap-client-config-builder/tests/test_client_config_builder.py @@ -22,29 +22,33 @@ ] -@pytest.mark.skip(reason="wip") +#@pytest.mark.skip(reason="wip") def test_client_config_builder_add_env(): client = ClientConfigBuilder() # instantiate new client for env in test_envs1: # add all the envs to client client = client.add_env(env.uri, env.env) assert client.config['envs'] == test_envs1 - for env in test_envs2: - client = client.add_env(env.uri, env.env) - print(client.config['envs']) - assert client.config['envs'] == [ - Env(uri=Uri('wrap://ens/test.plugin.one'), env={'color': 'red', 'size': 'small'}), - Env(uri=Uri("wrap://ens/test.plugin.two"), env={'dog': 'poodle', 'cat': 'siamese'}), - Env(uri=Uri("wrap://ens/test.plugin.three"), env={'vehicle': 'bycicle', 'bird': 'parrot', 'fruit': 'apple'})] - - def test_client_config_builder_update_envs(): - client = ClientConfigBuilder() # instantiate new + client = ClientConfigBuilder() # instantiate new client client = client.add_env(env_var1.uri, env_var1.env) client.update_env(env_var3) # add basic envs to client print(client.config) - assert False + assert client.config['envs'] == [env_var3] +def test_client_config_builder_updates_many_envs(): + client = ClientConfigBuilder() # instantiate new client + for new_env in test_envs1: + client = client.add_env(new_env.uri, new_env.env) + for new_env in test_envs2: + client = client.update_env(new_env) + #print(client.config['envs']) + assert client.config['envs'] == [ + Env(uri=Uri('wrap://ens/test.plugin.one'), env={'color': 'red', 'size': 'small'}), + Env(uri=Uri("wrap://ens/test.plugin.two"), env={'dog': 'poodle', 'cat': 'siamese'}), + Env(uri=Uri("wrap://ens/test.plugin.three"), env={'vehicle': 'bycicle', 'bird': 'parrot', 'fruit': 'apple'})] + + pass # def test_client_config_builder_adds_default_config(): # #print(client.build_partial()) From fba1485a6eb913736d10e4c0c4182543fa605b41 Mon Sep 17 00:00:00 2001 From: DaoAdvocate <12145726+rihp@users.noreply.github.com> Date: Mon, 7 Nov 2022 12:30:48 +0100 Subject: [PATCH 21/40] wip: improving baseclientconfigbuilder and tests --- .../base_client_config.py | 92 ++++++------------- .../tests/test_client_config_builder.py | 19 ++-- 2 files changed, 36 insertions(+), 75 deletions(-) diff --git a/packages/polywrap-client-config-builder/polywrap_client_config_builder/base_client_config.py b/packages/polywrap-client-config-builder/polywrap_client_config_builder/base_client_config.py index dc8e585b..dd9e96c7 100644 --- a/packages/polywrap-client-config-builder/polywrap_client_config_builder/base_client_config.py +++ b/packages/polywrap-client-config-builder/polywrap_client_config_builder/base_client_config.py @@ -49,18 +49,38 @@ def sanitize_uri(uri: str | Uri) -> Uri: if Uri.is_uri(uri): return uri raise TypeError("Unknown uri type, cannot convert") + + def add_env(self, uri: Uri, env: Dict[str, Any]): #: Record[str, Any] ) -> ClientConfigBuilder: + """ + Function that takes in an environment object and an Uri; + - It sanitizes the URI + - If the env is already defined, it adds the new env variables to the URI without deleting the old ones + - If the env is not defined, the values are added to the end of the Env array + """ + env_uri: Uri = self.sanitize_uri(uri) + + + self.config['envs'].append(Env(uri=env_uri, env=env)) + return self + + + def add_envs(self, envs: list[Env]) -> object: + for env in envs: + pass + self.config['envs'][env.env] = env.uri + return self - def update_env(self, new_env: Env): + def set_env(self, new_env: Env): # todo: rename to set_env """ Takes an Env class as input.(made of an uri and env variables) - If the env is already defined, its values are updated - If the env is not defined, raises an error + - If the env is already defined, its values are updated and the old ones are deleted + - If the env is not defined, the values are added to the end of the Env array """ # check the envs array and new env you want to load - print('loaded_envs', self.config['envs']) - print('new_env', new_env) + # print('loaded_envs', self.config['envs']) + # print('new_env', new_env) # Check if both Envs have the same URI all_uris: List[Uri | str] = [] @@ -73,75 +93,21 @@ def update_env(self, new_env: Env): idx = 'undefined' if type(idx) == int: - print("env already loaded in the envs array, updating") + print("env already loaded in the envs array, updating by substituring loaded_env for new_env") self.config['envs'][idx] = new_env return self else: print("env not loaded previously in the loaded_envs array, adding it for the first time") self.config['envs'].append(Env(uri=new_env.uri, env=new_env.env)) return self - - - - def add_env(self, uri: Uri, env: Dict[str, Any]): #: Record[str, Any] ) -> ClientConfigBuilder: - """ - see: https://github.com/polywrap/toolchain/blob/b57b1393d1aa5f82f39741d297040f84bf799ff1/packages/js/client-config-builder/src/ClientConfigBuilder.ts#L153-L168 - Function that takes in an environment object and an Uri; - - It parses the URI - - If the env is already defined, its values are updated - - If the env is not defined, the values are added to the end of the Env array - """ - env_uri: Uri = self.sanitize_uri(uri) - self.config['envs'].append(Env(uri=env_uri, env=env)) - return self - - - # for client_env in self.config['envs']: - # print('here is the error', client_env) - # if client_env.env == env_uri: - # print('this URI already exists in the config, and updating the env:', env_uri) - # index = client_env['env'].index(client_env) - # client_env['env'][index] = env - # return self - # try: - # print(self.config['envs'].index(Env(uri=env_uri, env=env))) - # print("env already exists, updating") - # except ValueError: - # self.config['envs'].append(Env(uri=env_uri, env=env)) - - - - - - - - - #self.config['envs'].append(Env(uri=env_uri, env=env) ) - - #idx = self._config - - - # Uri.equals(x.uri, ) - - # if idx >= 0: - # self.envs[idx].env = {**self.envs[idx].env, **env,} - # else: - # self.envs.append(Env(uri=env_uri, env=env)) - return self - - def add_envs(self, envs: list[Env]) -> object: - for env in envs: - pass - self.config['envs'][env.env] = env.uri - return self def remove_env(self, uri: Uri | str ): # very similar to add_env pass - def set_env(self, uri: Uri | str, env: Dict[str, Any] ): - # very similar to add_env - pass + # def set_env(self, uri: Uri | str, env: Dict[str, Any] ): + # # very similar to add_env + # pass #def set_resolver(self, resolver: IUriResolver): # self.resolver = resolver diff --git a/packages/polywrap-client-config-builder/tests/test_client_config_builder.py b/packages/polywrap-client-config-builder/tests/test_client_config_builder.py index 4288dae7..876ad6ee 100644 --- a/packages/polywrap-client-config-builder/tests/test_client_config_builder.py +++ b/packages/polywrap-client-config-builder/tests/test_client_config_builder.py @@ -13,41 +13,36 @@ env_var5 = Env(uri = Uri("wrap://ens/test.plugin.three"), env = { 'vehicle': "bycicle", 'bird': "parrot", "fruit": "apple" }) test_envs1: List[Env] = [ - env_var1, - env_var2, + env_var1, env_var2, ] test_envs2: List[Env] = [ env_var3, env_var5 ] - -#@pytest.mark.skip(reason="wip") def test_client_config_builder_add_env(): client = ClientConfigBuilder() # instantiate new client for env in test_envs1: # add all the envs to client client = client.add_env(env.uri, env.env) assert client.config['envs'] == test_envs1 -def test_client_config_builder_update_envs(): +def test_client_config_builder_set_env(): client = ClientConfigBuilder() # instantiate new client client = client.add_env(env_var1.uri, env_var1.env) - client.update_env(env_var3) # add basic envs to client + client.set_env(env_var3) # add basic envs to client print(client.config) assert client.config['envs'] == [env_var3] -def test_client_config_builder_updates_many_envs(): +def test_client_config_builder_set_many_envs(): client = ClientConfigBuilder() # instantiate new client - for new_env in test_envs1: + for new_env in test_envs1: #add basic envs client = client.add_env(new_env.uri, new_env.env) - for new_env in test_envs2: - client = client.update_env(new_env) - #print(client.config['envs']) + for new_env in test_envs2: # set the new envs, which should overwrite the old ones + client = client.set_env(new_env) assert client.config['envs'] == [ Env(uri=Uri('wrap://ens/test.plugin.one'), env={'color': 'red', 'size': 'small'}), Env(uri=Uri("wrap://ens/test.plugin.two"), env={'dog': 'poodle', 'cat': 'siamese'}), Env(uri=Uri("wrap://ens/test.plugin.three"), env={'vehicle': 'bycicle', 'bird': 'parrot', 'fruit': 'apple'})] - pass # def test_client_config_builder_adds_default_config(): From 53fcfa3cc823ebfecac764051bc5d66c360a7179 Mon Sep 17 00:00:00 2001 From: DaoAdvocate <12145726+rihp@users.noreply.github.com> Date: Mon, 7 Nov 2022 20:40:29 +0100 Subject: [PATCH 22/40] wip: maybe broken, changing CoreClient type to use dicts --- .../base_client_config.py | 20 ++++++++++-------- .../client_config.py | 7 ++++--- .../interface_client_config_builder.py | 2 +- .../tests/test_client_config_builder.py | 21 +++++++++++++++++++ .../typings/polywrap_core/types/client.pyi | 3 ++- .../polywrap_core/types/client.py | 4 ++-- 6 files changed, 41 insertions(+), 16 deletions(-) diff --git a/packages/polywrap-client-config-builder/polywrap_client_config_builder/base_client_config.py b/packages/polywrap-client-config-builder/polywrap_client_config_builder/base_client_config.py index dd9e96c7..3949a9ce 100644 --- a/packages/polywrap-client-config-builder/polywrap_client_config_builder/base_client_config.py +++ b/packages/polywrap-client-config-builder/polywrap_client_config_builder/base_client_config.py @@ -1,20 +1,21 @@ -from .client_config import ClientConfig +from polywrap_core.types.client import ClientConfig from .interface_client_config_builder import IClientConfigBuilder from polywrap_core.types.uri import Uri from polywrap_core.types.env import Env from typing import Any, Dict, List -#from .client_config_builder import ClientConfigBuilder +from .client_config_builder import ClientConfigBuilder class BaseClientConfigBuilder(IClientConfigBuilder): """A concrete class of the Client Config Builder, which uses the IClientConfigBuilder Abstract Base Class""" - + config: ClientConfig def __init__(self): - self.config: Dict[str, list[Env]] = { + self.config:= { 'envs': [], - #'resolvers': [] + 'resolvers': [], + 'interfaces': [] } def __str__(self) -> str: @@ -24,7 +25,7 @@ def __str__(self) -> str: def authority(self) -> str: return self.config.authority - def add(self, config: ClientConfig):# -> ClientConfigBuilder: + def add(self, config: ClientConfig) -> ClientConfigBuilder: """ Appends each property of the supplied config object to the corresponding array of the builder's config. """ @@ -54,12 +55,13 @@ def add_env(self, uri: Uri, env: Dict[str, Any]): #: Record[str, Any] ) -> Clien """ Function that takes in an environment object and an Uri; - It sanitizes the URI - - If the env is already defined, it adds the new env variables to the URI without deleting the old ones + - If the env is already defined, and the env variables AREN'T included already: + - It adds the new env variables to the existing env, without modifying the old ones + - If the env is already defined, and the env variables ARE included already: + - It updates the existing env variables with the new values - If the env is not defined, the values are added to the end of the Env array """ env_uri: Uri = self.sanitize_uri(uri) - - self.config['envs'].append(Env(uri=env_uri, env=env)) return self diff --git a/packages/polywrap-client-config-builder/polywrap_client_config_builder/client_config.py b/packages/polywrap-client-config-builder/polywrap_client_config_builder/client_config.py index 4a503349..28255ac6 100644 --- a/packages/polywrap-client-config-builder/polywrap_client_config_builder/client_config.py +++ b/packages/polywrap-client-config-builder/polywrap_client_config_builder/client_config.py @@ -5,7 +5,7 @@ from polywrap_core import Uri, Env # from polywrap_uri_resolvers import uriresolverlike -> Do this after finishing Envs from dataclasses import dataclass -from typing import TypeVar, Generic, List +from typing import TypeVar, Generic, List, Dict, Any #TUri = TypeVar('TUri', Uri) @dataclass(slots=True, kw_only=True) @@ -14,5 +14,6 @@ class ClientConfig: This Abstract class is used to configure the polywrap client before it executes a call The ClientConfig class is created and modified with the ClientConfigBuilder module """ - envs: List[Env] - #resolver: List[Any] # IUriResolver # -> UriResolverLike \ No newline at end of file + envs: Dict[Uri, Env: Dict[str, Any]] + interfaces: Dict[Uri, List[Uri]] + resolver: IUriResolver \ No newline at end of file diff --git a/packages/polywrap-client-config-builder/polywrap_client_config_builder/interface_client_config_builder.py b/packages/polywrap-client-config-builder/polywrap_client_config_builder/interface_client_config_builder.py index b0542340..e3add8b8 100644 --- a/packages/polywrap-client-config-builder/polywrap_client_config_builder/interface_client_config_builder.py +++ b/packages/polywrap-client-config-builder/polywrap_client_config_builder/interface_client_config_builder.py @@ -33,7 +33,7 @@ def build():# -> ClientConfig[Uri]: # pass @abstractmethod - def add_env(self, uri: Uri, env: Dict[str, Any]):# -> IClientConfigBuilder: + def add_env(self, uri: Uri, env: Dict[str, Any]):# -> IClientConfigBuilder: pass # @abstractmethod diff --git a/packages/polywrap-client-config-builder/tests/test_client_config_builder.py b/packages/polywrap-client-config-builder/tests/test_client_config_builder.py index 876ad6ee..0d366cb0 100644 --- a/packages/polywrap-client-config-builder/tests/test_client_config_builder.py +++ b/packages/polywrap-client-config-builder/tests/test_client_config_builder.py @@ -6,6 +6,7 @@ import pytest +env_var0 = Env(uri = Uri("wrap://ens/test.plugin.one"), env = { 'color': "yellow", 'size': "large" }) env_var1 = Env(uri = Uri("wrap://ens/test.plugin.one"), env = { 'color': "green", 'size': "medium" }) env_var2 = Env(uri = Uri("wrap://ens/test.plugin.two"), env = { 'dog': "poodle", 'cat': "siamese" }) env_var3 = Env(uri = Uri("wrap://ens/test.plugin.one"), env = { 'color': "red", 'size': "small" }) @@ -20,12 +21,32 @@ env_var3, env_var5 ] +test_envs3: List[Env] = [ + env_var1, env_var2, env_var3, env_var4, env_var5 +] + def test_client_config_builder_add_env(): client = ClientConfigBuilder() # instantiate new client for env in test_envs1: # add all the envs to client client = client.add_env(env.uri, env.env) assert client.config['envs'] == test_envs1 + client = client.add_env(env_var0.uri, env_var0.env) + print(client) + pass #assert client.config['envs'] == + +def test_client_add_envs(): + client = ClientConfigBuilder() # instantiate new client + for env in test_envs3: + client = client.add_env(env.uri, env.env) + # assert client.config['envs'] == [ + # Env(uri = Uri("wrap://ens/test.plugin.one"), env = { 'color': "green", 'size': "medium" }) + # env_var2 = Env(uri = Uri("wrap://ens/test.plugin.two"), env = { 'dog': "poodle", 'cat': "siamese" }) + # env_var3 = Env(uri = Uri("wrap://ens/test.plugin.one"), env = { 'color': "red", 'size': "small" }) + # env_var4 = Env(uri = Uri("wrap://ens/test.plugin.two"), env = { 'dog': "terrier", 'cat': "persian" }) + # env_var5 + # ] + def test_client_config_builder_set_env(): client = ClientConfigBuilder() # instantiate new client client = client.add_env(env_var1.uri, env_var1.env) diff --git a/packages/polywrap-client-config-builder/typings/polywrap_core/types/client.pyi b/packages/polywrap-client-config-builder/typings/polywrap_core/types/client.pyi index 112e5c60..cc6d3e8e 100644 --- a/packages/polywrap-client-config-builder/typings/polywrap_core/types/client.pyi +++ b/packages/polywrap-client-config-builder/typings/polywrap_core/types/client.pyi @@ -13,7 +13,8 @@ from .uri_resolver_handler import UriResolverHandler @dataclass(slots=True, kw_only=True) class ClientConfig: - envs: List[Env] = ... + envs: Dict[Uri, Env: Dict[str, Any]] = field(default_factory=list) + interfaces: Dict[Uri, List[Uri]] resolver: IUriResolver diff --git a/packages/polywrap-core/polywrap_core/types/client.py b/packages/polywrap-core/polywrap_core/types/client.py index 46845bac..09e813c2 100644 --- a/packages/polywrap-core/polywrap_core/types/client.py +++ b/packages/polywrap-core/polywrap_core/types/client.py @@ -17,8 +17,8 @@ @dataclass(slots=True, kw_only=True) class ClientConfig: - envs: List[Env] = field(default_factory=list) - interfaces: List[InterfaceImplementations] = field(default_factory=list) + envs: Dict[Uri, Env: Dict[str, Any]] = field(default_factory=list) + interfaces: Dict[Uri, List[Uri]] resolver: IUriResolver From 98f13a4a2eba732758c31f5ccef0eff39b250e3e Mon Sep 17 00:00:00 2001 From: DaoAdvocate <12145726+rihp@users.noreply.github.com> Date: Tue, 8 Nov 2022 14:00:18 +0100 Subject: [PATCH 23/40] wip: cleaner clientconfig --- packages/polywrap-client/tests/test_client.py | 4 ++-- packages/polywrap-core/polywrap_core/types/client.py | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/polywrap-client/tests/test_client.py b/packages/polywrap-client/tests/test_client.py index fcb3c8db..59b42be0 100644 --- a/packages/polywrap-client/tests/test_client.py +++ b/packages/polywrap-client/tests/test_client.py @@ -86,12 +86,12 @@ async def test_env(): client = PolywrapClient( config=PolywrapClientConfig( - envs=[Env(uri=uri, env=env)], + envs={uri: env}, resolver=uri_resolver, ) ) options = InvokerOptions( - uri=uri, method="externalEnvMethod", args={}, encode_result=False + uri=uri, method="externalEnvMethod", args={}, encode_result=False, env=env ) result = await client.invoke(options) diff --git a/packages/polywrap-core/polywrap_core/types/client.py b/packages/polywrap-core/polywrap_core/types/client.py index 46845bac..bfa239a0 100644 --- a/packages/polywrap-core/polywrap_core/types/client.py +++ b/packages/polywrap-core/polywrap_core/types/client.py @@ -2,7 +2,7 @@ from abc import abstractmethod from dataclasses import dataclass, field -from typing import List, Optional, Union +from typing import List, Optional, Union, Dict, Any from polywrap_manifest import AnyWrapManifest, DeserializeManifestOptions from polywrap_result import Result @@ -17,7 +17,8 @@ @dataclass(slots=True, kw_only=True) class ClientConfig: - envs: List[Env] = field(default_factory=list) + # TODO is this a naive solution? the `Any` type should be more specific (str | Uri | int, etc.) + envs: Dict[Uri, Dict[str, Any]] = field(default_factory=dict) interfaces: List[InterfaceImplementations] = field(default_factory=list) resolver: IUriResolver From ba0ca7556cd51acfec790a8267599d8d18de9fae Mon Sep 17 00:00:00 2001 From: DaoAdvocate <12145726+rihp@users.noreply.github.com> Date: Tue, 8 Nov 2022 14:42:16 +0100 Subject: [PATCH 24/40] wip: error: __wrap_abort: Missing required property: externalArray: UInt32 --- packages/polywrap-client/tests/test_client.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/polywrap-client/tests/test_client.py b/packages/polywrap-client/tests/test_client.py index 59b42be0..102cc586 100644 --- a/packages/polywrap-client/tests/test_client.py +++ b/packages/polywrap-client/tests/test_client.py @@ -90,9 +90,11 @@ async def test_env(): resolver=uri_resolver, ) ) + print(client._config) options = InvokerOptions( - uri=uri, method="externalEnvMethod", args={}, encode_result=False, env=env + uri=uri, method="externalEnvMethod", args={}, encode_result=False ) + result = await client.invoke(options) assert result.unwrap() == env From 8c19da1753e70675b820381fb6ef0c44c2a2b9e9 Mon Sep 17 00:00:00 2001 From: DaoAdvocate <12145726+rihp@users.noreply.github.com> Date: Wed, 9 Nov 2022 19:19:26 +0100 Subject: [PATCH 25/40] wip: get_env and get_env_from_uri refactor --- .../polywrap-client/polywrap_client/client.py | 37 +++++++++++++++---- packages/polywrap-client/tests/test_client.py | 28 +++++++++++--- .../polywrap_core/types/client.py | 2 +- 3 files changed, 54 insertions(+), 13 deletions(-) diff --git a/packages/polywrap-client/polywrap_client/client.py b/packages/polywrap-client/polywrap_client/client.py index 0cb96ebe..a2623a54 100644 --- a/packages/polywrap-client/polywrap_client/client.py +++ b/packages/polywrap-client/polywrap_client/client.py @@ -2,7 +2,7 @@ from dataclasses import dataclass from textwrap import dedent -from typing import Any, List, Optional, Union, cast +from typing import Any, List, Optional, Union, cast,Dict from polywrap_core import ( Client, @@ -51,8 +51,9 @@ def get_uri_resolver( ) -> IUriResolver: return self._config.resolver - def get_envs(self, options: Optional[GetEnvsOptions] = None) -> List[Env]: - return self._config.envs + def get_envs(self, options: Optional[GetEnvsOptions] = None) -> Dict[Uri, Dict[str, Any]]: + envs = self._config.envs + return envs def get_interfaces(self) -> List[InterfaceImplementations]: return self._config.interfaces @@ -65,10 +66,28 @@ def get_implementations(self, uri: Uri) -> Result[List[Uri]]: else: return Err.from_str(f"Unable to find implementations for uri: {uri}") - def get_env_by_uri( - self, uri: Uri, options: Optional[GetEnvsOptions] = None + def get_env_by_uri(self, uri: Uri, options: Optional[GetEnvsOptions] = None ) -> Union[Env, None]: - return next(filter(lambda env: env.uri == uri, self.get_envs()), None) + + print("uri=", uri) + print(type(uri)) + print("---------") + print("uri.uri=", uri.uri) + print("type(uri)", type(uri.uri)) + print("---------") + print(f"{self.get_envs()=}") + print(f"{type(self.get_envs())=}") + print(f"{dir(self.get_envs())}") + #print(f"{self.get_envs()}") + #print(f"{self.get_envs()=}") + print("---------") + print("options=", options) + print(type(options)) + print("---------") + fn = lambda env: env.uri == uri.uri + #print(fn(uri)) + envs = self.get_envs() + return envs async def get_file( self, uri: Uri, options: GetFileOptions @@ -140,8 +159,12 @@ async def invoke(self, options: InvokerOptions) -> Result[Any]: return cast(Err, wrapper_result) wrapper = wrapper_result.unwrap() + print(self.get_env_by_uri(options.uri)) env = self.get_env_by_uri(options.uri) - options.env = options.env or (env.env if env else None) + print(f"{env=}") + #print(f"{env.env=}") + print('options=', options) + options.env = options.env or (env if env else None) result = await wrapper.invoke(options, invoker=self) if result.is_err(): diff --git a/packages/polywrap-client/tests/test_client.py b/packages/polywrap-client/tests/test_client.py index 102cc586..f07353b9 100644 --- a/packages/polywrap-client/tests/test_client.py +++ b/packages/polywrap-client/tests/test_client.py @@ -14,7 +14,7 @@ async def test_invoke(): ) args = {"arg": "hello polywrap"} options = InvokerOptions( - uri=uri, method="simpleMethod", args=args, encode_result=False + uri=uri, method="simpleMethod", args=args, encode_result=False, env={} ) result = await client.invoke(options) @@ -36,7 +36,7 @@ async def test_subinvoke(): f'fs/{Path(__file__).parent.joinpath("cases", "simple-subinvoke", "invoke").absolute()}' ) args = {"a": 1, "b": 2} - options = InvokerOptions(uri=uri, method="add", args=args, encode_result=False) + options = InvokerOptions(uri=uri, method="add", args=args, env={}, encode_result=False) result = await client.invoke(options) assert result.unwrap() == "1 + 2 = 3" @@ -68,13 +68,30 @@ async def test_interface_implementation(): ) args = {"arg": {"str": "hello", "uint8": 2}} options = InvokerOptions( - uri=uri, method="moduleMethod", args=args, encode_result=False + uri=uri, method="moduleMethod", args=args, encode_result=False, env={} ) result = await client.invoke(options) assert result.unwrap() == {"str": "hello", "uint8": 2} +def test_get_env_by_uri(): + uri_resolver = BaseUriResolver( + file_reader=SimpleFileReader(), + redirects={}, + ) + uri = Uri(f'fs/{Path(__file__).parent.joinpath("cases", "simple-env").absolute()}') + env = {"externalArray": [1, 2, 3], "externalString": "hello"} + + client = PolywrapClient( + config=PolywrapClientConfig( + envs={uri: env}, + resolver=uri_resolver, + ) + ) + assert client.get_env_by_uri(uri) == env + + async def test_env(): uri_resolver = BaseUriResolver( file_reader=SimpleFileReader(), @@ -92,9 +109,10 @@ async def test_env(): ) print(client._config) options = InvokerOptions( - uri=uri, method="externalEnvMethod", args={}, encode_result=False + uri=uri, method="externalEnvMethod", args={}, encode_result=False, + env={} ) - + result = await client.invoke(options) assert result.unwrap() == env diff --git a/packages/polywrap-core/polywrap_core/types/client.py b/packages/polywrap-core/polywrap_core/types/client.py index bfa239a0..ade91804 100644 --- a/packages/polywrap-core/polywrap_core/types/client.py +++ b/packages/polywrap-core/polywrap_core/types/client.py @@ -50,7 +50,7 @@ def get_interfaces(self) -> List[InterfaceImplementations]: pass @abstractmethod - def get_envs(self, options: Optional[GetEnvsOptions] = None) -> List[Env]: + def get_envs(self, options: Optional[GetEnvsOptions] = None) -> Dict[Uri, Dict[str, Any]]: pass @abstractmethod From eb611cc275e8fa88c383a21823d2aa041bf43dd9 Mon Sep 17 00:00:00 2001 From: DaoAdvocate <12145726+rihp@users.noreply.github.com> Date: Wed, 9 Nov 2022 19:50:02 +0100 Subject: [PATCH 26/40] change in client requires improvement in msgpack --- packages/polywrap-client/polywrap_client/client.py | 11 ++++++++--- packages/polywrap-client/tests/test_client.py | 6 +++--- packages/polywrap-core/polywrap_core/types/client.py | 4 ++-- packages/polywrap-wasm/polywrap_wasm/wasm_wrapper.py | 2 +- 4 files changed, 14 insertions(+), 9 deletions(-) diff --git a/packages/polywrap-client/polywrap_client/client.py b/packages/polywrap-client/polywrap_client/client.py index a2623a54..6b880db7 100644 --- a/packages/polywrap-client/polywrap_client/client.py +++ b/packages/polywrap-client/polywrap_client/client.py @@ -51,7 +51,7 @@ def get_uri_resolver( ) -> IUriResolver: return self._config.resolver - def get_envs(self, options: Optional[GetEnvsOptions] = None) -> Dict[Uri, Dict[str, Any]]: + def get_envs(self, options: Optional[GetEnvsOptions] = None) -> Union[Dict[Uri, Dict[str, Any]], None]: envs = self._config.envs return envs @@ -67,7 +67,7 @@ def get_implementations(self, uri: Uri) -> Result[List[Uri]]: return Err.from_str(f"Unable to find implementations for uri: {uri}") def get_env_by_uri(self, uri: Uri, options: Optional[GetEnvsOptions] = None - ) -> Union[Env, None]: + ) -> Union[Env, Dict[str, Any], None]: print("uri=", uri) print(type(uri)) @@ -84,9 +84,14 @@ def get_env_by_uri(self, uri: Uri, options: Optional[GetEnvsOptions] = None print("options=", options) print(type(options)) print("---------") - fn = lambda env: env.uri == uri.uri + #fn = lambda env: env.uri == uri.uri #print(fn(uri)) envs = self.get_envs() + + print("---------") + print(f"{envs}=") + print(type(envs)) + print("---------") return envs async def get_file( diff --git a/packages/polywrap-client/tests/test_client.py b/packages/polywrap-client/tests/test_client.py index f07353b9..1b4ac912 100644 --- a/packages/polywrap-client/tests/test_client.py +++ b/packages/polywrap-client/tests/test_client.py @@ -1,5 +1,5 @@ from pathlib import Path - +import pytest from polywrap_client import PolywrapClient from polywrap_core import Uri, InvokerOptions, InterfaceImplementations, Env from polywrap_uri_resolvers import BaseUriResolver, SimpleFileReader @@ -89,9 +89,9 @@ def test_get_env_by_uri(): resolver=uri_resolver, ) ) - assert client.get_env_by_uri(uri) == env - + assert client.get_env_by_uri(uri) == {uri:env} +# @pytest.mark.skip("not being tested yet") async def test_env(): uri_resolver = BaseUriResolver( file_reader=SimpleFileReader(), diff --git a/packages/polywrap-core/polywrap_core/types/client.py b/packages/polywrap-core/polywrap_core/types/client.py index ade91804..b11124f4 100644 --- a/packages/polywrap-core/polywrap_core/types/client.py +++ b/packages/polywrap-core/polywrap_core/types/client.py @@ -50,13 +50,13 @@ def get_interfaces(self) -> List[InterfaceImplementations]: pass @abstractmethod - def get_envs(self, options: Optional[GetEnvsOptions] = None) -> Dict[Uri, Dict[str, Any]]: + def get_envs(self, options: Optional[GetEnvsOptions] = None) -> Union[Dict[Uri, Dict[str, Any]], None]: pass @abstractmethod def get_env_by_uri( self, uri: Uri, options: Optional[GetEnvsOptions] = None - ) -> Union[Env, None]: + ) -> Union[Env, Dict[str, Any], None]: pass @abstractmethod diff --git a/packages/polywrap-wasm/polywrap_wasm/wasm_wrapper.py b/packages/polywrap-wasm/polywrap_wasm/wasm_wrapper.py index c3879454..466326fd 100644 --- a/packages/polywrap-wasm/polywrap_wasm/wasm_wrapper.py +++ b/packages/polywrap-wasm/polywrap_wasm/wasm_wrapper.py @@ -62,7 +62,7 @@ async def invoke( state.env = ( options.env if isinstance(options.env, (bytes, bytearray)) - else msgpack_encode(options.env) + else msgpack_encode(options.env.env) ) if not (state.method and state.args and state.env): From c7fd20813fd29119e1e009f35094926ef2ccc0cd Mon Sep 17 00:00:00 2001 From: DaoAdvocate <12145726+rihp@users.noreply.github.com> Date: Wed, 9 Nov 2022 23:07:39 +0100 Subject: [PATCH 27/40] wip: msgpack cannot encode Uris, looking for workaround --- .../polywrap-client/polywrap_client/client.py | 44 ++++++++++--------- packages/polywrap-client/tests/test_client.py | 7 +-- 2 files changed, 27 insertions(+), 24 deletions(-) diff --git a/packages/polywrap-client/polywrap_client/client.py b/packages/polywrap-client/polywrap_client/client.py index 6b880db7..9206e173 100644 --- a/packages/polywrap-client/polywrap_client/client.py +++ b/packages/polywrap-client/polywrap_client/client.py @@ -67,30 +67,32 @@ def get_implementations(self, uri: Uri) -> Result[List[Uri]]: return Err.from_str(f"Unable to find implementations for uri: {uri}") def get_env_by_uri(self, uri: Uri, options: Optional[GetEnvsOptions] = None - ) -> Union[Env, Dict[str, Any], None]: - - print("uri=", uri) + ) -> Union[Env, Dict[Uri, Dict[str, Any]], None]: + print(f"--> Continue by calling get_env_by_uri: {uri=}") + # print("uri=", uri) print(type(uri)) + # print("---------") + # print("uri.uri=", uri.uri) + # print("type(uri)", type(uri.uri)) print("---------") - print("uri.uri=", uri.uri) - print("type(uri)", type(uri.uri)) - print("---------") - print(f"{self.get_envs()=}") - print(f"{type(self.get_envs())=}") - print(f"{dir(self.get_envs())}") - #print(f"{self.get_envs()}") - #print(f"{self.get_envs()=}") - print("---------") - print("options=", options) - print(type(options)) - print("---------") + # print(f"{self.get_envs()=}") + # print(f"{type(self.get_envs())=}") + # print(f"{dir(self.get_envs())}") + # #print(f"{self.get_envs()}") + # #print(f"{self.get_envs()=}") + # print("---------") + # print("options=", options) + # print(type(options)) + # print("---------") #fn = lambda env: env.uri == uri.uri #print(fn(uri)) envs = self.get_envs() - print("---------") - print(f"{envs}=") - print(type(envs)) + # print("---------") + print(f"{envs=}") + # if isinstance(envs, dict): + # print(type(envs.get(uri))) + # return envs.get(uri) print("---------") return envs @@ -164,11 +166,11 @@ async def invoke(self, options: InvokerOptions) -> Result[Any]: return cast(Err, wrapper_result) wrapper = wrapper_result.unwrap() - print(self.get_env_by_uri(options.uri)) + # print(self.get_env_by_uri(options.uri)) env = self.get_env_by_uri(options.uri) - print(f"{env=}") + # print(f"{env=}") #print(f"{env.env=}") - print('options=', options) + # print('options=', options) options.env = options.env or (env if env else None) result = await wrapper.invoke(options, invoker=self) diff --git a/packages/polywrap-client/tests/test_client.py b/packages/polywrap-client/tests/test_client.py index 1b4ac912..ee60d251 100644 --- a/packages/polywrap-client/tests/test_client.py +++ b/packages/polywrap-client/tests/test_client.py @@ -89,7 +89,7 @@ def test_get_env_by_uri(): resolver=uri_resolver, ) ) - assert client.get_env_by_uri(uri) == {uri:env} + assert client.get_env_by_uri(uri).get(uri) == env # @pytest.mark.skip("not being tested yet") async def test_env(): @@ -107,10 +107,11 @@ async def test_env(): resolver=uri_resolver, ) ) - print(client._config) + print(f"--> Begin by configuring the client with the env: {env}") + # print(f"{client._config=}") options = InvokerOptions( uri=uri, method="externalEnvMethod", args={}, encode_result=False, - env={} + # env={} ) result = await client.invoke(options) From fdffa9ebf1eb0a03fd4ab1ab2adde5d9513d4641 Mon Sep 17 00:00:00 2001 From: DaoAdvocate <12145726+rihp@users.noreply.github.com> Date: Wed, 9 Nov 2022 23:09:40 +0100 Subject: [PATCH 28/40] wip --- .../polywrap_msgpack/__init__.py | 46 ++++++++++++++++++- .../polywrap_wasm/wasm_wrapper.py | 2 +- 2 files changed, 45 insertions(+), 3 deletions(-) diff --git a/packages/polywrap-msgpack/polywrap_msgpack/__init__.py b/packages/polywrap-msgpack/polywrap_msgpack/__init__.py index d3452640..5d434d06 100644 --- a/packages/polywrap-msgpack/polywrap_msgpack/__init__.py +++ b/packages/polywrap-msgpack/polywrap_msgpack/__init__.py @@ -52,10 +52,27 @@ def sanitize(value: Any) -> Any: """ if isinstance(value, dict): dictionary: Dict[Any, Any] = value - for key, val in dictionary.items(): + for key, val in list(dictionary.items()): + # try: + # print(f"{key=}") + # print(f"{key.uri=}") + # except: + # pass if isinstance(key, str): + print(f"{key=}") + print(f"{type(key)=}") + print(f"{val=}") + print(f"{type(val)=}") dictionary[key] = sanitize(val) - else: + elif key.uri: + print(f"Found Key and it has uri") + print(f"{type(key)=}") + print(f"{key.uri=}") + print(f"{type(key.uri)=}") + print(f"{val=}") + print(f"{type(val)=}") + dictionary[key] = sanitize(val) + else: raise ValueError( f"expected dict key to be str received {key} with type {type(key)}" ) @@ -72,12 +89,37 @@ def sanitize(value: Any) -> Any: if isinstance(value, complex): return str(value) if hasattr(value, "__slots__"): + answer: Dict[str,Any] = {} + for s in getattr(value, "__slots__"): + print(f"{s=}") + if hasattr(value, s): + answer.update({s: sanitize(getattr(value, s))}) + if hasattr(value.uri, 'authority'): + # print(value[s]) + answer.update({s: sanitize(getattr(value.uri, 'uri'))}) + print(f"!- Found {value.uri=}") + print(f"!- Found {value.uri.authority=}") + + return answer + return { s: sanitize(getattr(value, s)) for s in getattr(value, "__slots__") if hasattr(value, s) } if hasattr(value, "__dict__"): + answer: Dict[str, Any] = {} + for k, v in vars(value).items(): + print(f"{k=}") + print(f"{v=}") + if not isinstance(k, str): + answer.update({k.uri:sanitize(v)}) + if isinstance(k, str): + answer.update({k:sanitize(v)}) + # elif k.uri: + # answer.update({k.uri:sanitize(v)}) + + return answer return {k: sanitize(v) for k, v in vars(value).items()} return value diff --git a/packages/polywrap-wasm/polywrap_wasm/wasm_wrapper.py b/packages/polywrap-wasm/polywrap_wasm/wasm_wrapper.py index 466326fd..c3879454 100644 --- a/packages/polywrap-wasm/polywrap_wasm/wasm_wrapper.py +++ b/packages/polywrap-wasm/polywrap_wasm/wasm_wrapper.py @@ -62,7 +62,7 @@ async def invoke( state.env = ( options.env if isinstance(options.env, (bytes, bytearray)) - else msgpack_encode(options.env.env) + else msgpack_encode(options.env) ) if not (state.method and state.args and state.env): From 894e603bfe4a8b3d7a9a06ef1e4006083111a29e Mon Sep 17 00:00:00 2001 From: DaoAdvocate <12145726+rihp@users.noreply.github.com> Date: Thu, 10 Nov 2022 17:03:47 +0100 Subject: [PATCH 29/40] typeError: cannot serialize uri object --- packages/polywrap-client/polywrap_client/client.py | 9 ++++++--- packages/polywrap-core/polywrap_core/types/client.py | 2 +- .../polywrap_core/utils/get_env_from_uri_history.py | 4 ++-- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/packages/polywrap-client/polywrap_client/client.py b/packages/polywrap-client/polywrap_client/client.py index 9206e173..1ea9c7e0 100644 --- a/packages/polywrap-client/polywrap_client/client.py +++ b/packages/polywrap-client/polywrap_client/client.py @@ -40,7 +40,10 @@ class PolywrapClient(Client): def __init__(self, config: Optional[PolywrapClientConfig] = None): # TODO: this is naive solution need to use polywrap-client-config-builder once we have it self._config = config or PolywrapClientConfig( - resolver=FsUriResolver(file_reader=SimpleFileReader()) + resolver=FsUriResolver(file_reader=SimpleFileReader()), + envs={}, + interfaces={}, + ) def get_config(self): @@ -52,7 +55,7 @@ def get_uri_resolver( return self._config.resolver def get_envs(self, options: Optional[GetEnvsOptions] = None) -> Union[Dict[Uri, Dict[str, Any]], None]: - envs = self._config.envs + envs: Dict[Uri, Any] = self._config.envs return envs def get_interfaces(self) -> List[InterfaceImplementations]: @@ -67,7 +70,7 @@ def get_implementations(self, uri: Uri) -> Result[List[Uri]]: return Err.from_str(f"Unable to find implementations for uri: {uri}") def get_env_by_uri(self, uri: Uri, options: Optional[GetEnvsOptions] = None - ) -> Union[Env, Dict[Uri, Dict[str, Any]], None]: + ) -> Union[Dict[str, Any], None]: print(f"--> Continue by calling get_env_by_uri: {uri=}") # print("uri=", uri) print(type(uri)) diff --git a/packages/polywrap-core/polywrap_core/types/client.py b/packages/polywrap-core/polywrap_core/types/client.py index b11124f4..c5b5727b 100644 --- a/packages/polywrap-core/polywrap_core/types/client.py +++ b/packages/polywrap-core/polywrap_core/types/client.py @@ -56,7 +56,7 @@ def get_envs(self, options: Optional[GetEnvsOptions] = None) -> Union[Dict[Uri, @abstractmethod def get_env_by_uri( self, uri: Uri, options: Optional[GetEnvsOptions] = None - ) -> Union[Env, Dict[str, Any], None]: + ) -> Union[Dict[str, Any], None]: pass @abstractmethod diff --git a/packages/polywrap-core/polywrap_core/utils/get_env_from_uri_history.py b/packages/polywrap-core/polywrap_core/utils/get_env_from_uri_history.py index dab39dd0..02db2e04 100644 --- a/packages/polywrap-core/polywrap_core/utils/get_env_from_uri_history.py +++ b/packages/polywrap-core/polywrap_core/utils/get_env_from_uri_history.py @@ -1,10 +1,10 @@ -from typing import List, Union +from typing import List, Union, Dict, Any from ..types import Client, Env, Uri def get_env_from_uri_history( uri_history: List[Uri], client: Client -) -> Union[Env, None]: +) -> Union[Env, Dict[str, Any], None]: for uri in uri_history: return client.get_env_by_uri(uri) From aea8115914a353aab85b335eea5c9c28054947c5 Mon Sep 17 00:00:00 2001 From: DaoAdvocate <12145726+rihp@users.noreply.github.com> Date: Thu, 10 Nov 2022 17:11:28 +0100 Subject: [PATCH 30/40] cleaning_code --- .../polywrap-client/polywrap_client/client.py | 23 +------------------ 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/packages/polywrap-client/polywrap_client/client.py b/packages/polywrap-client/polywrap_client/client.py index 1ea9c7e0..34e3aff8 100644 --- a/packages/polywrap-client/polywrap_client/client.py +++ b/packages/polywrap-client/polywrap_client/client.py @@ -55,7 +55,7 @@ def get_uri_resolver( return self._config.resolver def get_envs(self, options: Optional[GetEnvsOptions] = None) -> Union[Dict[Uri, Dict[str, Any]], None]: - envs: Dict[Uri, Any] = self._config.envs + envs: Dict[Uri, Dict[str, Any]] = self._config.envs return envs def get_interfaces(self) -> List[InterfaceImplementations]: @@ -72,30 +72,9 @@ def get_implementations(self, uri: Uri) -> Result[List[Uri]]: def get_env_by_uri(self, uri: Uri, options: Optional[GetEnvsOptions] = None ) -> Union[Dict[str, Any], None]: print(f"--> Continue by calling get_env_by_uri: {uri=}") - # print("uri=", uri) print(type(uri)) - # print("---------") - # print("uri.uri=", uri.uri) - # print("type(uri)", type(uri.uri)) - print("---------") - # print(f"{self.get_envs()=}") - # print(f"{type(self.get_envs())=}") - # print(f"{dir(self.get_envs())}") - # #print(f"{self.get_envs()}") - # #print(f"{self.get_envs()=}") - # print("---------") - # print("options=", options) - # print(type(options)) - # print("---------") - #fn = lambda env: env.uri == uri.uri - #print(fn(uri)) envs = self.get_envs() - - # print("---------") print(f"{envs=}") - # if isinstance(envs, dict): - # print(type(envs.get(uri))) - # return envs.get(uri) print("---------") return envs From eab8a16dfe875627b35f5027fa62df3abdb1798b Mon Sep 17 00:00:00 2001 From: DaoAdvocate <12145726+rihp@users.noreply.github.com> Date: Thu, 10 Nov 2022 17:24:59 +0100 Subject: [PATCH 31/40] all_tests_passing --- packages/polywrap-client/polywrap_client/client.py | 5 ++++- packages/polywrap-client/tests/test_client.py | 3 ++- .../polywrap_core/utils/get_env_from_uri_history.py | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/packages/polywrap-client/polywrap_client/client.py b/packages/polywrap-client/polywrap_client/client.py index 34e3aff8..d35b0cbc 100644 --- a/packages/polywrap-client/polywrap_client/client.py +++ b/packages/polywrap-client/polywrap_client/client.py @@ -76,7 +76,10 @@ def get_env_by_uri(self, uri: Uri, options: Optional[GetEnvsOptions] = None envs = self.get_envs() print(f"{envs=}") print("---------") - return envs + if hasattr(envs, 'get'): + return envs.get(uri) + else: + return None async def get_file( self, uri: Uri, options: GetFileOptions diff --git a/packages/polywrap-client/tests/test_client.py b/packages/polywrap-client/tests/test_client.py index ee60d251..6181a9c0 100644 --- a/packages/polywrap-client/tests/test_client.py +++ b/packages/polywrap-client/tests/test_client.py @@ -89,7 +89,8 @@ def test_get_env_by_uri(): resolver=uri_resolver, ) ) - assert client.get_env_by_uri(uri).get(uri) == env + print() + assert client.get_env_by_uri(uri) == env # @pytest.mark.skip("not being tested yet") async def test_env(): diff --git a/packages/polywrap-core/polywrap_core/utils/get_env_from_uri_history.py b/packages/polywrap-core/polywrap_core/utils/get_env_from_uri_history.py index 02db2e04..dab39dd0 100644 --- a/packages/polywrap-core/polywrap_core/utils/get_env_from_uri_history.py +++ b/packages/polywrap-core/polywrap_core/utils/get_env_from_uri_history.py @@ -1,10 +1,10 @@ -from typing import List, Union, Dict, Any +from typing import List, Union from ..types import Client, Env, Uri def get_env_from_uri_history( uri_history: List[Uri], client: Client -) -> Union[Env, Dict[str, Any], None]: +) -> Union[Env, None]: for uri in uri_history: return client.get_env_by_uri(uri) From 10b1e20241aedd76af3d7b0351f30991ab620919 Mon Sep 17 00:00:00 2001 From: DaoAdvocate <12145726+rihp@users.noreply.github.com> Date: Thu, 10 Nov 2022 17:34:24 +0100 Subject: [PATCH 32/40] removing_comments --- .../polywrap-client/polywrap_client/client.py | 8 ------ packages/polywrap-client/tests/test_client.py | 4 --- packages/polywrap-client/tests/test_sha3.py | 2 -- .../polywrap_msgpack/__init__.py | 26 +++---------------- 4 files changed, 3 insertions(+), 37 deletions(-) diff --git a/packages/polywrap-client/polywrap_client/client.py b/packages/polywrap-client/polywrap_client/client.py index d35b0cbc..49c6132f 100644 --- a/packages/polywrap-client/polywrap_client/client.py +++ b/packages/polywrap-client/polywrap_client/client.py @@ -71,11 +71,8 @@ def get_implementations(self, uri: Uri) -> Result[List[Uri]]: def get_env_by_uri(self, uri: Uri, options: Optional[GetEnvsOptions] = None ) -> Union[Dict[str, Any], None]: - print(f"--> Continue by calling get_env_by_uri: {uri=}") print(type(uri)) envs = self.get_envs() - print(f"{envs=}") - print("---------") if hasattr(envs, 'get'): return envs.get(uri) else: @@ -150,12 +147,7 @@ async def invoke(self, options: InvokerOptions) -> Result[Any]: if wrapper_result.is_err(): return cast(Err, wrapper_result) wrapper = wrapper_result.unwrap() - - # print(self.get_env_by_uri(options.uri)) env = self.get_env_by_uri(options.uri) - # print(f"{env=}") - #print(f"{env.env=}") - # print('options=', options) options.env = options.env or (env if env else None) result = await wrapper.invoke(options, invoker=self) diff --git a/packages/polywrap-client/tests/test_client.py b/packages/polywrap-client/tests/test_client.py index 6181a9c0..a5862828 100644 --- a/packages/polywrap-client/tests/test_client.py +++ b/packages/polywrap-client/tests/test_client.py @@ -89,10 +89,8 @@ def test_get_env_by_uri(): resolver=uri_resolver, ) ) - print() assert client.get_env_by_uri(uri) == env -# @pytest.mark.skip("not being tested yet") async def test_env(): uri_resolver = BaseUriResolver( file_reader=SimpleFileReader(), @@ -109,10 +107,8 @@ async def test_env(): ) ) print(f"--> Begin by configuring the client with the env: {env}") - # print(f"{client._config=}") options = InvokerOptions( uri=uri, method="externalEnvMethod", args={}, encode_result=False, - # env={} ) result = await client.invoke(options) diff --git a/packages/polywrap-client/tests/test_sha3.py b/packages/polywrap-client/tests/test_sha3.py index eb116fc9..4aa52ee9 100644 --- a/packages/polywrap-client/tests/test_sha3.py +++ b/packages/polywrap-client/tests/test_sha3.py @@ -19,7 +19,6 @@ async def test_invoke_sha3_512(): result = await client.invoke(options) s = hashlib.sha512() s.update(b"hello polywrap!") - print(result) assert result.result == s.digest() @pytest.mark.skip(reason="can't invoke sha3 wrapper due to an error related to wasmtime") @@ -90,7 +89,6 @@ async def test_invoke_hex_keccak_256(): async def test_invoke_buffer_keccak_256(): options = InvokerOptions(uri=uri, method="buffer_keccak_256", args=args, encode_result=False) result = await client.invoke(options) - print(result) # TODO: Not sure exactly what this function `buffer_keccak_256` is doing in order to assert it properly assert result.result == False diff --git a/packages/polywrap-msgpack/polywrap_msgpack/__init__.py b/packages/polywrap-msgpack/polywrap_msgpack/__init__.py index 5d434d06..e7f25ed6 100644 --- a/packages/polywrap-msgpack/polywrap_msgpack/__init__.py +++ b/packages/polywrap-msgpack/polywrap_msgpack/__init__.py @@ -53,24 +53,9 @@ def sanitize(value: Any) -> Any: if isinstance(value, dict): dictionary: Dict[Any, Any] = value for key, val in list(dictionary.items()): - # try: - # print(f"{key=}") - # print(f"{key.uri=}") - # except: - # pass if isinstance(key, str): - print(f"{key=}") - print(f"{type(key)=}") - print(f"{val=}") - print(f"{type(val)=}") dictionary[key] = sanitize(val) elif key.uri: - print(f"Found Key and it has uri") - print(f"{type(key)=}") - print(f"{key.uri=}") - print(f"{type(key.uri)=}") - print(f"{val=}") - print(f"{type(val)=}") dictionary[key] = sanitize(val) else: raise ValueError( @@ -91,17 +76,14 @@ def sanitize(value: Any) -> Any: if hasattr(value, "__slots__"): answer: Dict[str,Any] = {} for s in getattr(value, "__slots__"): - print(f"{s=}") if hasattr(value, s): answer.update({s: sanitize(getattr(value, s))}) if hasattr(value.uri, 'authority'): - # print(value[s]) answer.update({s: sanitize(getattr(value.uri, 'uri'))}) - print(f"!- Found {value.uri=}") - print(f"!- Found {value.uri.authority=}") + return answer - + #previous implementation return { s: sanitize(getattr(value, s)) for s in getattr(value, "__slots__") @@ -110,9 +92,7 @@ def sanitize(value: Any) -> Any: if hasattr(value, "__dict__"): answer: Dict[str, Any] = {} for k, v in vars(value).items(): - print(f"{k=}") - print(f"{v=}") - if not isinstance(k, str): + if hasattr(k, 'uri'): answer.update({k.uri:sanitize(v)}) if isinstance(k, str): answer.update({k:sanitize(v)}) From 954da64486b95716aa7887a5adda1c182b7d88c0 Mon Sep 17 00:00:00 2001 From: DaoAdvocate <12145726+rihp@users.noreply.github.com> Date: Thu, 10 Nov 2022 17:42:48 +0100 Subject: [PATCH 33/40] typeckeck_fix_client --- packages/polywrap-client/polywrap_client/client.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/polywrap-client/polywrap_client/client.py b/packages/polywrap-client/polywrap_client/client.py index 49c6132f..44bafe27 100644 --- a/packages/polywrap-client/polywrap_client/client.py +++ b/packages/polywrap-client/polywrap_client/client.py @@ -73,8 +73,10 @@ def get_env_by_uri(self, uri: Uri, options: Optional[GetEnvsOptions] = None ) -> Union[Dict[str, Any], None]: print(type(uri)) envs = self.get_envs() - if hasattr(envs, 'get'): - return envs.get(uri) + if envs is not None: + if hasattr(envs, 'get'): + result = envs.get(uri) + return result else: return None From 24246d423dfb11745c0f601b3dfe41ba061f04ba Mon Sep 17 00:00:00 2001 From: DaoAdvocate <12145726+rihp@users.noreply.github.com> Date: Thu, 10 Nov 2022 17:49:01 +0100 Subject: [PATCH 34/40] core typecheck fixes --- .../polywrap_core/utils/get_env_from_uri_history.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/polywrap-core/polywrap_core/utils/get_env_from_uri_history.py b/packages/polywrap-core/polywrap_core/utils/get_env_from_uri_history.py index dab39dd0..6c9ef177 100644 --- a/packages/polywrap-core/polywrap_core/utils/get_env_from_uri_history.py +++ b/packages/polywrap-core/polywrap_core/utils/get_env_from_uri_history.py @@ -1,10 +1,10 @@ -from typing import List, Union +from typing import List, Union, Dict, Any from ..types import Client, Env, Uri def get_env_from_uri_history( uri_history: List[Uri], client: Client -) -> Union[Env, None]: +) -> Union[Dict[str, Any], None]: for uri in uri_history: return client.get_env_by_uri(uri) From 51b77f261e7ad201762f77e524253353e2873268 Mon Sep 17 00:00:00 2001 From: DaoAdvocate <12145726+rihp@users.noreply.github.com> Date: Fri, 11 Nov 2022 09:53:24 +0100 Subject: [PATCH 35/40] CI_CD_build_fixes --- .../polywrap_msgpack/__init__.py | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/packages/polywrap-msgpack/polywrap_msgpack/__init__.py b/packages/polywrap-msgpack/polywrap_msgpack/__init__.py index e7f25ed6..d6440454 100644 --- a/packages/polywrap-msgpack/polywrap_msgpack/__init__.py +++ b/packages/polywrap-msgpack/polywrap_msgpack/__init__.py @@ -91,15 +91,17 @@ def sanitize(value: Any) -> Any: } if hasattr(value, "__dict__"): answer: Dict[str, Any] = {} - for k, v in vars(value).items(): - if hasattr(k, 'uri'): - answer.update({k.uri:sanitize(v)}) - if isinstance(k, str): - answer.update({k:sanitize(v)}) - # elif k.uri: - # answer.update({k.uri:sanitize(v)}) - - return answer + # TODO: Maybe this implementation is not correct + # for k, v in vars(value).items(): + # if hasattr(k, 'uri'): + # print(f">>>>> {k=}") + # new_key:str = k.uri + # answer.update({new_key:sanitize(v)}) + # if isinstance(k, str): + # answer.update({k:sanitize(v)}) + # # elif k.uri: + # # answer.update({k.uri:sanitize(v)}) + # return answer return {k: sanitize(v) for k, v in vars(value).items()} return value From b952ce4704c4e860263d6d128a462979313b0119 Mon Sep 17 00:00:00 2001 From: DaoAdvocate <12145726+rihp@users.noreply.github.com> Date: Fri, 11 Nov 2022 10:00:15 +0100 Subject: [PATCH 36/40] CI_CD_build_fixes --- .../polywrap_msgpack/__init__.py | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/packages/polywrap-msgpack/polywrap_msgpack/__init__.py b/packages/polywrap-msgpack/polywrap_msgpack/__init__.py index d6440454..a972240b 100644 --- a/packages/polywrap-msgpack/polywrap_msgpack/__init__.py +++ b/packages/polywrap-msgpack/polywrap_msgpack/__init__.py @@ -74,15 +74,14 @@ def sanitize(value: Any) -> Any: if isinstance(value, complex): return str(value) if hasattr(value, "__slots__"): - answer: Dict[str,Any] = {} - for s in getattr(value, "__slots__"): - if hasattr(value, s): - answer.update({s: sanitize(getattr(value, s))}) - if hasattr(value.uri, 'authority'): - answer.update({s: sanitize(getattr(value.uri, 'uri'))}) - - - return answer + # TODO: Maybe this new implementation is not correct + # answer: Dict[str,Any] = {} + # for s in getattr(value, "__slots__"): + # if hasattr(value, s): + # answer.update({s: sanitize(getattr(value, s))}) + # if hasattr(value.uri, 'authority'): + # answer.update({s: sanitize(getattr(value.uri, 'uri'))}) + # return answer #previous implementation return { s: sanitize(getattr(value, s)) @@ -90,8 +89,8 @@ def sanitize(value: Any) -> Any: if hasattr(value, s) } if hasattr(value, "__dict__"): - answer: Dict[str, Any] = {} - # TODO: Maybe this implementation is not correct + # TODO: Maybe this new implementation is not correct + # answer: Dict[str, Any] = {} # for k, v in vars(value).items(): # if hasattr(k, 'uri'): # print(f">>>>> {k=}") @@ -102,6 +101,7 @@ def sanitize(value: Any) -> Any: # # elif k.uri: # # answer.update({k.uri:sanitize(v)}) # return answer + # previous implementation return {k: sanitize(v) for k, v in vars(value).items()} return value From 445994bdc1dfb6e31a80efad6023cf3e6ee29098 Mon Sep 17 00:00:00 2001 From: DaoAdvocate <12145726+rihp@users.noreply.github.com> Date: Fri, 11 Nov 2022 10:06:51 +0100 Subject: [PATCH 37/40] Clean_up --- .../polywrap_msgpack/__init__.py | 22 ------------------- 1 file changed, 22 deletions(-) diff --git a/packages/polywrap-msgpack/polywrap_msgpack/__init__.py b/packages/polywrap-msgpack/polywrap_msgpack/__init__.py index a972240b..1d16b85a 100644 --- a/packages/polywrap-msgpack/polywrap_msgpack/__init__.py +++ b/packages/polywrap-msgpack/polywrap_msgpack/__init__.py @@ -74,34 +74,12 @@ def sanitize(value: Any) -> Any: if isinstance(value, complex): return str(value) if hasattr(value, "__slots__"): - # TODO: Maybe this new implementation is not correct - # answer: Dict[str,Any] = {} - # for s in getattr(value, "__slots__"): - # if hasattr(value, s): - # answer.update({s: sanitize(getattr(value, s))}) - # if hasattr(value.uri, 'authority'): - # answer.update({s: sanitize(getattr(value.uri, 'uri'))}) - # return answer - #previous implementation return { s: sanitize(getattr(value, s)) for s in getattr(value, "__slots__") if hasattr(value, s) } if hasattr(value, "__dict__"): - # TODO: Maybe this new implementation is not correct - # answer: Dict[str, Any] = {} - # for k, v in vars(value).items(): - # if hasattr(k, 'uri'): - # print(f">>>>> {k=}") - # new_key:str = k.uri - # answer.update({new_key:sanitize(v)}) - # if isinstance(k, str): - # answer.update({k:sanitize(v)}) - # # elif k.uri: - # # answer.update({k.uri:sanitize(v)}) - # return answer - # previous implementation return {k: sanitize(v) for k, v in vars(value).items()} return value From eeed4b4c2955435d3fdc37c671faefee8bbc14bb Mon Sep 17 00:00:00 2001 From: DaoAdvocate <12145726+rihp@users.noreply.github.com> Date: Fri, 11 Nov 2022 10:07:09 +0100 Subject: [PATCH 38/40] Clean_up --- packages/polywrap-client/polywrap_client/client.py | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/polywrap-client/polywrap_client/client.py b/packages/polywrap-client/polywrap_client/client.py index 44bafe27..b4dab4c4 100644 --- a/packages/polywrap-client/polywrap_client/client.py +++ b/packages/polywrap-client/polywrap_client/client.py @@ -71,7 +71,6 @@ def get_implementations(self, uri: Uri) -> Result[List[Uri]]: def get_env_by_uri(self, uri: Uri, options: Optional[GetEnvsOptions] = None ) -> Union[Dict[str, Any], None]: - print(type(uri)) envs = self.get_envs() if envs is not None: if hasattr(envs, 'get'): From fca83c9ca7b2e82e43b3ce5ee75efa49128cb709 Mon Sep 17 00:00:00 2001 From: DaoAdvocate <12145726+rihp@users.noreply.github.com> Date: Fri, 11 Nov 2022 10:54:14 +0100 Subject: [PATCH 39/40] interfaceimplementations refactor! --- .../polywrap-client/polywrap_client/client.py | 23 ++++++++++++++----- packages/polywrap-client/tests/test_client.py | 21 ++++++++++------- .../polywrap_core/types/client.py | 4 ++-- 3 files changed, 32 insertions(+), 16 deletions(-) diff --git a/packages/polywrap-client/polywrap_client/client.py b/packages/polywrap-client/polywrap_client/client.py index b4dab4c4..572fb150 100644 --- a/packages/polywrap-client/polywrap_client/client.py +++ b/packages/polywrap-client/polywrap_client/client.py @@ -58,16 +58,27 @@ def get_envs(self, options: Optional[GetEnvsOptions] = None) -> Union[Dict[Uri, envs: Dict[Uri, Dict[str, Any]] = self._config.envs return envs - def get_interfaces(self) -> List[InterfaceImplementations]: - return self._config.interfaces + def get_interfaces(self) -> Dict[Uri, List[Uri]]: + interfaces: Dict[Uri, List[Uri]] = self._config.interfaces + return interfaces def get_implementations(self, uri: Uri) -> Result[List[Uri]]: - if interface_implementations := next( - filter(lambda x: x.interface == uri, self._config.interfaces), None - ): - return Ok(interface_implementations.implementations) + interfaces: Dict[Uri, List[Uri]] = self.get_interfaces() + if interfaces.get(uri): + print(f"{type(interfaces)=}") + print(f"{interfaces=}") + print(f"{interfaces.get(uri)=}") + + return Ok(interfaces.get(uri)) else: return Err.from_str(f"Unable to find implementations for uri: {uri}") + # previous implementation + # if interface_implementations := next( + # filter(lambda x: x.interface == uri, self._config.interfaces), None + # ): + # return Ok(interface_implementations.implementations) + # else: + # return Err.from_str(f"Unable to find implementations for uri: {uri}") def get_env_by_uri(self, uri: Uri, options: Optional[GetEnvsOptions] = None ) -> Union[Dict[str, Any], None]: diff --git a/packages/polywrap-client/tests/test_client.py b/packages/polywrap-client/tests/test_client.py index a5862828..4039f45a 100644 --- a/packages/polywrap-client/tests/test_client.py +++ b/packages/polywrap-client/tests/test_client.py @@ -3,7 +3,7 @@ from polywrap_client import PolywrapClient from polywrap_core import Uri, InvokerOptions, InterfaceImplementations, Env from polywrap_uri_resolvers import BaseUriResolver, SimpleFileReader - +from polywrap_result import Err, Ok, Result from polywrap_client.client import PolywrapClientConfig @@ -48,19 +48,24 @@ async def test_interface_implementation(): redirects={}, ) + interface_uri = Uri("ens/interface.eth") impl_uri = Uri( f'fs/{Path(__file__).parent.joinpath("cases", "simple-interface", "implementation").absolute()}' ) client = PolywrapClient( config=PolywrapClientConfig( - envs=[], + envs={}, resolver=uri_resolver, - interfaces=[ - InterfaceImplementations( - interface=Uri("ens/interface.eth"), implementations=[impl_uri] - ) - ], + # Dict[Uri, List[Uri]] + + interfaces= {interface_uri : [impl_uri]} + # previous implementations + # interfaces=[ + # InterfaceImplementations( + # interface=Uri("ens/interface.eth"), implementations=[impl_uri] + # ) + # ], ) ) uri = Uri( @@ -71,7 +76,7 @@ async def test_interface_implementation(): uri=uri, method="moduleMethod", args=args, encode_result=False, env={} ) result = await client.invoke(options) - + assert client.get_implementations(interface_uri) == Ok([impl_uri]) assert result.unwrap() == {"str": "hello", "uint8": 2} diff --git a/packages/polywrap-core/polywrap_core/types/client.py b/packages/polywrap-core/polywrap_core/types/client.py index c5b5727b..b7d044a6 100644 --- a/packages/polywrap-core/polywrap_core/types/client.py +++ b/packages/polywrap-core/polywrap_core/types/client.py @@ -19,7 +19,7 @@ class ClientConfig: # TODO is this a naive solution? the `Any` type should be more specific (str | Uri | int, etc.) envs: Dict[Uri, Dict[str, Any]] = field(default_factory=dict) - interfaces: List[InterfaceImplementations] = field(default_factory=list) + interfaces: Dict[Uri, List[Uri]] = field(default_factory=dict) resolver: IUriResolver @@ -46,7 +46,7 @@ class GetManifestOptions(DeserializeManifestOptions): class Client(Invoker, UriResolverHandler): @abstractmethod - def get_interfaces(self) -> List[InterfaceImplementations]: + def get_interfaces(self) -> Dict[Uri, List[Uri]]: pass @abstractmethod From a18ada34f45fb9eeac8fe8f2283244ee0a08187a Mon Sep 17 00:00:00 2001 From: DaoAdvocate <12145726+rihp@users.noreply.github.com> Date: Fri, 11 Nov 2022 11:40:47 +0100 Subject: [PATCH 40/40] cleanup and typechecks --- packages/polywrap-client/polywrap_client/client.py | 12 +++--------- packages/polywrap-client/tests/test_client.py | 12 ++---------- .../polywrap_core/types/interface_implementation.py | 2 +- 3 files changed, 6 insertions(+), 20 deletions(-) diff --git a/packages/polywrap-client/polywrap_client/client.py b/packages/polywrap-client/polywrap_client/client.py index 572fb150..04b1303e 100644 --- a/packages/polywrap-client/polywrap_client/client.py +++ b/packages/polywrap-client/polywrap_client/client.py @@ -2,7 +2,7 @@ from dataclasses import dataclass from textwrap import dedent -from typing import Any, List, Optional, Union, cast,Dict +from typing import Any, Dict, List, Optional, Union, cast from polywrap_core import ( Client, @@ -62,7 +62,7 @@ def get_interfaces(self) -> Dict[Uri, List[Uri]]: interfaces: Dict[Uri, List[Uri]] = self._config.interfaces return interfaces - def get_implementations(self, uri: Uri) -> Result[List[Uri]]: + def get_implementations(self, uri: Uri) -> Result[Union[List[Uri], None] ]: interfaces: Dict[Uri, List[Uri]] = self.get_interfaces() if interfaces.get(uri): print(f"{type(interfaces)=}") @@ -72,13 +72,7 @@ def get_implementations(self, uri: Uri) -> Result[List[Uri]]: return Ok(interfaces.get(uri)) else: return Err.from_str(f"Unable to find implementations for uri: {uri}") - # previous implementation - # if interface_implementations := next( - # filter(lambda x: x.interface == uri, self._config.interfaces), None - # ): - # return Ok(interface_implementations.implementations) - # else: - # return Err.from_str(f"Unable to find implementations for uri: {uri}") + def get_env_by_uri(self, uri: Uri, options: Optional[GetEnvsOptions] = None ) -> Union[Dict[str, Any], None]: diff --git a/packages/polywrap-client/tests/test_client.py b/packages/polywrap-client/tests/test_client.py index 4039f45a..ee5a3073 100644 --- a/packages/polywrap-client/tests/test_client.py +++ b/packages/polywrap-client/tests/test_client.py @@ -1,9 +1,9 @@ from pathlib import Path import pytest from polywrap_client import PolywrapClient -from polywrap_core import Uri, InvokerOptions, InterfaceImplementations, Env +from polywrap_core import Uri, InvokerOptions from polywrap_uri_resolvers import BaseUriResolver, SimpleFileReader -from polywrap_result import Err, Ok, Result +from polywrap_result import Ok from polywrap_client.client import PolywrapClientConfig @@ -57,15 +57,7 @@ async def test_interface_implementation(): config=PolywrapClientConfig( envs={}, resolver=uri_resolver, - # Dict[Uri, List[Uri]] - interfaces= {interface_uri : [impl_uri]} - # previous implementations - # interfaces=[ - # InterfaceImplementations( - # interface=Uri("ens/interface.eth"), implementations=[impl_uri] - # ) - # ], ) ) uri = Uri( diff --git a/packages/polywrap-core/polywrap_core/types/interface_implementation.py b/packages/polywrap-core/polywrap_core/types/interface_implementation.py index b46ae79d..d0bbc307 100644 --- a/packages/polywrap-core/polywrap_core/types/interface_implementation.py +++ b/packages/polywrap-core/polywrap_core/types/interface_implementation.py @@ -5,7 +5,7 @@ from .uri import Uri - +# TODO: Should we remove this interfaceimplementation? @dataclass(slots=True, kw_only=True) class InterfaceImplementations: interface: Uri