pax_global_header00006660000000000000000000000064145364142330014517gustar00rootroot0000000000000052 comment=981a62b715c0bd31664342a7cff94a8624e18f79 pavoni-pyroon-981a62b/000077500000000000000000000000001453641423300146755ustar00rootroot00000000000000pavoni-pyroon-981a62b/.flake8000066400000000000000000000007161453641423300160540ustar00rootroot00000000000000 [flake8] exclude = venv,.venv,.git,.tox,.eggs,docs,venv,bin,lib,deps,build,tests # To work with Black max-line-length = 88 # E501: line too long # W503: Line break occurred before a binary operator # E203: Whitespace before ':' # D202 No blank lines allowed after function docstring # W504 line break after binary operator # Q000 Remove bad quotes # D100 Missing docstring in public module ignore = E501 W503 E203 D202 W504 Q000 D100pavoni-pyroon-981a62b/.github/000077500000000000000000000000001453641423300162355ustar00rootroot00000000000000pavoni-pyroon-981a62b/.github/workflows/000077500000000000000000000000001453641423300202725ustar00rootroot00000000000000pavoni-pyroon-981a62b/.github/workflows/build.yml000066400000000000000000000010441453641423300221130ustar00rootroot00000000000000name: Build on: pull_request: push: branches: - master jobs: build: runs-on: ubuntu-latest strategy: max-parallel: 4 matrix: python-version: [3.7] steps: - uses: actions/checkout@v3 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v3 with: python-version: ${{ matrix.python-version }} - name: Build run: | ./scripts/build.sh env: CI: 1 CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} pavoni-pyroon-981a62b/.github/workflows/publish.yml000066400000000000000000000006201453641423300224610ustar00rootroot00000000000000name: Publish on: release: types: [created] jobs: deploy: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - name: Set up Python 3.7 uses: actions/setup-python@v3 with: python-version: 3.7 - name: Build and publish run: | ./scripts/build_and_publish.sh ${{ secrets.PYPI_PASSWORD }} env: CI: 1 pavoni-pyroon-981a62b/.gitignore000066400000000000000000000002501453641423300166620ustar00rootroot00000000000000__pycache__ .DS_Store build/ test_token_file test_core_server_file test_core_port_file dist/ roonapi.egg-info/ .venv venv my_token_file my_core_id_file .python-version pavoni-pyroon-981a62b/.pylintrc000066400000000000000000000507031453641423300165470ustar00rootroot00000000000000[MAIN] # Analyse import fallback blocks. This can be used to support both Python 2 and # 3 compatible code, which means that the block might have code that exists # only in one or another interpreter, leading to false positives when analysed. analyse-fallback-blocks=no # Clear in-memory caches upon conclusion of linting. Useful if running pylint # in a server-like mode. clear-cache-post-run=no # Load and enable all available extensions. Use --list-extensions to see a list # all available extensions. #enable-all-extensions= # In error mode, messages with a category besides ERROR or FATAL are # suppressed, and no reports are done by default. Error mode is compatible with # disabling specific errors. #errors-only= # Always return a 0 (non-error) status code, even if lint errors are found. # This is primarily useful in continuous integration scripts. #exit-zero= # A comma-separated list of package or module names from where C extensions may # be loaded. Extensions are loading into the active Python interpreter and may # run arbitrary code. extension-pkg-allow-list= # A comma-separated list of package or module names from where C extensions may # be loaded. Extensions are loading into the active Python interpreter and may # run arbitrary code. (This is an alternative name to extension-pkg-allow-list # for backward compatibility.) extension-pkg-whitelist= # Return non-zero exit code if any of these messages/categories are detected, # even if score is above --fail-under value. Syntax same as enable. Messages # specified are enabled, while categories only check already-enabled messages. fail-on= # Specify a score threshold under which the program will exit with error. fail-under=10 # Interpret the stdin as a python script, whose filename needs to be passed as # the module_or_package argument. #from-stdin= # Files or directories to be skipped. They should be base names, not paths. ignore=CVS # Add files or directories matching the regular expressions patterns to the # ignore-list. The regex matches against paths and can be in Posix or Windows # format. Because '\\' represents the directory delimiter on Windows systems, # it can't be used as an escape character. ignore-paths= # Files or directories matching the regular expression patterns are skipped. # The regex matches against base names, not paths. The default value ignores # Emacs file locks ignore-patterns=^\.# # List of module names for which member attributes should not be checked # (useful for modules/projects where namespaces are manipulated during runtime # and thus existing member attributes cannot be deduced by static analysis). It # supports qualified module names, as well as Unix pattern matching. ignored-modules= # Python code to execute, usually for sys.path manipulation such as # pygtk.require(). #init-hook= # Use multiple processes to speed up Pylint. Specifying 0 will auto-detect the # number of processors available to use, and will cap the count on Windows to # avoid hangs. jobs=1 # Control the amount of potential inferred values when inferring a single # object. This can help the performance when dealing with large functions or # complex, nested conditions. limit-inference-results=100 # List of plugins (as comma separated values of python module names) to load, # usually to register additional checkers. load-plugins= # Pickle collected data for later comparisons. persistent=yes # Minimum Python version to use for version dependent checks. Will default to # the version used to run pylint. py-version=3.7 # Discover python modules and packages in the file system subtree. recursive=no # When enabled, pylint would attempt to guess common misconfiguration and emit # user-friendly hints instead of false-positive error messages. suggestion-mode=yes # Allow loading of arbitrary C extensions. Extensions are imported into the # active Python interpreter and may run arbitrary code. unsafe-load-any-extension=no # In verbose mode, extra non-checker-related info will be displayed. #verbose= [BASIC] # Naming style matching correct argument names. argument-naming-style=snake_case # Regular expression matching correct argument names. Overrides argument- # naming-style. If left empty, argument names will be checked with the set # naming style. #argument-rgx= # Naming style matching correct attribute names. attr-naming-style=snake_case # Regular expression matching correct attribute names. Overrides attr-naming- # style. If left empty, attribute names will be checked with the set naming # style. #attr-rgx= # Bad variable names which should always be refused, separated by a comma. bad-names=foo, bar, baz, toto, tutu, tata # Bad variable names regexes, separated by a comma. If names match any regex, # they will always be refused bad-names-rgxs= # Naming style matching correct class attribute names. class-attribute-naming-style=any # Regular expression matching correct class attribute names. Overrides class- # attribute-naming-style. If left empty, class attribute names will be checked # with the set naming style. #class-attribute-rgx= # Naming style matching correct class constant names. class-const-naming-style=UPPER_CASE # Regular expression matching correct class constant names. Overrides class- # const-naming-style. If left empty, class constant names will be checked with # the set naming style. #class-const-rgx= # Naming style matching correct class names. class-naming-style=PascalCase # Regular expression matching correct class names. Overrides class-naming- # style. If left empty, class names will be checked with the set naming style. #class-rgx= # Naming style matching correct constant names. const-naming-style=UPPER_CASE # Regular expression matching correct constant names. Overrides const-naming- # style. If left empty, constant names will be checked with the set naming # style. #const-rgx= # Minimum line length for functions/classes that require docstrings, shorter # ones are exempt. docstring-min-length=-1 # Naming style matching correct function names. function-naming-style=snake_case # Regular expression matching correct function names. Overrides function- # naming-style. If left empty, function names will be checked with the set # naming style. #function-rgx= # Good variable names which should always be accepted, separated by a comma. good-names=i, j, k, ex, Run, _ # Good variable names regexes, separated by a comma. If names match any regex, # they will always be accepted good-names-rgxs= # Include a hint for the correct naming format with invalid-name. include-naming-hint=no # Naming style matching correct inline iteration names. inlinevar-naming-style=any # Regular expression matching correct inline iteration names. Overrides # inlinevar-naming-style. If left empty, inline iteration names will be checked # with the set naming style. #inlinevar-rgx= # Naming style matching correct method names. method-naming-style=snake_case # Regular expression matching correct method names. Overrides method-naming- # style. If left empty, method names will be checked with the set naming style. #method-rgx= # Naming style matching correct module names. module-naming-style=snake_case # Regular expression matching correct module names. Overrides module-naming- # style. If left empty, module names will be checked with the set naming style. #module-rgx= # Colon-delimited sets of names that determine each other's naming style when # the name regexes allow several styles. name-group= # Regular expression which should only match function or class names that do # not require a docstring. no-docstring-rgx=^_ # List of decorators that produce properties, such as abc.abstractproperty. Add # to this list to register other decorators that produce valid properties. # These decorators are taken in consideration only for invalid-name. property-classes=abc.abstractproperty # Regular expression matching correct type variable names. If left empty, type # variable names will be checked with the set naming style. #typevar-rgx= # Naming style matching correct variable names. variable-naming-style=snake_case # Regular expression matching correct variable names. Overrides variable- # naming-style. If left empty, variable names will be checked with the set # naming style. #variable-rgx= [CLASSES] # Warn about protected attribute access inside special methods check-protected-access-in-special-methods=no # List of method names used to declare (i.e. assign) instance attributes. defining-attr-methods=__init__, __new__, setUp, __post_init__ # List of member names, which should be excluded from the protected access # warning. exclude-protected=_asdict, _fields, _replace, _source, _make # List of valid names for the first argument in a class method. valid-classmethod-first-arg=cls # List of valid names for the first argument in a metaclass class method. valid-metaclass-classmethod-first-arg=mcs [DESIGN] # List of regular expressions of class ancestor names to ignore when counting # public methods (see R0903) exclude-too-few-public-methods= # List of qualified class names to ignore when counting class parents (see # R0901) ignored-parents= # Maximum number of arguments for function / method. max-args=5 # Maximum number of attributes for a class (see R0902). max-attributes=7 # Maximum number of boolean expressions in an if statement (see R0916). max-bool-expr=5 # Maximum number of branch for function / method body. max-branches=12 # Maximum number of locals for function / method body. max-locals=15 # Maximum number of parents for a class (see R0901). max-parents=7 # Maximum number of public methods for a class (see R0904). max-public-methods=20 # Maximum number of return / yield for function / method body. max-returns=6 # Maximum number of statements in function / method body. max-statements=50 # Minimum number of public methods for a class (see R0903). min-public-methods=2 [EXCEPTIONS] # Exceptions that will emit a warning when caught. overgeneral-exceptions=builtins.BaseException,builtins.Exception [FORMAT] # Expected format of line ending, e.g. empty (any line ending), LF or CRLF. expected-line-ending-format= # Regexp for a line that is allowed to be longer than the limit. ignore-long-lines=^\s*(# )??$ # Number of spaces of indent required inside a hanging or continued line. indent-after-paren=4 # String used as indentation unit. This is usually " " (4 spaces) or "\t" (1 # tab). indent-string=' ' # Maximum number of characters on a single line. max-line-length=100 # Maximum number of lines in a module. max-module-lines=1000 # Allow the body of a class to be on the same line as the declaration if body # contains single statement. single-line-class-stmt=no # Allow the body of an if to be on the same line as the test if there is no # else. single-line-if-stmt=no [IMPORTS] # List of modules that can be imported at any level, not just the top level # one. allow-any-import-level= # Allow explicit reexports by alias from a package __init__. allow-reexport-from-package=no # Allow wildcard imports from modules that define __all__. allow-wildcard-with-all=no # Deprecated modules which should not be used, separated by a comma. deprecated-modules= # Output a graph (.gv or any supported image format) of external dependencies # to the given file (report RP0402 must not be disabled). ext-import-graph= # Output a graph (.gv or any supported image format) of all (i.e. internal and # external) dependencies to the given file (report RP0402 must not be # disabled). import-graph= # Output a graph (.gv or any supported image format) of internal dependencies # to the given file (report RP0402 must not be disabled). int-import-graph= # Force import order to recognize a module as part of the standard # compatibility libraries. known-standard-library= # Force import order to recognize a module as part of a third party library. known-third-party=enchant # Couples of modules and preferred modules, separated by a comma. preferred-modules= [LOGGING] # The type of string formatting that logging methods do. `old` means using % # formatting, `new` is for `{}` formatting. logging-format-style=old # Logging modules to check that the string format arguments are in logging # function parameter format. logging-modules=logging [MESSAGES CONTROL] # Only show warnings with the listed confidence levels. Leave empty to show # all. Valid levels: HIGH, CONTROL_FLOW, INFERENCE, INFERENCE_FAILURE, # UNDEFINED. confidence=HIGH, CONTROL_FLOW, INFERENCE, INFERENCE_FAILURE, UNDEFINED # Disable the message, report, category or checker with the given id(s). You # can either give multiple identifiers separated by comma (,) or put this # option multiple times (only on the command line, not in the configuration # file where it should appear only once). You can also use "--disable=all" to # disable everything first and then re-enable specific checks. For example, if # you want to run only the similarities checker, you can use "--disable=all # --enable=similarities". If you want to run only the classes checker, but have # no Warning level messages displayed, use "--disable=all --enable=classes # --disable=W". disable=raw-checker-failed, bad-inline-option, locally-disabled, file-ignored, suppressed-message, useless-suppression, deprecated-pragma, use-symbolic-message-instead, line-too-long, consider-using-f-string, missing-module-docstring, logging-not-lazy, too-many-public-methods # Enable the message, report, category or checker with the given id(s). You can # either give multiple identifier separated by comma (,) or put this option # multiple time (only on the command line, not in the configuration file where # it should appear only once). See also the "--disable" option for examples. enable=c-extension-no-member [METHOD_ARGS] # List of qualified names (i.e., library.method) which require a timeout # parameter e.g. 'requests.api.get,requests.api.post' timeout-methods=requests.api.delete,requests.api.get,requests.api.head,requests.api.options,requests.api.patch,requests.api.post,requests.api.put,requests.api.request [MISCELLANEOUS] # List of note tags to take in consideration, separated by a comma. notes=FIXME, XXX, TODO # Regular expression of note tags to take in consideration. notes-rgx= [REFACTORING] # Maximum number of nested blocks for function / method body max-nested-blocks=5 # Complete name of functions that never returns. When checking for # inconsistent-return-statements if a never returning function is called then # it will be considered as an explicit return statement and no message will be # printed. never-returning-functions=sys.exit,argparse.parse_error [REPORTS] # Python expression which should return a score less than or equal to 10. You # have access to the variables 'fatal', 'error', 'warning', 'refactor', # 'convention', and 'info' which contain the number of messages in each # category, as well as 'statement' which is the total number of statements # analyzed. This score is used by the global evaluation report (RP0004). evaluation=max(0, 0 if fatal else 10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)) # Template used to display messages. This is a python new-style format string # used to format the message information. See doc for all details. msg-template= # Set the output format. Available formats are text, parseable, colorized, json # and msvs (visual studio). You can also give a reporter class, e.g. # mypackage.mymodule.MyReporterClass. #output-format= # Tells whether to display a full report or only the messages. reports=no # Activate the evaluation score. score=yes [SIMILARITIES] # Comments are removed from the similarity computation ignore-comments=yes # Docstrings are removed from the similarity computation ignore-docstrings=yes # Imports are removed from the similarity computation ignore-imports=yes # Signatures are removed from the similarity computation ignore-signatures=yes # Minimum lines number of a similarity. min-similarity-lines=4 [SPELLING] # Limits count of emitted suggestions for spelling mistakes. max-spelling-suggestions=4 # Spelling dictionary name. Available dictionaries: none. To make it work, # install the 'python-enchant' package. spelling-dict= # List of comma separated words that should be considered directives if they # appear at the beginning of a comment and should not be checked. spelling-ignore-comment-directives=fmt: on,fmt: off,noqa:,noqa,nosec,isort:skip,mypy: # List of comma separated words that should not be checked. spelling-ignore-words= # A path to a file that contains the private dictionary; one word per line. spelling-private-dict-file= # Tells whether to store unknown words to the private dictionary (see the # --spelling-private-dict-file option) instead of raising a message. spelling-store-unknown-words=no [STRING] # This flag controls whether inconsistent-quotes generates a warning when the # character used as a quote delimiter is used inconsistently within a module. check-quote-consistency=no # This flag controls whether the implicit-str-concat should generate a warning # on implicit string concatenation in sequences defined over several lines. check-str-concat-over-line-jumps=no [TYPECHECK] # List of decorators that produce context managers, such as # contextlib.contextmanager. Add to this list to register other decorators that # produce valid context managers. contextmanager-decorators=contextlib.contextmanager # List of members which are set dynamically and missed by pylint inference # system, and so shouldn't trigger E1101 when accessed. Python regular # expressions are accepted. generated-members= # Tells whether to warn about missing members when the owner of the attribute # is inferred to be None. ignore-none=yes # This flag controls whether pylint should warn about no-member and similar # checks whenever an opaque object is returned when inferring. The inference # can return multiple potential results while evaluating a Python object, but # some branches might not be evaluated, which results in partial inference. In # that case, it might be useful to still emit no-member and other checks for # the rest of the inferred objects. ignore-on-opaque-inference=yes # List of symbolic message names to ignore for Mixin members. ignored-checks-for-mixins=no-member, not-async-context-manager, not-context-manager, attribute-defined-outside-init # List of class names for which member attributes should not be checked (useful # for classes with dynamically set attributes). This supports the use of # qualified names. ignored-classes=optparse.Values,thread._local,_thread._local,argparse.Namespace # Show a hint with possible names when a member name was not found. The aspect # of finding the hint is based on edit distance. missing-member-hint=yes # The minimum edit distance a name should have in order to be considered a # similar match for a missing member name. missing-member-hint-distance=1 # The total number of similar names that should be taken in consideration when # showing a hint for a missing member. missing-member-max-choices=1 # Regex pattern to define which classes are considered mixins. mixin-class-rgx=.*[Mm]ixin # List of decorators that change the signature of a decorated function. signature-mutators= [VARIABLES] # List of additional names supposed to be defined in builtins. Remember that # you should avoid defining new builtins when possible. additional-builtins= # Tells whether unused global variables should be treated as a violation. allow-global-unused-variables=yes # List of names allowed to shadow builtins allowed-redefined-builtins= # List of strings which can identify a callback function by name. A callback # name must start or end with one of those strings. callbacks=cb_, _cb # A regular expression matching the name of dummy variables (i.e. expected to # not be used). dummy-variables-rgx=_+$|(_[a-zA-Z0-9_]*[a-zA-Z0-9]+?$)|dummy|^ignored_|^unused_ # Argument names that match this expression will be ignored. ignored-argument-names=_.*|^ignored_|^unused_ # Tells whether we should check for unused import in __init__ files. init-import=no # List of qualified module names which can have objects that can redefine # builtins. redefining-builtins-modules=six.moves,past.builtins,future.builtins,builtins,io pavoni-pyroon-981a62b/LICENSE000066400000000000000000000261351453641423300157110ustar00rootroot00000000000000 Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. pavoni-pyroon-981a62b/MANIFEST000066400000000000000000000002711453641423300160260ustar00rootroot00000000000000# file GENERATED by distutils, do NOT edit LICENSE README.md setup.cfg setup.py roon/.soodmsg roon/__init__.py roon/constants.py roon/discovery.py roon/roonapi.py roon/roonapisocket.py pavoni-pyroon-981a62b/MANIFEST.in000077500000000000000000000000701453641423300164330ustar00rootroot00000000000000include README.md include LICENSE include roon/.soodmsg pavoni-pyroon-981a62b/README.md000066400000000000000000000025501453641423300161560ustar00rootroot00000000000000# pyRoon ![Build status](https://github.com/pavoni/pyroon/workflows/Build/badge.svg) ![PyPi version](https://img.shields.io/pypi/v/roonapi) ![PyPi downloads](https://img.shields.io/pypi/dm/roonapi) python library to interface with the Roon API (www.roonlabs.com) See https://github.com/pavoni/pyroon/tree/master/examples for code examples. An example of connecting to the roon server and using a subscription: ``` import time from roonapi import RoonApi appinfo = { "extension_id": "python_roon_test", "display_name": "Python library for Roon", "display_version": "1.0.0", "publisher": "gregd", "email": "mygreat@emailaddress.com", } # Can be None if you don't yet have a token token = open("mytokenfile").read() # Take a look at examples/discovery if you want to use discovery. server = "192.168.1.160" roonapi = RoonApi(appinfo, token, server) def my_state_callback(event, changed_ids): """Call when something changes in roon.""" print("my_state_callback event:%s changed_ids: %s" % (event, changed_ids)) for zone_id in changed_ids: zone = roonapi.zones[zone_id] print("zone_id:%s zone_info: %s" % (zone_id, zone)) # receive state updates in your callback roonapi.register_state_callback(my_state_callback) time.sleep(60) # save the token for next time with open("mytokenfile", "w") as f: f.write(roonapi.token)``` pavoni-pyroon-981a62b/examples/000077500000000000000000000000001453641423300165135ustar00rootroot00000000000000pavoni-pyroon-981a62b/examples/demo.py000066400000000000000000000012761453641423300200170ustar00rootroot00000000000000from roonapi import RoonApi, RoonDiscovery appinfo = { "extension_id": "python_roon_test", "display_name": "Python library for Roon", "display_version": "1.0.0", "publisher": "gregd", "email": "mygreat@emailaddress.com", } # Can be None if you don't yet have a token try: core_id = open("my_core_id_file").read() token = open("my_token_file").read() except OSError: print("Please authorise first using discovery.py") exit() discover = RoonDiscovery(core_id) server = discover.first() discover.stop() roonapi = RoonApi(appinfo, token, server[0], server[1], True) # get all zones (as dict) print(roonapi.zones) # get all outputs (as dict) print(roonapi.outputs) pavoni-pyroon-981a62b/examples/discovery.py000066400000000000000000000017721453641423300211030ustar00rootroot00000000000000import time from roonapi import RoonApi, RoonDiscovery appinfo = { "extension_id": "python_roon_test", "display_name": "Python library for Roon", "display_version": "1.0.0", "publisher": "gregd", "email": "mygreat@emailaddress.com", } discover = RoonDiscovery(None) servers = discover.all() print("Shutdown discovery") discover.stop() print("Found the following servers") print(servers) apis = [RoonApi(appinfo, None, server[0], server[1], False) for server in servers] auth_api = [] while len(auth_api) == 0: print("Waiting for authorisation") time.sleep(1) auth_api = [api for api in apis if api.token is not None] api = auth_api[0] print("Got authorisation") print(api.host) print(api.core_name) print(api.core_id) print("Shutdown apis") for api in apis: api.stop() # This is what we need to reconnect core_id = api.core_id token = api.token with open("my_core_id_file", "w") as f: f.write(api.core_id) with open("my_token_file", "w") as f: f.write(api.token) pavoni-pyroon-981a62b/examples/groups.py000066400000000000000000000021011453641423300203760ustar00rootroot00000000000000from roonapi import RoonApi, RoonDiscovery appinfo = { "extension_id": "python_roon_test", "display_name": "Python library for Roon", "display_version": "1.0.0", "publisher": "gregd", "email": "mygreat@emailaddress.com", } try: core_id = open("my_core_id_file").read() token = open("my_token_file").read() except OSError: print("Please authorise first using discovery.py") exit() discover = RoonDiscovery(core_id) server = discover.first() discover.stop() roonapi = RoonApi(appinfo, token, server[0], server[1], True) # get all zones (as dict) zones = roonapi.zones outputs = roonapi.outputs for k, v in outputs.items(): zone_id = v["zone_id"] output_id = k display_name = v["display_name"] is_group_main = roonapi.is_group_main(output_id) is_grouped = roonapi.is_grouped(output_id) grouped_zone_names = roonapi.grouped_zone_names(output_id) print( display_name, "grouped?", is_grouped, "is_main?", is_group_main, "grouped_zone_names:", grouped_zone_names, ) pavoni-pyroon-981a62b/examples/play.py000066400000000000000000000026561453641423300200430ustar00rootroot00000000000000from roonapi import RoonApi, RoonDiscovery appinfo = { "extension_id": "python_roon_test", "display_name": "Python library for Roon", "display_version": "1.0.0", "publisher": "gregd", "email": "mygreat@emailaddress.com", } target_zone = "Study" try: core_id = open("my_core_id_file").read() token = open("my_token_file").read() except OSError: print("Please authorise first using discovery.py") exit() discover = RoonDiscovery(core_id) server = discover.first() discover.stop() roonapi = RoonApi(appinfo, token, server[0], server[1], True) # get target zone output_id zones = roonapi.zones output_id = [ output["zone_id"] for output in zones.values() if output["display_name"] == target_zone ][0] print("OUTPUT ID", output_id) # Examples of using play_media print("RADIO") items = roonapi.play_media(output_id, ["My Live Radio", "BBC Radio 4"]) print("SINGLE ARTIST") items = roonapi.play_media(output_id, ["Library", "Artists", "Neil Young"]) print("SINGLE ARTIST ALBUM") items = roonapi.play_media( output_id, ["Library", "Artists", "Neil Young", "After The Goldrush"] ) print("PLAY SINGLE ARTIST ALBUM - use Queue") items = roonapi.play_media( output_id, ["Library", "Artists", "Neil Young", "Harvest"], "Queue" ) print("PLAY SUB GENRE") items = roonapi.play_media(output_id, ["Genres", "Jazz", "Cool"]) print("TAG") items = roonapi.play_media(output_id, ["Library", "Tags", "Mix"]) pavoni-pyroon-981a62b/examples/play_error.py000066400000000000000000000021211453641423300212370ustar00rootroot00000000000000from roonapi import RoonApi, RoonDiscovery appinfo = { "extension_id": "python_roon_test", "display_name": "Python library for Roon", "display_version": "1.0.0", "publisher": "gregd", "email": "mygreat@emailaddress.com", } target_zone = "Study" try: core_id = open("my_core_id_file").read() token = open("my_token_file").read() except OSError: print("Please authorise first using discovery.py") exit() discover = RoonDiscovery(core_id) server = discover.first() discover.stop() roonapi = RoonApi(appinfo, token, server[0], server[1], True) # get target zone output_id zones = roonapi.zones output_id = [ output["zone_id"] for output in zones.values() if output["display_name"] == target_zone ][0] print("OUTPUT ID", output_id) # Examples of using play_media print("PLAY Something unplayable - should give error") items = roonapi.play_media(output_id, ["Qobuz", "My Qobuz", "Favorite Albums"]) print("PLAY Something playable - this should work") items = roonapi.play_media( output_id, ["Qobuz", "My Qobuz", "Favorite Albums", "Umiera Piekno"] ) pavoni-pyroon-981a62b/examples/subscription.py000066400000000000000000000017261453641423300216170ustar00rootroot00000000000000import time from roonapi import RoonApi, RoonDiscovery appinfo = { "extension_id": "python_roon_test", "display_name": "Python library for Roon", "display_version": "1.0.0", "publisher": "gregd", "email": "mygreat@emailaddress.com", } try: core_id = open("my_core_id_file").read() token = open("my_token_file").read() except OSError: print("Please authorise first using discovery.py") exit() discover = RoonDiscovery(core_id) server = discover.first() discover.stop() roonapi = RoonApi(appinfo, token, server[0], server[1], True) def my_state_callback(event, changed_ids): """Call when something changes in roon.""" print("my_state_callback event:%s changed_ids: %s" % (event, changed_ids)) for zone_id in changed_ids: zone = roonapi.zones[zone_id] print("zone_id:%s zone_info: %s" % (zone_id, zone)) # receive state updates in your callback roonapi.register_state_callback(my_state_callback) time.sleep(10) pavoni-pyroon-981a62b/examples/volume_control.py000066400000000000000000000034211453641423300221340ustar00rootroot00000000000000import time from roonapi import RoonApi, RoonDiscovery appinfo = { "extension_id": "python_roon_test", "display_name": "Python library for Roon", "display_version": "1.0.0", "publisher": "gregd", "email": "mygreat@emailaddress.com", } # The Roon output you want this code to control VOLUME_OUTPUT = "Hi Fi" # After running go to roon - and change the volume control method to # Python Library for Roon # You will then get callbacks below when the volumes for that endpoint are changed try: core_id = open("my_core_id_file").read() token = open("my_token_file").read() except OSError: print("Please authorise first using discovery.py") exit() discover = RoonDiscovery(core_id) server = discover.first() discover.stop() roonapi = RoonApi(appinfo, token, server[0], server[1], True) def volume_control_callback(control_key, event, value): """Handle roon callback when Called by roon when volume is changed.""" print( "volume_control_callback control_key: %s event: %s value: %s" % (control_key, event, value) ) # DO WHAT YOU NEED TO DO TO CHANGE THE VOLUME HERE if event == "set_volume": print("CHANGE VOLUME TO: %s" % (value)) elif event == "set_mute": if value: print("MUTE VOLUME") else: print("UNMUTE VOLUME") else: print("COMMAND NOT SUPPORTED - %s" % (event)) # Feedback to roon if event == "set_volume": roonapi.update_volume_control(control_key, value) elif event == "set_mute": roonapi.update_volume_control(control_key, None, value) roonapi.register_volume_control( "1", VOLUME_OUTPUT, volume_control_callback, 0, "db", 2, -150, 0, True ) time.sleep(100) pavoni-pyroon-981a62b/poetry.lock000066400000000000000000002012101453641423300170650ustar00rootroot00000000000000# This file is automatically @generated by Poetry 1.5.1 and should not be changed by hand. [[package]] name = "astroid" version = "2.14.2" description = "An abstract syntax tree for Python with inference support." optional = false python-versions = ">=3.7.2" files = [ {file = "astroid-2.14.2-py3-none-any.whl", hash = "sha256:0e0e3709d64fbffd3037e4ff403580550f14471fd3eaae9fa11cc9a5c7901153"}, {file = "astroid-2.14.2.tar.gz", hash = "sha256:a3cf9f02c53dd259144a7e8f3ccd75d67c9a8c716ef183e0c1f291bc5d7bb3cf"}, ] [package.dependencies] lazy-object-proxy = ">=1.4.0" typed-ast = {version = ">=1.4.0,<2.0", markers = "implementation_name == \"cpython\" and python_version < \"3.8\""} typing-extensions = {version = ">=4.0.0", markers = "python_version < \"3.11\""} wrapt = [ {version = ">=1.11,<2", markers = "python_version < \"3.11\""}, {version = ">=1.14,<2", markers = "python_version >= \"3.11\""}, ] [[package]] name = "atomicwrites" version = "1.4.1" description = "Atomic file writes." optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" files = [ {file = "atomicwrites-1.4.1.tar.gz", hash = "sha256:81b2c9071a49367a7f770170e5eec8cb66567cfbbc8c73d20ce5ca4a8d71cf11"}, ] [[package]] name = "attrs" version = "22.2.0" description = "Classes Without Boilerplate" optional = false python-versions = ">=3.6" files = [ {file = "attrs-22.2.0-py3-none-any.whl", hash = "sha256:29e95c7f6778868dbd49170f98f8818f78f3dc5e0e37c0b1f474e3561b240836"}, {file = "attrs-22.2.0.tar.gz", hash = "sha256:c9227bfc2f01993c03f68db37d1d15c9690188323c067c641f1a35ca58185f99"}, ] [package.extras] cov = ["attrs[tests]", "coverage-enable-subprocess", "coverage[toml] (>=5.3)"] dev = ["attrs[docs,tests]"] docs = ["furo", "myst-parser", "sphinx", "sphinx-notfound-page", "sphinxcontrib-towncrier", "towncrier", "zope.interface"] tests = ["attrs[tests-no-zope]", "zope.interface"] tests-no-zope = ["cloudpickle", "cloudpickle", "hypothesis", "hypothesis", "mypy (>=0.971,<0.990)", "mypy (>=0.971,<0.990)", "pympler", "pympler", "pytest (>=4.3.0)", "pytest (>=4.3.0)", "pytest-mypy-plugins", "pytest-mypy-plugins", "pytest-xdist[psutil]", "pytest-xdist[psutil]"] [[package]] name = "black" version = "23.1.0" description = "The uncompromising code formatter." optional = false python-versions = ">=3.7" files = [ {file = "black-23.1.0-cp310-cp310-macosx_10_16_arm64.whl", hash = "sha256:b6a92a41ee34b883b359998f0c8e6eb8e99803aa8bf3123bf2b2e6fec505a221"}, {file = "black-23.1.0-cp310-cp310-macosx_10_16_universal2.whl", hash = "sha256:57c18c5165c1dbe291d5306e53fb3988122890e57bd9b3dcb75f967f13411a26"}, {file = "black-23.1.0-cp310-cp310-macosx_10_16_x86_64.whl", hash = "sha256:9880d7d419bb7e709b37e28deb5e68a49227713b623c72b2b931028ea65f619b"}, {file = "black-23.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e6663f91b6feca5d06f2ccd49a10f254f9298cc1f7f49c46e498a0771b507104"}, {file = "black-23.1.0-cp310-cp310-win_amd64.whl", hash = "sha256:9afd3f493666a0cd8f8df9a0200c6359ac53940cbde049dcb1a7eb6ee2dd7074"}, {file = "black-23.1.0-cp311-cp311-macosx_10_16_arm64.whl", hash = "sha256:bfffba28dc52a58f04492181392ee380e95262af14ee01d4bc7bb1b1c6ca8d27"}, {file = "black-23.1.0-cp311-cp311-macosx_10_16_universal2.whl", hash = "sha256:c1c476bc7b7d021321e7d93dc2cbd78ce103b84d5a4cf97ed535fbc0d6660648"}, {file = "black-23.1.0-cp311-cp311-macosx_10_16_x86_64.whl", hash = "sha256:382998821f58e5c8238d3166c492139573325287820963d2f7de4d518bd76958"}, {file = "black-23.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2bf649fda611c8550ca9d7592b69f0637218c2369b7744694c5e4902873b2f3a"}, {file = "black-23.1.0-cp311-cp311-win_amd64.whl", hash = "sha256:121ca7f10b4a01fd99951234abdbd97728e1240be89fde18480ffac16503d481"}, {file = "black-23.1.0-cp37-cp37m-macosx_10_16_x86_64.whl", hash = "sha256:a8471939da5e824b891b25751955be52ee7f8a30a916d570a5ba8e0f2eb2ecad"}, {file = "black-23.1.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8178318cb74f98bc571eef19068f6ab5613b3e59d4f47771582f04e175570ed8"}, {file = "black-23.1.0-cp37-cp37m-win_amd64.whl", hash = "sha256:a436e7881d33acaf2536c46a454bb964a50eff59b21b51c6ccf5a40601fbef24"}, {file = "black-23.1.0-cp38-cp38-macosx_10_16_arm64.whl", hash = "sha256:a59db0a2094d2259c554676403fa2fac3473ccf1354c1c63eccf7ae65aac8ab6"}, {file = "black-23.1.0-cp38-cp38-macosx_10_16_universal2.whl", hash = "sha256:0052dba51dec07ed029ed61b18183942043e00008ec65d5028814afaab9a22fd"}, {file = "black-23.1.0-cp38-cp38-macosx_10_16_x86_64.whl", hash = "sha256:49f7b39e30f326a34b5c9a4213213a6b221d7ae9d58ec70df1c4a307cf2a1580"}, {file = "black-23.1.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:162e37d49e93bd6eb6f1afc3e17a3d23a823042530c37c3c42eeeaf026f38468"}, {file = "black-23.1.0-cp38-cp38-win_amd64.whl", hash = "sha256:8b70eb40a78dfac24842458476135f9b99ab952dd3f2dab738c1881a9b38b753"}, {file = "black-23.1.0-cp39-cp39-macosx_10_16_arm64.whl", hash = "sha256:a29650759a6a0944e7cca036674655c2f0f63806ddecc45ed40b7b8aa314b651"}, {file = "black-23.1.0-cp39-cp39-macosx_10_16_universal2.whl", hash = "sha256:bb460c8561c8c1bec7824ecbc3ce085eb50005883a6203dcfb0122e95797ee06"}, {file = "black-23.1.0-cp39-cp39-macosx_10_16_x86_64.whl", hash = "sha256:c91dfc2c2a4e50df0026f88d2215e166616e0c80e86004d0003ece0488db2739"}, {file = "black-23.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2a951cc83ab535d248c89f300eccbd625e80ab880fbcfb5ac8afb5f01a258ac9"}, {file = "black-23.1.0-cp39-cp39-win_amd64.whl", hash = "sha256:0680d4380db3719ebcfb2613f34e86c8e6d15ffeabcf8ec59355c5e7b85bb555"}, {file = "black-23.1.0-py3-none-any.whl", hash = "sha256:7a0f701d314cfa0896b9001df70a530eb2472babb76086344e688829efd97d32"}, {file = "black-23.1.0.tar.gz", hash = "sha256:b0bd97bea8903f5a2ba7219257a44e3f1f9d00073d6cc1add68f0beec69692ac"}, ] [package.dependencies] click = ">=8.0.0" mypy-extensions = ">=0.4.3" packaging = ">=22.0" pathspec = ">=0.9.0" platformdirs = ">=2" tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""} typed-ast = {version = ">=1.4.2", markers = "python_version < \"3.8\" and implementation_name == \"cpython\""} typing-extensions = {version = ">=3.10.0.0", markers = "python_version < \"3.10\""} [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 = "certifi" version = "2023.7.22" description = "Python package for providing Mozilla's CA Bundle." optional = false python-versions = ">=3.6" files = [ {file = "certifi-2023.7.22-py3-none-any.whl", hash = "sha256:92d6037539857d8206b8f6ae472e8b77db8058fec5937a1ef3f54304089edbb9"}, {file = "certifi-2023.7.22.tar.gz", hash = "sha256:539cc1d13202e33ca466e88b2807e29f4c13049d6d87031a3c110744495cb082"}, ] [[package]] name = "charset-normalizer" version = "3.0.1" description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet." optional = false python-versions = "*" files = [ {file = "charset-normalizer-3.0.1.tar.gz", hash = "sha256:ebea339af930f8ca5d7a699b921106c6e29c617fe9606fa7baa043c1cdae326f"}, {file = "charset_normalizer-3.0.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:88600c72ef7587fe1708fd242b385b6ed4b8904976d5da0893e31df8b3480cb6"}, {file = "charset_normalizer-3.0.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:c75ffc45f25324e68ab238cb4b5c0a38cd1c3d7f1fb1f72b5541de469e2247db"}, {file = "charset_normalizer-3.0.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:db72b07027db150f468fbada4d85b3b2729a3db39178abf5c543b784c1254539"}, {file = "charset_normalizer-3.0.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:62595ab75873d50d57323a91dd03e6966eb79c41fa834b7a1661ed043b2d404d"}, {file = "charset_normalizer-3.0.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ff6f3db31555657f3163b15a6b7c6938d08df7adbfc9dd13d9d19edad678f1e8"}, {file = "charset_normalizer-3.0.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:772b87914ff1152b92a197ef4ea40efe27a378606c39446ded52c8f80f79702e"}, {file = "charset_normalizer-3.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:70990b9c51340e4044cfc394a81f614f3f90d41397104d226f21e66de668730d"}, {file = "charset_normalizer-3.0.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:292d5e8ba896bbfd6334b096e34bffb56161c81408d6d036a7dfa6929cff8783"}, {file = "charset_normalizer-3.0.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:2edb64ee7bf1ed524a1da60cdcd2e1f6e2b4f66ef7c077680739f1641f62f555"}, {file = "charset_normalizer-3.0.1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:31a9ddf4718d10ae04d9b18801bd776693487cbb57d74cc3458a7673f6f34639"}, {file = "charset_normalizer-3.0.1-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:44ba614de5361b3e5278e1241fda3dc1838deed864b50a10d7ce92983797fa76"}, {file = "charset_normalizer-3.0.1-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:12db3b2c533c23ab812c2b25934f60383361f8a376ae272665f8e48b88e8e1c6"}, {file = "charset_normalizer-3.0.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:c512accbd6ff0270939b9ac214b84fb5ada5f0409c44298361b2f5e13f9aed9e"}, {file = "charset_normalizer-3.0.1-cp310-cp310-win32.whl", hash = "sha256:502218f52498a36d6bf5ea77081844017bf7982cdbe521ad85e64cabee1b608b"}, {file = "charset_normalizer-3.0.1-cp310-cp310-win_amd64.whl", hash = "sha256:601f36512f9e28f029d9481bdaf8e89e5148ac5d89cffd3b05cd533eeb423b59"}, {file = "charset_normalizer-3.0.1-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:0298eafff88c99982a4cf66ba2efa1128e4ddaca0b05eec4c456bbc7db691d8d"}, {file = "charset_normalizer-3.0.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:a8d0fc946c784ff7f7c3742310cc8a57c5c6dc31631269876a88b809dbeff3d3"}, {file = "charset_normalizer-3.0.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:87701167f2a5c930b403e9756fab1d31d4d4da52856143b609e30a1ce7160f3c"}, {file = "charset_normalizer-3.0.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:14e76c0f23218b8f46c4d87018ca2e441535aed3632ca134b10239dfb6dadd6b"}, {file = "charset_normalizer-3.0.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:0c0a590235ccd933d9892c627dec5bc7511ce6ad6c1011fdf5b11363022746c1"}, {file = "charset_normalizer-3.0.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8c7fe7afa480e3e82eed58e0ca89f751cd14d767638e2550c77a92a9e749c317"}, {file = "charset_normalizer-3.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:79909e27e8e4fcc9db4addea88aa63f6423ebb171db091fb4373e3312cb6d603"}, {file = "charset_normalizer-3.0.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:8ac7b6a045b814cf0c47f3623d21ebd88b3e8cf216a14790b455ea7ff0135d18"}, {file = "charset_normalizer-3.0.1-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:72966d1b297c741541ca8cf1223ff262a6febe52481af742036a0b296e35fa5a"}, {file = "charset_normalizer-3.0.1-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:f9d0c5c045a3ca9bedfc35dca8526798eb91a07aa7a2c0fee134c6c6f321cbd7"}, {file = "charset_normalizer-3.0.1-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:5995f0164fa7df59db4746112fec3f49c461dd6b31b841873443bdb077c13cfc"}, {file = "charset_normalizer-3.0.1-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:4a8fcf28c05c1f6d7e177a9a46a1c52798bfe2ad80681d275b10dcf317deaf0b"}, {file = "charset_normalizer-3.0.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:761e8904c07ad053d285670f36dd94e1b6ab7f16ce62b9805c475b7aa1cffde6"}, {file = "charset_normalizer-3.0.1-cp311-cp311-win32.whl", hash = "sha256:71140351489970dfe5e60fc621ada3e0f41104a5eddaca47a7acb3c1b851d6d3"}, {file = "charset_normalizer-3.0.1-cp311-cp311-win_amd64.whl", hash = "sha256:9ab77acb98eba3fd2a85cd160851816bfce6871d944d885febf012713f06659c"}, {file = "charset_normalizer-3.0.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:84c3990934bae40ea69a82034912ffe5a62c60bbf6ec5bc9691419641d7d5c9a"}, {file = "charset_normalizer-3.0.1-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:74292fc76c905c0ef095fe11e188a32ebd03bc38f3f3e9bcb85e4e6db177b7ea"}, {file = "charset_normalizer-3.0.1-cp36-cp36m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c95a03c79bbe30eec3ec2b7f076074f4281526724c8685a42872974ef4d36b72"}, {file = "charset_normalizer-3.0.1-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f4c39b0e3eac288fedc2b43055cfc2ca7a60362d0e5e87a637beac5d801ef478"}, {file = "charset_normalizer-3.0.1-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:df2c707231459e8a4028eabcd3cfc827befd635b3ef72eada84ab13b52e1574d"}, {file = "charset_normalizer-3.0.1-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:93ad6d87ac18e2a90b0fe89df7c65263b9a99a0eb98f0a3d2e079f12a0735837"}, {file = "charset_normalizer-3.0.1-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:59e5686dd847347e55dffcc191a96622f016bc0ad89105e24c14e0d6305acbc6"}, {file = "charset_normalizer-3.0.1-cp36-cp36m-musllinux_1_1_i686.whl", hash = "sha256:cd6056167405314a4dc3c173943f11249fa0f1b204f8b51ed4bde1a9cd1834dc"}, {file = "charset_normalizer-3.0.1-cp36-cp36m-musllinux_1_1_ppc64le.whl", hash = "sha256:083c8d17153ecb403e5e1eb76a7ef4babfc2c48d58899c98fcaa04833e7a2f9a"}, {file = "charset_normalizer-3.0.1-cp36-cp36m-musllinux_1_1_s390x.whl", hash = "sha256:f5057856d21e7586765171eac8b9fc3f7d44ef39425f85dbcccb13b3ebea806c"}, {file = "charset_normalizer-3.0.1-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:7eb33a30d75562222b64f569c642ff3dc6689e09adda43a082208397f016c39a"}, {file = "charset_normalizer-3.0.1-cp36-cp36m-win32.whl", hash = "sha256:95dea361dd73757c6f1c0a1480ac499952c16ac83f7f5f4f84f0658a01b8ef41"}, {file = "charset_normalizer-3.0.1-cp36-cp36m-win_amd64.whl", hash = "sha256:eaa379fcd227ca235d04152ca6704c7cb55564116f8bc52545ff357628e10602"}, {file = "charset_normalizer-3.0.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:3e45867f1f2ab0711d60c6c71746ac53537f1684baa699f4f668d4c6f6ce8e14"}, {file = "charset_normalizer-3.0.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cadaeaba78750d58d3cc6ac4d1fd867da6fc73c88156b7a3212a3cd4819d679d"}, {file = "charset_normalizer-3.0.1-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:911d8a40b2bef5b8bbae2e36a0b103f142ac53557ab421dc16ac4aafee6f53dc"}, {file = "charset_normalizer-3.0.1-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:503e65837c71b875ecdd733877d852adbc465bd82c768a067badd953bf1bc5a3"}, {file = "charset_normalizer-3.0.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a60332922359f920193b1d4826953c507a877b523b2395ad7bc716ddd386d866"}, {file = "charset_normalizer-3.0.1-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:16a8663d6e281208d78806dbe14ee9903715361cf81f6d4309944e4d1e59ac5b"}, {file = "charset_normalizer-3.0.1-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:a16418ecf1329f71df119e8a65f3aa68004a3f9383821edcb20f0702934d8087"}, {file = "charset_normalizer-3.0.1-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:9d9153257a3f70d5f69edf2325357251ed20f772b12e593f3b3377b5f78e7ef8"}, {file = "charset_normalizer-3.0.1-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:02a51034802cbf38db3f89c66fb5d2ec57e6fe7ef2f4a44d070a593c3688667b"}, {file = "charset_normalizer-3.0.1-cp37-cp37m-musllinux_1_1_s390x.whl", hash = "sha256:2e396d70bc4ef5325b72b593a72c8979999aa52fb8bcf03f701c1b03e1166918"}, {file = "charset_normalizer-3.0.1-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:11b53acf2411c3b09e6af37e4b9005cba376c872503c8f28218c7243582df45d"}, {file = "charset_normalizer-3.0.1-cp37-cp37m-win32.whl", hash = "sha256:0bf2dae5291758b6f84cf923bfaa285632816007db0330002fa1de38bfcb7154"}, {file = "charset_normalizer-3.0.1-cp37-cp37m-win_amd64.whl", hash = "sha256:2c03cc56021a4bd59be889c2b9257dae13bf55041a3372d3295416f86b295fb5"}, {file = "charset_normalizer-3.0.1-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:024e606be3ed92216e2b6952ed859d86b4cfa52cd5bc5f050e7dc28f9b43ec42"}, {file = "charset_normalizer-3.0.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:4b0d02d7102dd0f997580b51edc4cebcf2ab6397a7edf89f1c73b586c614272c"}, {file = "charset_normalizer-3.0.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:358a7c4cb8ba9b46c453b1dd8d9e431452d5249072e4f56cfda3149f6ab1405e"}, {file = "charset_normalizer-3.0.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:81d6741ab457d14fdedc215516665050f3822d3e56508921cc7239f8c8e66a58"}, {file = "charset_normalizer-3.0.1-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:8b8af03d2e37866d023ad0ddea594edefc31e827fee64f8de5611a1dbc373174"}, {file = "charset_normalizer-3.0.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9cf4e8ad252f7c38dd1f676b46514f92dc0ebeb0db5552f5f403509705e24753"}, {file = "charset_normalizer-3.0.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e696f0dd336161fca9adbb846875d40752e6eba585843c768935ba5c9960722b"}, {file = "charset_normalizer-3.0.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c22d3fe05ce11d3671297dc8973267daa0f938b93ec716e12e0f6dee81591dc1"}, {file = "charset_normalizer-3.0.1-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:109487860ef6a328f3eec66f2bf78b0b72400280d8f8ea05f69c51644ba6521a"}, {file = "charset_normalizer-3.0.1-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:37f8febc8ec50c14f3ec9637505f28e58d4f66752207ea177c1d67df25da5aed"}, {file = "charset_normalizer-3.0.1-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:f97e83fa6c25693c7a35de154681fcc257c1c41b38beb0304b9c4d2d9e164479"}, {file = "charset_normalizer-3.0.1-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:a152f5f33d64a6be73f1d30c9cc82dfc73cec6477ec268e7c6e4c7d23c2d2291"}, {file = "charset_normalizer-3.0.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:39049da0ffb96c8cbb65cbf5c5f3ca3168990adf3551bd1dee10c48fce8ae820"}, {file = "charset_normalizer-3.0.1-cp38-cp38-win32.whl", hash = "sha256:4457ea6774b5611f4bed5eaa5df55f70abde42364d498c5134b7ef4c6958e20e"}, {file = "charset_normalizer-3.0.1-cp38-cp38-win_amd64.whl", hash = "sha256:e62164b50f84e20601c1ff8eb55620d2ad25fb81b59e3cd776a1902527a788af"}, {file = "charset_normalizer-3.0.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:8eade758719add78ec36dc13201483f8e9b5d940329285edcd5f70c0a9edbd7f"}, {file = "charset_normalizer-3.0.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:8499ca8f4502af841f68135133d8258f7b32a53a1d594aa98cc52013fff55678"}, {file = "charset_normalizer-3.0.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:3fc1c4a2ffd64890aebdb3f97e1278b0cc72579a08ca4de8cd2c04799a3a22be"}, {file = "charset_normalizer-3.0.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:00d3ffdaafe92a5dc603cb9bd5111aaa36dfa187c8285c543be562e61b755f6b"}, {file = "charset_normalizer-3.0.1-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c2ac1b08635a8cd4e0cbeaf6f5e922085908d48eb05d44c5ae9eabab148512ca"}, {file = "charset_normalizer-3.0.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f6f45710b4459401609ebebdbcfb34515da4fc2aa886f95107f556ac69a9147e"}, {file = "charset_normalizer-3.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3ae1de54a77dc0d6d5fcf623290af4266412a7c4be0b1ff7444394f03f5c54e3"}, {file = "charset_normalizer-3.0.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3b590df687e3c5ee0deef9fc8c547d81986d9a1b56073d82de008744452d6541"}, {file = "charset_normalizer-3.0.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:ab5de034a886f616a5668aa5d098af2b5385ed70142090e2a31bcbd0af0fdb3d"}, {file = "charset_normalizer-3.0.1-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:9cb3032517f1627cc012dbc80a8ec976ae76d93ea2b5feaa9d2a5b8882597579"}, {file = "charset_normalizer-3.0.1-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:608862a7bf6957f2333fc54ab4399e405baad0163dc9f8d99cb236816db169d4"}, {file = "charset_normalizer-3.0.1-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:0f438ae3532723fb6ead77e7c604be7c8374094ef4ee2c5e03a3a17f1fca256c"}, {file = "charset_normalizer-3.0.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:356541bf4381fa35856dafa6a965916e54bed415ad8a24ee6de6e37deccf2786"}, {file = "charset_normalizer-3.0.1-cp39-cp39-win32.whl", hash = "sha256:39cf9ed17fe3b1bc81f33c9ceb6ce67683ee7526e65fde1447c772afc54a1bb8"}, {file = "charset_normalizer-3.0.1-cp39-cp39-win_amd64.whl", hash = "sha256:0a11e971ed097d24c534c037d298ad32c6ce81a45736d31e0ff0ad37ab437d59"}, {file = "charset_normalizer-3.0.1-py3-none-any.whl", hash = "sha256:7e189e2e1d3ed2f4aebabd2d5b0f931e883676e51c7624826e0a4e5fe8a0bf24"}, ] [[package]] name = "click" version = "8.1.3" description = "Composable command line interface toolkit" optional = false python-versions = ">=3.7" files = [ {file = "click-8.1.3-py3-none-any.whl", hash = "sha256:bb4d8133cb15a609f44e8213d9b391b0809795062913b383c62be0ee95b1db48"}, {file = "click-8.1.3.tar.gz", hash = "sha256:7682dc8afb30297001674575ea00d1814d808d6a36af415a82bd481d37ba7b8e"}, ] [package.dependencies] colorama = {version = "*", markers = "platform_system == \"Windows\""} importlib-metadata = {version = "*", markers = "python_version < \"3.8\""} [[package]] name = "colorama" version = "0.4.6" description = "Cross-platform colored terminal text." optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" files = [ {file = "colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"}, {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"}, ] [[package]] name = "dill" version = "0.3.6" description = "serialize all of python" optional = false python-versions = ">=3.7" files = [ {file = "dill-0.3.6-py3-none-any.whl", hash = "sha256:a07ffd2351b8c678dfc4a856a3005f8067aea51d6ba6c700796a4d9e280f39f0"}, {file = "dill-0.3.6.tar.gz", hash = "sha256:e5db55f3687856d8fbdab002ed78544e1c4559a130302693d839dfe8f93f2373"}, ] [package.extras] graph = ["objgraph (>=1.7.2)"] [[package]] name = "flake8" version = "5.0.4" description = "the modular source code checker: pep8 pyflakes and co" optional = false python-versions = ">=3.6.1" files = [ {file = "flake8-5.0.4-py2.py3-none-any.whl", hash = "sha256:7a1cf6b73744f5806ab95e526f6f0d8c01c66d7bbe349562d22dfca20610b248"}, {file = "flake8-5.0.4.tar.gz", hash = "sha256:6fbe320aad8d6b95cec8b8e47bc933004678dc63095be98528b7bdd2a9f510db"}, ] [package.dependencies] importlib-metadata = {version = ">=1.1.0,<4.3", markers = "python_version < \"3.8\""} mccabe = ">=0.7.0,<0.8.0" pycodestyle = ">=2.9.0,<2.10.0" pyflakes = ">=2.5.0,<2.6.0" [[package]] name = "flake8-docstrings" version = "1.7.0" description = "Extension for flake8 which uses pydocstyle to check docstrings" optional = false python-versions = ">=3.7" files = [ {file = "flake8_docstrings-1.7.0-py2.py3-none-any.whl", hash = "sha256:51f2344026da083fc084166a9353f5082b01f72901df422f74b4d953ae88ac75"}, {file = "flake8_docstrings-1.7.0.tar.gz", hash = "sha256:4c8cc748dc16e6869728699e5d0d685da9a10b0ea718e090b1ba088e67a941af"}, ] [package.dependencies] flake8 = ">=3" pydocstyle = ">=2.1" [[package]] name = "flake8-quotes" version = "3.3.2" description = "Flake8 lint for quotes." optional = false python-versions = "*" files = [ {file = "flake8-quotes-3.3.2.tar.gz", hash = "sha256:6e26892b632dacba517bf27219c459a8396dcfac0f5e8204904c5a4ba9b480e1"}, ] [package.dependencies] flake8 = "*" [[package]] name = "idna" version = "3.4" description = "Internationalized Domain Names in Applications (IDNA)" optional = false python-versions = ">=3.5" files = [ {file = "idna-3.4-py3-none-any.whl", hash = "sha256:90b77e79eaa3eba6de819a0c442c0b4ceefc341a7a2ab77d7562bf49f425c5c2"}, {file = "idna-3.4.tar.gz", hash = "sha256:814f528e8dead7d329833b91c5faa87d60bf71824cd12a7530b5526063d02cb4"}, ] [[package]] name = "ifaddr" version = "0.2.0" description = "Cross-platform network interface and IP address enumeration library" optional = false python-versions = "*" files = [ {file = "ifaddr-0.2.0-py3-none-any.whl", hash = "sha256:085e0305cfe6f16ab12d72e2024030f5d52674afad6911bb1eee207177b8a748"}, {file = "ifaddr-0.2.0.tar.gz", hash = "sha256:cc0cbfcaabf765d44595825fb96a99bb12c79716b73b44330ea38ee2b0c4aed4"}, ] [[package]] name = "importlib-metadata" version = "4.2.0" description = "Read metadata from Python packages" optional = false python-versions = ">=3.6" files = [ {file = "importlib_metadata-4.2.0-py3-none-any.whl", hash = "sha256:057e92c15bc8d9e8109738a48db0ccb31b4d9d5cfbee5a8670879a30be66304b"}, {file = "importlib_metadata-4.2.0.tar.gz", hash = "sha256:b7e52a1f8dec14a75ea73e0891f3060099ca1d8e6a462a4dff11c3e119ea1b31"}, ] [package.dependencies] typing-extensions = {version = ">=3.6.4", markers = "python_version < \"3.8\""} zipp = ">=0.5" [package.extras] docs = ["jaraco.packaging (>=8.2)", "rst.linker (>=1.9)", "sphinx"] testing = ["flufl.flake8", "importlib-resources (>=1.3)", "packaging", "pep517", "pyfakefs", "pytest (>=4.6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.0.1)", "pytest-flake8", "pytest-mypy"] [[package]] name = "isort" version = "5.11.5" description = "A Python utility / library to sort Python imports." optional = false python-versions = ">=3.7.0" files = [ {file = "isort-5.11.5-py3-none-any.whl", hash = "sha256:ba1d72fb2595a01c7895a5128f9585a5cc4b6d395f1c8d514989b9a7eb2a8746"}, {file = "isort-5.11.5.tar.gz", hash = "sha256:6be1f76a507cb2ecf16c7cf14a37e41609ca082330be4e3436a18ef74add55db"}, ] [package.extras] colors = ["colorama (>=0.4.3,<0.5.0)"] pipfile-deprecated-finder = ["pip-shims (>=0.5.2)", "pipreqs", "requirementslib"] plugins = ["setuptools"] requirements-deprecated-finder = ["pip-api", "pipreqs"] [[package]] name = "lazy-object-proxy" version = "1.9.0" description = "A fast and thorough lazy object proxy." optional = false python-versions = ">=3.7" files = [ {file = "lazy-object-proxy-1.9.0.tar.gz", hash = "sha256:659fb5809fa4629b8a1ac5106f669cfc7bef26fbb389dda53b3e010d1ac4ebae"}, {file = "lazy_object_proxy-1.9.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:b40387277b0ed2d0602b8293b94d7257e17d1479e257b4de114ea11a8cb7f2d7"}, {file = "lazy_object_proxy-1.9.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e8c6cfb338b133fbdbc5cfaa10fe3c6aeea827db80c978dbd13bc9dd8526b7d4"}, {file = "lazy_object_proxy-1.9.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:721532711daa7db0d8b779b0bb0318fa87af1c10d7fe5e52ef30f8eff254d0cd"}, {file = "lazy_object_proxy-1.9.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:66a3de4a3ec06cd8af3f61b8e1ec67614fbb7c995d02fa224813cb7afefee701"}, {file = "lazy_object_proxy-1.9.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:1aa3de4088c89a1b69f8ec0dcc169aa725b0ff017899ac568fe44ddc1396df46"}, {file = "lazy_object_proxy-1.9.0-cp310-cp310-win32.whl", hash = "sha256:f0705c376533ed2a9e5e97aacdbfe04cecd71e0aa84c7c0595d02ef93b6e4455"}, {file = "lazy_object_proxy-1.9.0-cp310-cp310-win_amd64.whl", hash = "sha256:ea806fd4c37bf7e7ad82537b0757999264d5f70c45468447bb2b91afdbe73a6e"}, {file = "lazy_object_proxy-1.9.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:946d27deaff6cf8452ed0dba83ba38839a87f4f7a9732e8f9fd4107b21e6ff07"}, {file = "lazy_object_proxy-1.9.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:79a31b086e7e68b24b99b23d57723ef7e2c6d81ed21007b6281ebcd1688acb0a"}, {file = "lazy_object_proxy-1.9.0-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f699ac1c768270c9e384e4cbd268d6e67aebcfae6cd623b4d7c3bfde5a35db59"}, {file = "lazy_object_proxy-1.9.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:bfb38f9ffb53b942f2b5954e0f610f1e721ccebe9cce9025a38c8ccf4a5183a4"}, {file = "lazy_object_proxy-1.9.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:189bbd5d41ae7a498397287c408617fe5c48633e7755287b21d741f7db2706a9"}, {file = "lazy_object_proxy-1.9.0-cp311-cp311-win32.whl", hash = "sha256:81fc4d08b062b535d95c9ea70dbe8a335c45c04029878e62d744bdced5141586"}, {file = "lazy_object_proxy-1.9.0-cp311-cp311-win_amd64.whl", hash = "sha256:f2457189d8257dd41ae9b434ba33298aec198e30adf2dcdaaa3a28b9994f6adb"}, {file = "lazy_object_proxy-1.9.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:d9e25ef10a39e8afe59a5c348a4dbf29b4868ab76269f81ce1674494e2565a6e"}, {file = "lazy_object_proxy-1.9.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cbf9b082426036e19c6924a9ce90c740a9861e2bdc27a4834fd0a910742ac1e8"}, {file = "lazy_object_proxy-1.9.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9f5fa4a61ce2438267163891961cfd5e32ec97a2c444e5b842d574251ade27d2"}, {file = "lazy_object_proxy-1.9.0-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:8fa02eaab317b1e9e03f69aab1f91e120e7899b392c4fc19807a8278a07a97e8"}, {file = "lazy_object_proxy-1.9.0-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:e7c21c95cae3c05c14aafffe2865bbd5e377cfc1348c4f7751d9dc9a48ca4bda"}, {file = "lazy_object_proxy-1.9.0-cp37-cp37m-win32.whl", hash = "sha256:f12ad7126ae0c98d601a7ee504c1122bcef553d1d5e0c3bfa77b16b3968d2734"}, {file = "lazy_object_proxy-1.9.0-cp37-cp37m-win_amd64.whl", hash = "sha256:edd20c5a55acb67c7ed471fa2b5fb66cb17f61430b7a6b9c3b4a1e40293b1671"}, {file = "lazy_object_proxy-1.9.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:2d0daa332786cf3bb49e10dc6a17a52f6a8f9601b4cf5c295a4f85854d61de63"}, {file = "lazy_object_proxy-1.9.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9cd077f3d04a58e83d04b20e334f678c2b0ff9879b9375ed107d5d07ff160171"}, {file = "lazy_object_proxy-1.9.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:660c94ea760b3ce47d1855a30984c78327500493d396eac4dfd8bd82041b22be"}, {file = "lazy_object_proxy-1.9.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:212774e4dfa851e74d393a2370871e174d7ff0ebc980907723bb67d25c8a7c30"}, {file = "lazy_object_proxy-1.9.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:f0117049dd1d5635bbff65444496c90e0baa48ea405125c088e93d9cf4525b11"}, {file = "lazy_object_proxy-1.9.0-cp38-cp38-win32.whl", hash = "sha256:0a891e4e41b54fd5b8313b96399f8b0e173bbbfc03c7631f01efbe29bb0bcf82"}, {file = "lazy_object_proxy-1.9.0-cp38-cp38-win_amd64.whl", hash = "sha256:9990d8e71b9f6488e91ad25f322898c136b008d87bf852ff65391b004da5e17b"}, {file = "lazy_object_proxy-1.9.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:9e7551208b2aded9c1447453ee366f1c4070602b3d932ace044715d89666899b"}, {file = "lazy_object_proxy-1.9.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5f83ac4d83ef0ab017683d715ed356e30dd48a93746309c8f3517e1287523ef4"}, {file = "lazy_object_proxy-1.9.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7322c3d6f1766d4ef1e51a465f47955f1e8123caee67dd641e67d539a534d006"}, {file = "lazy_object_proxy-1.9.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:18b78ec83edbbeb69efdc0e9c1cb41a3b1b1ed11ddd8ded602464c3fc6020494"}, {file = "lazy_object_proxy-1.9.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:09763491ce220c0299688940f8dc2c5d05fd1f45af1e42e636b2e8b2303e4382"}, {file = "lazy_object_proxy-1.9.0-cp39-cp39-win32.whl", hash = "sha256:9090d8e53235aa280fc9239a86ae3ea8ac58eff66a705fa6aa2ec4968b95c821"}, {file = "lazy_object_proxy-1.9.0-cp39-cp39-win_amd64.whl", hash = "sha256:db1c1722726f47e10e0b5fdbf15ac3b8adb58c091d12b3ab713965795036985f"}, ] [[package]] name = "mccabe" version = "0.7.0" description = "McCabe checker, plugin for flake8" optional = false python-versions = ">=3.6" files = [ {file = "mccabe-0.7.0-py2.py3-none-any.whl", hash = "sha256:6c2d30ab6be0e4a46919781807b4f0d834ebdd6c6e3dca0bda5a15f863427b6e"}, {file = "mccabe-0.7.0.tar.gz", hash = "sha256:348e0240c33b60bbdf4e523192ef919f28cb2c3d7d5c7794f74009290f236325"}, ] [[package]] name = "more-itertools" version = "9.1.0" description = "More routines for operating on iterables, beyond itertools" optional = false python-versions = ">=3.7" files = [ {file = "more-itertools-9.1.0.tar.gz", hash = "sha256:cabaa341ad0389ea83c17a94566a53ae4c9d07349861ecb14dc6d0345cf9ac5d"}, {file = "more_itertools-9.1.0-py3-none-any.whl", hash = "sha256:d2bc7f02446e86a68911e58ded76d6561eea00cddfb2a91e7019bbb586c799f3"}, ] [[package]] name = "mypy" version = "1.0.1" description = "Optional static typing for Python" optional = false python-versions = ">=3.7" files = [ {file = "mypy-1.0.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:71a808334d3f41ef011faa5a5cd8153606df5fc0b56de5b2e89566c8093a0c9a"}, {file = "mypy-1.0.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:920169f0184215eef19294fa86ea49ffd4635dedfdea2b57e45cb4ee85d5ccaf"}, {file = "mypy-1.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:27a0f74a298769d9fdc8498fcb4f2beb86f0564bcdb1a37b58cbbe78e55cf8c0"}, {file = "mypy-1.0.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:65b122a993d9c81ea0bfde7689b3365318a88bde952e4dfa1b3a8b4ac05d168b"}, {file = "mypy-1.0.1-cp310-cp310-win_amd64.whl", hash = "sha256:5deb252fd42a77add936b463033a59b8e48eb2eaec2976d76b6878d031933fe4"}, {file = "mypy-1.0.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:2013226d17f20468f34feddd6aae4635a55f79626549099354ce641bc7d40262"}, {file = "mypy-1.0.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:48525aec92b47baed9b3380371ab8ab6e63a5aab317347dfe9e55e02aaad22e8"}, {file = "mypy-1.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c96b8a0c019fe29040d520d9257d8c8f122a7343a8307bf8d6d4a43f5c5bfcc8"}, {file = "mypy-1.0.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:448de661536d270ce04f2d7dddaa49b2fdba6e3bd8a83212164d4174ff43aa65"}, {file = "mypy-1.0.1-cp311-cp311-win_amd64.whl", hash = "sha256:d42a98e76070a365a1d1c220fcac8aa4ada12ae0db679cb4d910fabefc88b994"}, {file = "mypy-1.0.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:e64f48c6176e243ad015e995de05af7f22bbe370dbb5b32bd6988438ec873919"}, {file = "mypy-1.0.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5fdd63e4f50e3538617887e9aee91855368d9fc1dea30da743837b0df7373bc4"}, {file = "mypy-1.0.1-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:dbeb24514c4acbc78d205f85dd0e800f34062efcc1f4a4857c57e4b4b8712bff"}, {file = "mypy-1.0.1-cp37-cp37m-win_amd64.whl", hash = "sha256:a2948c40a7dd46c1c33765718936669dc1f628f134013b02ff5ac6c7ef6942bf"}, {file = "mypy-1.0.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:5bc8d6bd3b274dd3846597855d96d38d947aedba18776aa998a8d46fabdaed76"}, {file = "mypy-1.0.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:17455cda53eeee0a4adb6371a21dd3dbf465897de82843751cf822605d152c8c"}, {file = "mypy-1.0.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e831662208055b006eef68392a768ff83596035ffd6d846786578ba1714ba8f6"}, {file = "mypy-1.0.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:e60d0b09f62ae97a94605c3f73fd952395286cf3e3b9e7b97f60b01ddfbbda88"}, {file = "mypy-1.0.1-cp38-cp38-win_amd64.whl", hash = "sha256:0af4f0e20706aadf4e6f8f8dc5ab739089146b83fd53cb4a7e0e850ef3de0bb6"}, {file = "mypy-1.0.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:24189f23dc66f83b839bd1cce2dfc356020dfc9a8bae03978477b15be61b062e"}, {file = "mypy-1.0.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:93a85495fb13dc484251b4c1fd7a5ac370cd0d812bbfc3b39c1bafefe95275d5"}, {file = "mypy-1.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5f546ac34093c6ce33f6278f7c88f0f147a4849386d3bf3ae193702f4fe31407"}, {file = "mypy-1.0.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:c6c2ccb7af7154673c591189c3687b013122c5a891bb5651eca3db8e6c6c55bd"}, {file = "mypy-1.0.1-cp39-cp39-win_amd64.whl", hash = "sha256:15b5a824b58c7c822c51bc66308e759243c32631896743f030daf449fe3677f3"}, {file = "mypy-1.0.1-py3-none-any.whl", hash = "sha256:eda5c8b9949ed411ff752b9a01adda31afe7eae1e53e946dbdf9db23865e66c4"}, {file = "mypy-1.0.1.tar.gz", hash = "sha256:28cea5a6392bb43d266782983b5a4216c25544cd7d80be681a155ddcdafd152d"}, ] [package.dependencies] mypy-extensions = ">=0.4.3" tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""} typed-ast = {version = ">=1.4.0,<2", markers = "python_version < \"3.8\""} typing-extensions = ">=3.10" [package.extras] dmypy = ["psutil (>=4.0)"] install-types = ["pip"] python2 = ["typed-ast (>=1.4.0,<2)"] reports = ["lxml"] [[package]] name = "mypy-extensions" version = "1.0.0" description = "Type system extensions for programs checked with the mypy type checker." optional = false python-versions = ">=3.5" files = [ {file = "mypy_extensions-1.0.0-py3-none-any.whl", hash = "sha256:4392f6c0eb8a5668a69e23d168ffa70f0be9ccfd32b5cc2d26a34ae5b844552d"}, {file = "mypy_extensions-1.0.0.tar.gz", hash = "sha256:75dbf8955dc00442a438fc4d0666508a9a97b6bd41aa2f0ffe9d2f2725af0782"}, ] [[package]] name = "packaging" version = "23.0" description = "Core utilities for Python packages" optional = false python-versions = ">=3.7" files = [ {file = "packaging-23.0-py3-none-any.whl", hash = "sha256:714ac14496c3e68c99c29b00845f7a2b85f3bb6f1078fd9f72fd20f0570002b2"}, {file = "packaging-23.0.tar.gz", hash = "sha256:b6ad297f8907de0fa2fe1ccbd26fdaf387f5f47c7275fedf8cce89f99446cf97"}, ] [[package]] name = "pathspec" version = "0.11.0" description = "Utility library for gitignore style pattern matching of file paths." optional = false python-versions = ">=3.7" files = [ {file = "pathspec-0.11.0-py3-none-any.whl", hash = "sha256:3a66eb970cbac598f9e5ccb5b2cf58930cd8e3ed86d393d541eaf2d8b1705229"}, {file = "pathspec-0.11.0.tar.gz", hash = "sha256:64d338d4e0914e91c1792321e6907b5a593f1ab1851de7fc269557a21b30ebbc"}, ] [[package]] name = "platformdirs" version = "3.0.0" description = "A small Python package for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." optional = false python-versions = ">=3.7" files = [ {file = "platformdirs-3.0.0-py3-none-any.whl", hash = "sha256:b1d5eb14f221506f50d6604a561f4c5786d9e80355219694a1b244bcd96f4567"}, {file = "platformdirs-3.0.0.tar.gz", hash = "sha256:8a1228abb1ef82d788f74139988b137e78692984ec7b08eaa6c65f1723af28f9"}, ] [package.dependencies] typing-extensions = {version = ">=4.4", markers = "python_version < \"3.8\""} [package.extras] docs = ["furo (>=2022.12.7)", "proselint (>=0.13)", "sphinx (>=6.1.3)", "sphinx-autodoc-typehints (>=1.22,!=1.23.4)"] test = ["appdirs (==1.4.4)", "covdefaults (>=2.2.2)", "pytest (>=7.2.1)", "pytest-cov (>=4)", "pytest-mock (>=3.10)"] [[package]] name = "pluggy" version = "0.13.1" description = "plugin and hook calling mechanisms for python" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" files = [ {file = "pluggy-0.13.1-py2.py3-none-any.whl", hash = "sha256:966c145cd83c96502c3c3868f50408687b38434af77734af1e9ca461a4081d2d"}, {file = "pluggy-0.13.1.tar.gz", hash = "sha256:15b2acde666561e1298d71b523007ed7364de07029219b604cf808bfa1c765b0"}, ] [package.dependencies] importlib-metadata = {version = ">=0.12", markers = "python_version < \"3.8\""} [package.extras] dev = ["pre-commit", "tox"] [[package]] name = "py" version = "1.11.0" description = "library with cross-python path, ini-parsing, io, code, log facilities" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" files = [ {file = "py-1.11.0-py2.py3-none-any.whl", hash = "sha256:607c53218732647dff4acdfcd50cb62615cedf612e72d1724fb1a0cc6405b378"}, {file = "py-1.11.0.tar.gz", hash = "sha256:51c75c4126074b472f746a24399ad32f6053d1b34b68d2fa41e558e6f4a98719"}, ] [[package]] name = "pycodestyle" version = "2.9.1" description = "Python style guide checker" optional = false python-versions = ">=3.6" files = [ {file = "pycodestyle-2.9.1-py2.py3-none-any.whl", hash = "sha256:d1735fc58b418fd7c5f658d28d943854f8a849b01a5d0a1e6f3f3fdd0166804b"}, {file = "pycodestyle-2.9.1.tar.gz", hash = "sha256:2c9607871d58c76354b697b42f5d57e1ada7d261c261efac224b664affdc5785"}, ] [[package]] name = "pydocstyle" version = "3.0.0" description = "Python docstring style checker" optional = false python-versions = "*" files = [ {file = "pydocstyle-3.0.0-py2-none-any.whl", hash = "sha256:2258f9b0df68b97bf3a6c29003edc5238ff8879f1efb6f1999988d934e432bd8"}, {file = "pydocstyle-3.0.0-py3-none-any.whl", hash = "sha256:ed79d4ec5e92655eccc21eb0c6cf512e69512b4a97d215ace46d17e4990f2039"}, {file = "pydocstyle-3.0.0.tar.gz", hash = "sha256:5741c85e408f9e0ddf873611085e819b809fca90b619f5fd7f34bd4959da3dd4"}, ] [package.dependencies] six = "*" snowballstemmer = "*" [[package]] name = "pyflakes" version = "2.5.0" description = "passive checker of Python programs" optional = false python-versions = ">=3.6" files = [ {file = "pyflakes-2.5.0-py2.py3-none-any.whl", hash = "sha256:4579f67d887f804e67edb544428f264b7b24f435b263c4614f384135cea553d2"}, {file = "pyflakes-2.5.0.tar.gz", hash = "sha256:491feb020dca48ccc562a8c0cbe8df07ee13078df59813b83959cbdada312ea3"}, ] [[package]] name = "pylint" version = "2.16.2" description = "python code static checker" optional = false python-versions = ">=3.7.2" files = [ {file = "pylint-2.16.2-py3-none-any.whl", hash = "sha256:ff22dde9c2128cd257c145cfd51adeff0be7df4d80d669055f24a962b351bbe4"}, {file = "pylint-2.16.2.tar.gz", hash = "sha256:13b2c805a404a9bf57d002cd5f054ca4d40b0b87542bdaba5e05321ae8262c84"}, ] [package.dependencies] astroid = ">=2.14.2,<=2.16.0-dev0" colorama = {version = ">=0.4.5", markers = "sys_platform == \"win32\""} dill = [ {version = ">=0.2", markers = "python_version < \"3.11\""}, {version = ">=0.3.6", markers = "python_version >= \"3.11\""}, ] 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" typing-extensions = {version = ">=3.10.0", markers = "python_version < \"3.10\""} [package.extras] spelling = ["pyenchant (>=3.2,<4.0)"] testutils = ["gitpython (>3)"] [[package]] name = "pytest" version = "5.2.1" description = "pytest: simple powerful testing with Python" optional = false python-versions = ">=3.5" files = [ {file = "pytest-5.2.1-py3-none-any.whl", hash = "sha256:7e4800063ccfc306a53c461442526c5571e1462f61583506ce97e4da6a1d88c8"}, {file = "pytest-5.2.1.tar.gz", hash = "sha256:ca563435f4941d0cb34767301c27bc65c510cb82e90b9ecf9cb52dc2c63caaa0"}, ] [package.dependencies] atomicwrites = ">=1.0" attrs = ">=17.4.0" colorama = {version = "*", markers = "sys_platform == \"win32\""} importlib-metadata = {version = ">=0.12", markers = "python_version < \"3.8\""} more-itertools = ">=4.0.0" packaging = "*" pluggy = ">=0.12,<1.0" py = ">=1.5.0" wcwidth = "*" [package.extras] testing = ["argcomplete", "hypothesis (>=3.56)", "mock", "nose", "requests", "xmlschema"] [[package]] name = "requests" version = "2.31.0" description = "Python HTTP for Humans." optional = false python-versions = ">=3.7" files = [ {file = "requests-2.31.0-py3-none-any.whl", hash = "sha256:58cd2187c01e70e6e26505bca751777aa9f2ee0b7f4300988b709f44e013003f"}, {file = "requests-2.31.0.tar.gz", hash = "sha256:942c5a758f98d790eaed1a29cb6eefc7ffb0d1cf7af05c3d2791656dbd6ad1e1"}, ] [package.dependencies] certifi = ">=2017.4.17" charset-normalizer = ">=2,<4" idna = ">=2.5,<4" urllib3 = ">=1.21.1,<3" [package.extras] socks = ["PySocks (>=1.5.6,!=1.5.7)"] use-chardet-on-py3 = ["chardet (>=3.0.2,<6)"] [[package]] name = "six" version = "1.16.0" description = "Python 2 and 3 compatibility utilities" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" files = [ {file = "six-1.16.0-py2.py3-none-any.whl", hash = "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"}, {file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"}, ] [[package]] name = "snowballstemmer" version = "2.2.0" description = "This package provides 29 stemmers for 28 languages generated from Snowball algorithms." optional = false python-versions = "*" files = [ {file = "snowballstemmer-2.2.0-py2.py3-none-any.whl", hash = "sha256:c8e1716e83cc398ae16824e5572ae04e0d9fc2c6b985fb0f900f5f0c96ecba1a"}, {file = "snowballstemmer-2.2.0.tar.gz", hash = "sha256:09b16deb8547d3412ad7b590689584cd0fe25ec8db3be37788be3810cbf19cb1"}, ] [[package]] name = "tomli" version = "2.0.1" description = "A lil' TOML parser" optional = false python-versions = ">=3.7" files = [ {file = "tomli-2.0.1-py3-none-any.whl", hash = "sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc"}, {file = "tomli-2.0.1.tar.gz", hash = "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"}, ] [[package]] name = "tomlkit" version = "0.11.6" description = "Style preserving TOML library" optional = false python-versions = ">=3.6" files = [ {file = "tomlkit-0.11.6-py3-none-any.whl", hash = "sha256:07de26b0d8cfc18f871aec595fda24d95b08fef89d147caa861939f37230bf4b"}, {file = "tomlkit-0.11.6.tar.gz", hash = "sha256:71b952e5721688937fb02cf9d354dbcf0785066149d2855e44531ebdd2b65d73"}, ] [[package]] name = "typed-ast" version = "1.5.4" description = "a fork of Python 2 and 3 ast modules with type comment support" optional = false python-versions = ">=3.6" files = [ {file = "typed_ast-1.5.4-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:669dd0c4167f6f2cd9f57041e03c3c2ebf9063d0757dc89f79ba1daa2bfca9d4"}, {file = "typed_ast-1.5.4-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:211260621ab1cd7324e0798d6be953d00b74e0428382991adfddb352252f1d62"}, {file = "typed_ast-1.5.4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:267e3f78697a6c00c689c03db4876dd1efdfea2f251a5ad6555e82a26847b4ac"}, {file = "typed_ast-1.5.4-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:c542eeda69212fa10a7ada75e668876fdec5f856cd3d06829e6aa64ad17c8dfe"}, {file = "typed_ast-1.5.4-cp310-cp310-win_amd64.whl", hash = "sha256:a9916d2bb8865f973824fb47436fa45e1ebf2efd920f2b9f99342cb7fab93f72"}, {file = "typed_ast-1.5.4-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:79b1e0869db7c830ba6a981d58711c88b6677506e648496b1f64ac7d15633aec"}, {file = "typed_ast-1.5.4-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a94d55d142c9265f4ea46fab70977a1944ecae359ae867397757d836ea5a3f47"}, {file = "typed_ast-1.5.4-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:183afdf0ec5b1b211724dfef3d2cad2d767cbefac291f24d69b00546c1837fb6"}, {file = "typed_ast-1.5.4-cp36-cp36m-win_amd64.whl", hash = "sha256:639c5f0b21776605dd6c9dbe592d5228f021404dafd377e2b7ac046b0349b1a1"}, {file = "typed_ast-1.5.4-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:cf4afcfac006ece570e32d6fa90ab74a17245b83dfd6655a6f68568098345ff6"}, {file = "typed_ast-1.5.4-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ed855bbe3eb3715fca349c80174cfcfd699c2f9de574d40527b8429acae23a66"}, {file = "typed_ast-1.5.4-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:6778e1b2f81dfc7bc58e4b259363b83d2e509a65198e85d5700dfae4c6c8ff1c"}, {file = "typed_ast-1.5.4-cp37-cp37m-win_amd64.whl", hash = "sha256:0261195c2062caf107831e92a76764c81227dae162c4f75192c0d489faf751a2"}, {file = "typed_ast-1.5.4-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:2efae9db7a8c05ad5547d522e7dbe62c83d838d3906a3716d1478b6c1d61388d"}, {file = "typed_ast-1.5.4-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:7d5d014b7daa8b0bf2eaef684295acae12b036d79f54178b92a2b6a56f92278f"}, {file = "typed_ast-1.5.4-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:370788a63915e82fd6f212865a596a0fefcbb7d408bbbb13dea723d971ed8bdc"}, {file = "typed_ast-1.5.4-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:4e964b4ff86550a7a7d56345c7864b18f403f5bd7380edf44a3c1fb4ee7ac6c6"}, {file = "typed_ast-1.5.4-cp38-cp38-win_amd64.whl", hash = "sha256:683407d92dc953c8a7347119596f0b0e6c55eb98ebebd9b23437501b28dcbb8e"}, {file = "typed_ast-1.5.4-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:4879da6c9b73443f97e731b617184a596ac1235fe91f98d279a7af36c796da35"}, {file = "typed_ast-1.5.4-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:3e123d878ba170397916557d31c8f589951e353cc95fb7f24f6bb69adc1a8a97"}, {file = "typed_ast-1.5.4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ebd9d7f80ccf7a82ac5f88c521115cc55d84e35bf8b446fcd7836eb6b98929a3"}, {file = "typed_ast-1.5.4-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:98f80dee3c03455e92796b58b98ff6ca0b2a6f652120c263efdba4d6c5e58f72"}, {file = "typed_ast-1.5.4-cp39-cp39-win_amd64.whl", hash = "sha256:0fdbcf2fef0ca421a3f5912555804296f0b0960f0418c440f5d6d3abb549f3e1"}, {file = "typed_ast-1.5.4.tar.gz", hash = "sha256:39e21ceb7388e4bb37f4c679d72707ed46c2fbf2a5609b8b8ebc4b067d977df2"}, ] [[package]] name = "typing-extensions" version = "4.5.0" description = "Backported and Experimental Type Hints for Python 3.7+" optional = false python-versions = ">=3.7" files = [ {file = "typing_extensions-4.5.0-py3-none-any.whl", hash = "sha256:fb33085c39dd998ac16d1431ebc293a8b3eedd00fd4a32de0ff79002c19511b4"}, {file = "typing_extensions-4.5.0.tar.gz", hash = "sha256:5cb5f4a79139d699607b3ef622a1dedafa84e115ab0024e0d9c044a9479ca7cb"}, ] [[package]] name = "urllib3" version = "1.26.14" description = "HTTP library with thread-safe connection pooling, file post, and more." optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*" files = [ {file = "urllib3-1.26.14-py2.py3-none-any.whl", hash = "sha256:75edcdc2f7d85b137124a6c3c9fc3933cdeaa12ecb9a6a959f22797a0feca7e1"}, {file = "urllib3-1.26.14.tar.gz", hash = "sha256:076907bf8fd355cde77728471316625a4d2f7e713c125f51953bb5b3eecf4f72"}, ] [package.extras] brotli = ["brotli (>=1.0.9)", "brotlicffi (>=0.8.0)", "brotlipy (>=0.6.0)"] secure = ["certifi", "cryptography (>=1.3.4)", "idna (>=2.0.0)", "ipaddress", "pyOpenSSL (>=0.14)", "urllib3-secure-extra"] socks = ["PySocks (>=1.5.6,!=1.5.7,<2.0)"] [[package]] name = "wcwidth" version = "0.2.6" description = "Measures the displayed width of unicode strings in a terminal" optional = false python-versions = "*" files = [ {file = "wcwidth-0.2.6-py2.py3-none-any.whl", hash = "sha256:795b138f6875577cd91bba52baf9e445cd5118fd32723b460e30a0af30ea230e"}, {file = "wcwidth-0.2.6.tar.gz", hash = "sha256:a5220780a404dbe3353789870978e472cfe477761f06ee55077256e509b156d0"}, ] [[package]] name = "websocket-client" version = "1.5.1" description = "WebSocket client for Python with low level API options" optional = false python-versions = ">=3.7" files = [ {file = "websocket-client-1.5.1.tar.gz", hash = "sha256:3f09e6d8230892547132177f575a4e3e73cfdf06526e20cc02aa1c3b47184d40"}, {file = "websocket_client-1.5.1-py3-none-any.whl", hash = "sha256:cdf5877568b7e83aa7cf2244ab56a3213de587bbe0ce9d8b9600fc77b455d89e"}, ] [package.extras] docs = ["Sphinx (>=3.4)", "sphinx-rtd-theme (>=0.5)"] optional = ["python-socks", "wsaccel"] test = ["websockets"] [[package]] name = "wrapt" version = "1.15.0" description = "Module for decorators, wrappers and monkey patching." optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7" files = [ {file = "wrapt-1.15.0-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:ca1cccf838cd28d5a0883b342474c630ac48cac5df0ee6eacc9c7290f76b11c1"}, {file = "wrapt-1.15.0-cp27-cp27m-manylinux1_i686.whl", hash = "sha256:e826aadda3cae59295b95343db8f3d965fb31059da7de01ee8d1c40a60398b29"}, {file = "wrapt-1.15.0-cp27-cp27m-manylinux1_x86_64.whl", hash = "sha256:5fc8e02f5984a55d2c653f5fea93531e9836abbd84342c1d1e17abc4a15084c2"}, {file = "wrapt-1.15.0-cp27-cp27m-manylinux2010_i686.whl", hash = "sha256:96e25c8603a155559231c19c0349245eeb4ac0096fe3c1d0be5c47e075bd4f46"}, {file = "wrapt-1.15.0-cp27-cp27m-manylinux2010_x86_64.whl", hash = "sha256:40737a081d7497efea35ab9304b829b857f21558acfc7b3272f908d33b0d9d4c"}, {file = "wrapt-1.15.0-cp27-cp27mu-manylinux1_i686.whl", hash = "sha256:f87ec75864c37c4c6cb908d282e1969e79763e0d9becdfe9fe5473b7bb1e5f09"}, {file = "wrapt-1.15.0-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:1286eb30261894e4c70d124d44b7fd07825340869945c79d05bda53a40caa079"}, {file = "wrapt-1.15.0-cp27-cp27mu-manylinux2010_i686.whl", hash = "sha256:493d389a2b63c88ad56cdc35d0fa5752daac56ca755805b1b0c530f785767d5e"}, {file = "wrapt-1.15.0-cp27-cp27mu-manylinux2010_x86_64.whl", hash = "sha256:58d7a75d731e8c63614222bcb21dd992b4ab01a399f1f09dd82af17bbfc2368a"}, {file = "wrapt-1.15.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:21f6d9a0d5b3a207cdf7acf8e58d7d13d463e639f0c7e01d82cdb671e6cb7923"}, {file = "wrapt-1.15.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:ce42618f67741d4697684e501ef02f29e758a123aa2d669e2d964ff734ee00ee"}, {file = "wrapt-1.15.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:41d07d029dd4157ae27beab04d22b8e261eddfc6ecd64ff7000b10dc8b3a5727"}, {file = "wrapt-1.15.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:54accd4b8bc202966bafafd16e69da9d5640ff92389d33d28555c5fd4f25ccb7"}, {file = "wrapt-1.15.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2fbfbca668dd15b744418265a9607baa970c347eefd0db6a518aaf0cfbd153c0"}, {file = "wrapt-1.15.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:76e9c727a874b4856d11a32fb0b389afc61ce8aaf281ada613713ddeadd1cfec"}, {file = "wrapt-1.15.0-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:e20076a211cd6f9b44a6be58f7eeafa7ab5720eb796975d0c03f05b47d89eb90"}, {file = "wrapt-1.15.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:a74d56552ddbde46c246b5b89199cb3fd182f9c346c784e1a93e4dc3f5ec9975"}, {file = "wrapt-1.15.0-cp310-cp310-win32.whl", hash = "sha256:26458da5653aa5b3d8dc8b24192f574a58984c749401f98fff994d41d3f08da1"}, {file = "wrapt-1.15.0-cp310-cp310-win_amd64.whl", hash = "sha256:75760a47c06b5974aa5e01949bf7e66d2af4d08cb8c1d6516af5e39595397f5e"}, {file = "wrapt-1.15.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:ba1711cda2d30634a7e452fc79eabcadaffedf241ff206db2ee93dd2c89a60e7"}, {file = "wrapt-1.15.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:56374914b132c702aa9aa9959c550004b8847148f95e1b824772d453ac204a72"}, {file = "wrapt-1.15.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a89ce3fd220ff144bd9d54da333ec0de0399b52c9ac3d2ce34b569cf1a5748fb"}, {file = "wrapt-1.15.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3bbe623731d03b186b3d6b0d6f51865bf598587c38d6f7b0be2e27414f7f214e"}, {file = "wrapt-1.15.0-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3abbe948c3cbde2689370a262a8d04e32ec2dd4f27103669a45c6929bcdbfe7c"}, {file = "wrapt-1.15.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:b67b819628e3b748fd3c2192c15fb951f549d0f47c0449af0764d7647302fda3"}, {file = "wrapt-1.15.0-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:7eebcdbe3677e58dd4c0e03b4f2cfa346ed4049687d839adad68cc38bb559c92"}, {file = "wrapt-1.15.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:74934ebd71950e3db69960a7da29204f89624dde411afbfb3b4858c1409b1e98"}, {file = "wrapt-1.15.0-cp311-cp311-win32.whl", hash = "sha256:bd84395aab8e4d36263cd1b9308cd504f6cf713b7d6d3ce25ea55670baec5416"}, {file = "wrapt-1.15.0-cp311-cp311-win_amd64.whl", hash = "sha256:a487f72a25904e2b4bbc0817ce7a8de94363bd7e79890510174da9d901c38705"}, {file = "wrapt-1.15.0-cp35-cp35m-manylinux1_i686.whl", hash = "sha256:4ff0d20f2e670800d3ed2b220d40984162089a6e2c9646fdb09b85e6f9a8fc29"}, {file = "wrapt-1.15.0-cp35-cp35m-manylinux1_x86_64.whl", hash = "sha256:9ed6aa0726b9b60911f4aed8ec5b8dd7bf3491476015819f56473ffaef8959bd"}, {file = "wrapt-1.15.0-cp35-cp35m-manylinux2010_i686.whl", hash = "sha256:896689fddba4f23ef7c718279e42f8834041a21342d95e56922e1c10c0cc7afb"}, {file = "wrapt-1.15.0-cp35-cp35m-manylinux2010_x86_64.whl", hash = "sha256:75669d77bb2c071333417617a235324a1618dba66f82a750362eccbe5b61d248"}, {file = "wrapt-1.15.0-cp35-cp35m-win32.whl", hash = "sha256:fbec11614dba0424ca72f4e8ba3c420dba07b4a7c206c8c8e4e73f2e98f4c559"}, {file = "wrapt-1.15.0-cp35-cp35m-win_amd64.whl", hash = "sha256:fd69666217b62fa5d7c6aa88e507493a34dec4fa20c5bd925e4bc12fce586639"}, {file = "wrapt-1.15.0-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:b0724f05c396b0a4c36a3226c31648385deb6a65d8992644c12a4963c70326ba"}, {file = "wrapt-1.15.0-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bbeccb1aa40ab88cd29e6c7d8585582c99548f55f9b2581dfc5ba68c59a85752"}, {file = "wrapt-1.15.0-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:38adf7198f8f154502883242f9fe7333ab05a5b02de7d83aa2d88ea621f13364"}, {file = "wrapt-1.15.0-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:578383d740457fa790fdf85e6d346fda1416a40549fe8db08e5e9bd281c6a475"}, {file = "wrapt-1.15.0-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:a4cbb9ff5795cd66f0066bdf5947f170f5d63a9274f99bdbca02fd973adcf2a8"}, {file = "wrapt-1.15.0-cp36-cp36m-musllinux_1_1_i686.whl", hash = "sha256:af5bd9ccb188f6a5fdda9f1f09d9f4c86cc8a539bd48a0bfdc97723970348418"}, {file = "wrapt-1.15.0-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:b56d5519e470d3f2fe4aa7585f0632b060d532d0696c5bdfb5e8319e1d0f69a2"}, {file = "wrapt-1.15.0-cp36-cp36m-win32.whl", hash = "sha256:77d4c1b881076c3ba173484dfa53d3582c1c8ff1f914c6461ab70c8428b796c1"}, {file = "wrapt-1.15.0-cp36-cp36m-win_amd64.whl", hash = "sha256:077ff0d1f9d9e4ce6476c1a924a3332452c1406e59d90a2cf24aeb29eeac9420"}, {file = "wrapt-1.15.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:5c5aa28df055697d7c37d2099a7bc09f559d5053c3349b1ad0c39000e611d317"}, {file = "wrapt-1.15.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3a8564f283394634a7a7054b7983e47dbf39c07712d7b177b37e03f2467a024e"}, {file = "wrapt-1.15.0-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:780c82a41dc493b62fc5884fb1d3a3b81106642c5c5c78d6a0d4cbe96d62ba7e"}, {file = "wrapt-1.15.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e169e957c33576f47e21864cf3fc9ff47c223a4ebca8960079b8bd36cb014fd0"}, {file = "wrapt-1.15.0-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:b02f21c1e2074943312d03d243ac4388319f2456576b2c6023041c4d57cd7019"}, {file = "wrapt-1.15.0-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:f2e69b3ed24544b0d3dbe2c5c0ba5153ce50dcebb576fdc4696d52aa22db6034"}, {file = "wrapt-1.15.0-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:d787272ed958a05b2c86311d3a4135d3c2aeea4fc655705f074130aa57d71653"}, {file = "wrapt-1.15.0-cp37-cp37m-win32.whl", hash = "sha256:02fce1852f755f44f95af51f69d22e45080102e9d00258053b79367d07af39c0"}, {file = "wrapt-1.15.0-cp37-cp37m-win_amd64.whl", hash = "sha256:abd52a09d03adf9c763d706df707c343293d5d106aea53483e0ec8d9e310ad5e"}, {file = "wrapt-1.15.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:cdb4f085756c96a3af04e6eca7f08b1345e94b53af8921b25c72f096e704e145"}, {file = "wrapt-1.15.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:230ae493696a371f1dbffaad3dafbb742a4d27a0afd2b1aecebe52b740167e7f"}, {file = "wrapt-1.15.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:63424c681923b9f3bfbc5e3205aafe790904053d42ddcc08542181a30a7a51bd"}, {file = "wrapt-1.15.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d6bcbfc99f55655c3d93feb7ef3800bd5bbe963a755687cbf1f490a71fb7794b"}, {file = "wrapt-1.15.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c99f4309f5145b93eca6e35ac1a988f0dc0a7ccf9ccdcd78d3c0adf57224e62f"}, {file = "wrapt-1.15.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:b130fe77361d6771ecf5a219d8e0817d61b236b7d8b37cc045172e574ed219e6"}, {file = "wrapt-1.15.0-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:96177eb5645b1c6985f5c11d03fc2dbda9ad24ec0f3a46dcce91445747e15094"}, {file = "wrapt-1.15.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:d5fe3e099cf07d0fb5a1e23d399e5d4d1ca3e6dfcbe5c8570ccff3e9208274f7"}, {file = "wrapt-1.15.0-cp38-cp38-win32.whl", hash = "sha256:abd8f36c99512755b8456047b7be10372fca271bf1467a1caa88db991e7c421b"}, {file = "wrapt-1.15.0-cp38-cp38-win_amd64.whl", hash = "sha256:b06fa97478a5f478fb05e1980980a7cdf2712015493b44d0c87606c1513ed5b1"}, {file = "wrapt-1.15.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:2e51de54d4fb8fb50d6ee8327f9828306a959ae394d3e01a1ba8b2f937747d86"}, {file = "wrapt-1.15.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:0970ddb69bba00670e58955f8019bec4a42d1785db3faa043c33d81de2bf843c"}, {file = "wrapt-1.15.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:76407ab327158c510f44ded207e2f76b657303e17cb7a572ffe2f5a8a48aa04d"}, {file = "wrapt-1.15.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:cd525e0e52a5ff16653a3fc9e3dd827981917d34996600bbc34c05d048ca35cc"}, {file = "wrapt-1.15.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9d37ac69edc5614b90516807de32d08cb8e7b12260a285ee330955604ed9dd29"}, {file = "wrapt-1.15.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:078e2a1a86544e644a68422f881c48b84fef6d18f8c7a957ffd3f2e0a74a0d4a"}, {file = "wrapt-1.15.0-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:2cf56d0e237280baed46f0b5316661da892565ff58309d4d2ed7dba763d984b8"}, {file = "wrapt-1.15.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:7dc0713bf81287a00516ef43137273b23ee414fe41a3c14be10dd95ed98a2df9"}, {file = "wrapt-1.15.0-cp39-cp39-win32.whl", hash = "sha256:46ed616d5fb42f98630ed70c3529541408166c22cdfd4540b88d5f21006b0eff"}, {file = "wrapt-1.15.0-cp39-cp39-win_amd64.whl", hash = "sha256:eef4d64c650f33347c1f9266fa5ae001440b232ad9b98f1f43dfe7a79435c0a6"}, {file = "wrapt-1.15.0-py3-none-any.whl", hash = "sha256:64b1df0f83706b4ef4cfb4fb0e4c2669100fd7ecacfb59e091fad300d4e04640"}, {file = "wrapt-1.15.0.tar.gz", hash = "sha256:d06730c6aed78cee4126234cf2d071e01b44b915e725a6cb439a879ec9754a3a"}, ] [[package]] name = "zipp" version = "3.15.0" description = "Backport of pathlib-compatible object wrapper for zip files" optional = false python-versions = ">=3.7" files = [ {file = "zipp-3.15.0-py3-none-any.whl", hash = "sha256:48904fc76a60e542af151aded95726c1a5c34ed43ab4134b597665c86d7ad556"}, {file = "zipp-3.15.0.tar.gz", hash = "sha256:112929ad649da941c23de50f356a2b5570c954b65150642bccdd66bf194d224b"}, ] [package.extras] docs = ["furo", "jaraco.packaging (>=9)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] testing = ["big-O", "flake8 (<5)", "jaraco.functools", "jaraco.itertools", "more-itertools", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-flake8", "pytest-mypy (>=0.9.1)"] [metadata] lock-version = "2.0" python-versions = "^3.7.2" content-hash = "9bec1725065c93d5e040cdf68868bc40765c5b1f2bf692692737efd54f9ea559" pavoni-pyroon-981a62b/pyproject.toml000066400000000000000000000014201453641423300176060ustar00rootroot00000000000000[tool.poetry] name = "roonapi" version = "0.1.6" description = "Provides a python interface to interact with Roon" authors = [ "Greg Dowling " ] license = "Apache-2.0" keywords = ['roon', 'api'] readme = 'README.md' repository = "https://github.com/pavoni/pyroon" homepage = "https://github.com/pavoni/pyroon" [tool.poetry.dependencies] python = "^3.7.2" ifaddr = ">=0.1.0" requests = ">=2.0" six = ">=1.10.0" websocket_client = ">=1.4.0" [tool.poetry.dev-dependencies] flake8-docstrings = ">=1.3.0" flake8 = "=5.0.4" flake8-quotes = "^3.2.0" mypy = ">=0.650" pydocstyle = "3.0.0" pylint = "==2.16.2" pytest = "==5.2.1" black = "23.1.0" [tool.black] line-length = 88 [build-system] requires = ["poetry-core"] build-backend = "poetry.core.masonry.api" pavoni-pyroon-981a62b/roonapi/000077500000000000000000000000001453641423300163445ustar00rootroot00000000000000pavoni-pyroon-981a62b/roonapi/.soodmsg000066400000000000000000000001501453641423300200140ustar00rootroot00000000000000SOODQquery_service_id$00720724-5143-4a9b-abac-0e50cba674bb_tid$c64e3888-f2f2-4c4a-9f89-2093ae4217a6pavoni-pyroon-981a62b/roonapi/__init__.py000077500000000000000000000002011453641423300204510ustar00rootroot00000000000000# flake8: noqa from .constants import LOGGER from .roonapi import RoonApi, split_media_path from .discovery import RoonDiscovery pavoni-pyroon-981a62b/roonapi/constants.py000066400000000000000000000017031453641423300207330ustar00rootroot00000000000000from __future__ import unicode_literals import logging SOOD_PORT = 9003 SOOD_MULTICAST_IP = "239.255.90.90" SERVICE_REGISTRY = "com.roonlabs.registry:1" SERVICE_TRANSPORT = "com.roonlabs.transport:2" SERVICE_STATUS = "com.roonlabs.status:1" SERVICE_PAIRING = "com.roonlabs.pairing:1" SERVICE_PING = "com.roonlabs.ping:1" SERVICE_IMAGE = "com.roonlabs.image:1" SERVICE_BROWSE = "com.roonlabs.browse:1" SERVICE_SETTINGS = "com.roonlabs.settings:1" CONTROL_VOLUME = "com.roonlabs.volumecontrol:1" CONTROL_SOURCE = "com.roonlabs.sourcecontrol:1" REGISTERED = "Registered" MESSAGE_REQUEST = "REQUEST" MESSAGE_COMPLETE = "COMPLETE" MESSAGE_CONTINUE = "CONTINUE" PAGE_SIZE = 100 LOG_FORMAT = logging.Formatter( "%(asctime)-15s %(levelname)-5s %(module)s -- %(message)s" ) LOGGER = logging.getLogger("roonapi") CONSOLE_HANDLER = logging.StreamHandler() CONSOLE_HANDLER.setFormatter(LOG_FORMAT) LOGGER.addHandler(CONSOLE_HANDLER) LOGGER.setLevel(logging.INFO) pavoni-pyroon-981a62b/roonapi/discovery.py000066400000000000000000000065001453641423300207260ustar00rootroot00000000000000""" Module defining a class to discover Roon servers. If multiple servers are available on the network, the first to be discovered is selected. This may not be the one you have enabled the plugin for. """ import os.path import socket import threading from .soodmessage import FormatException, SOODMessage from .constants import SOOD_PORT, SOOD_MULTICAST_IP, LOGGER class RoonDiscovery(threading.Thread): """Class to discover Roon Servers connected in the network.""" def __init__(self, core_id=None): """Discover Roon Servers connected in the network.""" self._exit = threading.Event() self._core_id = core_id threading.Thread.__init__(self) self.daemon = True def run(self): """Run discovery until server found.""" while not self._exit.isSet(): host, _ = self.first() if host: self.stop() def stop(self): """Stop scan.""" self._exit.set() def all(self): """Scan and return all found entries as a list. Each server is a tuple of host,port.""" return self._discover(first_only=False) def first(self): """Return first server that is found.""" all_servers = self._discover(first_only=True) return all_servers[0] if all_servers else (None, None) # pylint: disable=too-many-locals,unspecified-encoding def _discover(self, first_only=False): """Update the server entry with details.""" this_dir = os.path.dirname(os.path.abspath(__file__)) sood_file = os.path.join(this_dir, ".soodmsg") with open(sood_file) as sood_query_file: msg = sood_query_file.read() msg = msg.encode() entries = [] with socket.socket( socket.AF_INET, socket.SOCK_DGRAM, socket.IPPROTO_UDP ) as sock: sock.setsockopt(socket.IPPROTO_IP, socket.IP_MULTICAST_TTL, 32) sock.sendto(msg, (SOOD_MULTICAST_IP, SOOD_PORT)) sock.setsockopt(socket.SOL_SOCKET, socket.SO_BROADCAST, 1) sock.sendto(msg, ("", SOOD_PORT)) sock.settimeout(5) while not self._exit.isSet(): try: data, server = sock.recvfrom(1024) message = SOODMessage(data).as_dictionary host = server[0] port = message["properties"]["http_port"] unique_id = message["properties"]["unique_id"] LOGGER.debug("Discovered %s", message) if self._core_id is not None and self._core_id != unique_id: LOGGER.debug( "Ignoring server with id %s, because we're looking for %s", unique_id, self._core_id, ) continue entries.append((host, port)) if first_only: # we're only interested in the first server found break except socket.timeout: LOGGER.debug("Timeout") break except FormatException as format_exception: LOGGER.error("Format exception %s", format_exception.message) break return entries pavoni-pyroon-981a62b/roonapi/roonapi.py000066400000000000000000001200351453641423300203660ustar00rootroot00000000000000from __future__ import unicode_literals import threading import time import csv from .constants import ( LOGGER, PAGE_SIZE, SERVICE_BROWSE, SERVICE_REGISTRY, SERVICE_TRANSPORT, CONTROL_VOLUME, ) from .roonapisocket import RoonApiWebSocket class RoonApiException(Exception): """An exception to raise when the roon api can't initialise or work. Can be called with a string to get a default message, e.g. RoonApiException("There is a problem.") """ def __init__(self, message=None): """Pass on the reason string.""" if message is None: msg = "No exception mesage provided." else: msg = message super().__init__(msg) def split_media_path(path): """Split a path (eg path/to/media) into a list for use by play_media.""" return [*csv.reader([path], delimiter="/")][0] class RoonApi: # pylint: disable=too-many-instance-attributes, too-many-lines """Class to handle talking to the roon server.""" _roonsocket = None _host = None _core_id = None _core_name = None _port = None _token = None _exit = False _zones = {} _outputs = {} _state_callbacks = [] ready = False _volume_controls_request_id = None _volume_controls = {} @property def token(self): """Return the authentication key from the registration with Roon.""" return self._token @property def host(self): """Return the roon host.""" return self._host @property def core_id(self): """Return the roon host.""" return self._core_id @property def core_name(self): """Return the roon core name.""" return self._core_name @property def zones(self): """Return All zones as a dict.""" return self._zones @property def outputs(self): """All outputs, returned as dict.""" return self._outputs def zone_by_name(self, zone_name): """Get zone details by name.""" for zone in self.zones.values(): if zone["display_name"] == zone_name: return zone return None def output_by_name(self, output_name): """Get the output details from the name.""" for output in self.outputs.values(): if output["display_name"] == output_name: return output return None def zone_by_output_id(self, output_id): """Get the zone details by output id.""" for zone in self.zones.values(): for output in zone["outputs"]: if output["output_id"] == output_id: return zone return None def zone_by_output_name(self, output_name): """ Get the zone details by an output name. params: output_name: the name of the output returns: full zone details (dict) """ for zone in self.zones.values(): for output in zone["outputs"]: if output["display_name"] == output_name: return zone return None def is_grouped(self, output_id): """ Whether this output is part of a group. params: output_id: the id of the output returns: boolean whether this outout is grouped """ try: output = self.outputs[output_id] zone_id = output["zone_id"] is_grouped = len(self.zones[zone_id]["outputs"]) > 1 except KeyError: is_grouped = False return is_grouped def is_group_main(self, output_id): """ Whether this output is the the main output of a group. params: output_id: the id of the output returns: boolean whether this output is the main output of a group """ if not self.is_grouped(output_id): return False output = self.outputs[output_id] zone_id = output["zone_id"] is_group_main = self.zones[zone_id]["outputs"][0]["output_id"] == output_id return is_group_main def grouped_zone_names(self, output_id): """ Get the names of the group players. params: output_id: the id of the output returns: The names of the grouped zones. The first is the main output. """ if not self.is_grouped(output_id): return [] output = self.outputs[output_id] zone_id = output["zone_id"] grouped_zone_names = [o["display_name"] for o in self.zones[zone_id]["outputs"]] return grouped_zone_names def get_image(self, image_key, scale="fit", width=500, height=500): """ Get the image url for the specified image key. params: image_key: the key for the image as retrieved in other api calls scale: optional (value of fit, fill or stretch) width: the width of the image (required if scale is specified) height: the height of the image (required if scale is set) returns: string with the full url to the image """ return "http://%s:%s/api/image/%s?scale=%s&width=%s&height=%s" % ( self._host, self._port, image_key, scale, width, height, ) def playback_control(self, zone_or_output_id, control="play"): """ Send player command to the specified zone. params: zone_or_output_id: the id of the zone or output control: * "play" - If paused or stopped, start playback * "pause" - If playing or loading, pause playback * "playpause" - If paused or stopped, start playback. If playing or loading, pause playback. * "stop" - Stop playback and release the audio device immediately * "previous" - Go to the start of the current track, or to the previous track * "next" - Advance to the next track """ data = {"zone_or_output_id": zone_or_output_id, "control": control} return self._request(SERVICE_TRANSPORT + "/control", data) def pause_all(self): """Pause all zones.""" return self._request(SERVICE_TRANSPORT + "/pause_all") def standby(self, output_id, control_key=None): """ Send standby command to the specified output. params: output_id: the id of the output to put in standby control_key: The control_key that identifies the source_control that is to be put into standby. If omitted, then all source controls on this output that support standby will be put into standby. """ data = {"output_id": output_id, "control_key": control_key} return self._request(SERVICE_TRANSPORT + "/standby", data) def convenience_switch(self, output_id, control_key=None): """ Switch (convenience) an output, take it out of standby if needed. params: output_id: the id of the output that should be convenience-switched. control_key: The control_key that identifies the source_control that is to be switched. If omitted, then all controls on this output will be convenience switched. """ data = {"output_id": output_id, "control_key": control_key} return self._request(SERVICE_TRANSPORT + "/convenience_switch", data) def mute(self, output_id, mute=True): """ Mute/unmute an output. params: output_id: the id of the output that should be muted/unmuted mute: bool if the output should be muted. Will unmute if set to False """ how = "mute" if mute else "unmute" data = {"output_id": output_id, "how": how} return self._request(SERVICE_TRANSPORT + "/mute", data) def set_volume_percent(self, output_id, absolute_value): """ Set the volume of an output to a 0-100 value. Roon endpoints have a few different volume scales - this method scales from 0-100 to what the endpoint needs. params: output_id: the id of the output """ volume_data = self._outputs[output_id].get("volume") if volume_data is None: LOGGER.info("This endpoint has fixed volume.") return None volume_max = volume_data["max"] volume_min = volume_data["min"] volume_step = volume_data["step"] volume_range = volume_max - volume_min volume_percentage_factor = volume_range / 100 percentage_volume = volume_min + absolute_value * volume_percentage_factor # If the endpoint steps are integer - then round the scaled result if int(volume_step) == volume_step: percentage_volume = int(round(percentage_volume)) return self.change_volume_raw(output_id, percentage_volume) def change_volume_percent(self, output_id, relative_value): """ Change the volume of an output by a relative amount. Roon endpoints have a few different volume scales - this method scales from 0-100 to what the endpoint needs. params: output_id: the id of the output relative_value: How much to increase or decrease the volume """ volume_data = self._outputs[output_id].get("volume") if volume_data is None: LOGGER.info("This endpoint has fixed volume.") return None volume_max = volume_data["max"] volume_min = volume_data["min"] volume_range = volume_max - volume_min volume_percentage_factor = volume_range / 100 volume_percentage_change = int(round(relative_value * volume_percentage_factor)) return self.change_volume_raw(output_id, volume_percentage_change, "relative") def get_volume_percent(self, output_id): """ Get the volume of an output. Roon endpoints have a few different volumee scales - this method scales from 0-100 to what the endpoint needs. params: output_id: the id of the output relative_value: How much to increase or decrease the volume """ volume_data = self._outputs[output_id].get("volume") if volume_data is None: LOGGER.info("This endpoint has fixed volume.") return None volume_max = volume_data["max"] volume_min = volume_data["min"] volume_range = volume_max - volume_min volume_percentage_factor = volume_range / 100 raw_level = float(volume_data["value"]) percent_level = (raw_level - volume_min) / volume_percentage_factor return int(round(percent_level)) def change_volume_raw(self, output_id, value, method="absolute"): """ Change the volume of an output. Roon endpoint have a few different scales - this endpoints just used the native scale. The percent calls may be easier to use params: output_id: the id of the output value: The new volume value, or the increment value or step method: How to interpret the volume ('absolute'|'relative'|'relative_step') """ if "volume" not in self._outputs[output_id]: LOGGER.info("This endpoint has fixed volume.") return None # Home assistant was catching this - so catch here # to try and diagnose what needs to be checked. try: data = {"output_id": output_id, "how": method, "value": value} return self._request(SERVICE_TRANSPORT + "/change_volume", data) except Exception as exc: # pylint: disable=broad-except LOGGER.error("set_volume_level failed for entity %s.", str(exc)) return None def seek(self, zone_or_output_id, seconds, method="absolute"): """ Seek to a time position within the now playing media. params: zone_or_output_id: the id of the zone or output seconds: The target seek position method: How to interpret the target seek position ('absolute'|'relative') """ data = { "zone_or_output_id": zone_or_output_id, "how": method, "seconds": seconds, } return self._request(SERVICE_TRANSPORT + "/seek", data) def shuffle(self, zone_or_output_id, shuffle=True): """ Enable or disable playing in random order. params: zone_or_output_id: the id of the output or zone shuffle: bool if shuffle should be enabled. False will disable shuffle """ data = {"zone_or_output_id": zone_or_output_id, "shuffle": shuffle} return self._request(SERVICE_TRANSPORT + "/change_settings", data) def repeat(self, zone_or_output_id, repeat="loop"): """ Enable/disable playing in a loop. params: zone_or_output_id: the id of the output or zone repeat: "loop", "loop_one", "disabled" For backward compatability repeat can also be boolean with true meaning "loop" and false "disabled" """ if repeat in ("loop", "loop_one", "disabled"): loop = repeat else: loop = "loop" if repeat else "disabled" data = {"zone_or_output_id": zone_or_output_id, "loop": loop} return self._request(SERVICE_TRANSPORT + "/change_settings", data) def transfer_zone(self, from_zone_or_output_id, to_zone_or_output_id): """ Transfer the current queue from one zone to another. params: from_zone_or_output_id - The source zone or output to_zone_or_output_id - The destination zone or output """ data = { "from_zone_or_output_id": from_zone_or_output_id, "to_zone_or_output_id": to_zone_or_output_id, } return self._request(SERVICE_TRANSPORT + "/transfer_zone", data) def group_outputs(self, output_ids): """ Create a group of synchronized audio outputs. params: output_ids - The outputs to group. The first output's zone's queue is preserved. """ data = {"output_ids": output_ids} return self._request(SERVICE_TRANSPORT + "/group_outputs", data) def ungroup_outputs(self, output_ids): """ Ungroup outputs previous grouped. params: output_ids - The outputs to ungroup. """ data = {"output_ids": output_ids} return self._request(SERVICE_TRANSPORT + "/ungroup_outputs", data) def register_state_callback(self, callback, event_filter=None, id_filter=None): """ Register a callback to be informed about changes to zones or outputs. params: callback: method to be called when state changes occur, it will be passed an event param as string and a list of changed objects callback will be called with params: - event: string with name of the event ("zones_changed", "zones_seek_changed", "outputs_changed") - a list with the zone or output id's that changed event_filter: only callback if the event is in this list id_filter: one or more zone or output id's or names to filter on (list or string) """ if not event_filter: event_filter = [] elif not isinstance(event_filter, list): event_filter = [event_filter] if not id_filter: id_filter = [] elif not isinstance(id_filter, list): id_filter = [id_filter] self._state_callbacks.append((callback, event_filter, id_filter)) def register_queue_callback(self, callback, zone_or_output_id=""): """ Subscribe to queue change events. callback: function which will be called with the updated data (provided as dict object zone_or_output_id: If provided, only listen for updates for this zone or output """ if zone_or_output_id: opt_data = {"zone_or_output_id": zone_or_output_id} else: opt_data = None self._roonsocket.subscribe(SERVICE_TRANSPORT, "queue", callback, opt_data) def browse_browse(self, opts): """ Complex browse call on the roon api. reference: https://github.com/RoonLabs/node-roon-api-browse/blob/master/lib.js """ return self._request(SERVICE_BROWSE + "/browse", opts) def browse_load(self, opts): """ Complex browse call on the roon api. reference: https://github.com/RoonLabs/node-roon-api-browse/blob/master/lib.js """ return self._request(SERVICE_BROWSE + "/load", opts) def list_media(self, zone_or_output_id, path): """ List the media specified. params: zone_or_output_id: where to play the media path: a list allowing roon to find the media eg ["Library", "Artists", "Neil Young", "Harvest"] or ["My Live Radio", "BBC Radio 4"] """ opts = { "zone_or_output_id": zone_or_output_id, "hierarchy": "browse", "count": PAGE_SIZE, "pop_all": True, } total_count = self.browse_browse(opts)["list"]["count"] del opts["pop_all"] load_opts = { "zone_or_output_id": zone_or_output_id, "hierarchy": "browse", "count": PAGE_SIZE, "offset": 0, } items = [] searchterm = path[-1] path.pop() for element in path: load_opts["offset"] = 0 found = None searched = 0 LOGGER.debug("Looking for %s", element) while searched < total_count and found is None: items = self.browse_load(load_opts)["items"] for item in items: searched += 1 if item["title"] == element: found = item break load_opts["offset"] += PAGE_SIZE if searched >= total_count and found is None: LOGGER.debug( "Could not find media path element '%s' in %s", element, [item["title"] for item in items], ) return None opts["item_key"] = found["item_key"] load_opts["item_key"] = found["item_key"] total_count = self.browse_browse(opts)["list"]["count"] load_opts["offset"] = 0 items = self.browse_load(load_opts)["items"] LOGGER.debug("Searching for %s", searchterm) load_opts["offset"] = 0 searched = 0 matched = [] while searched < total_count: items = self.browse_load(load_opts)["items"] if searchterm == "__all__": for item in items: searched += 1 matched.append(item["title"]) else: for item in items: searched += 1 if searchterm in item["title"]: matched.append(item["title"]) load_opts["offset"] += PAGE_SIZE return matched def play_media(self, zone_or_output_id, path, action=None, report_error=True): # pylint: disable=too-many-locals,too-many-branches,too-many-return-statements,too-many-statements """ Play the media specified. params: zone_or_output_id: where to play the media path: a list allowing roon to find the media eg ["Library", "Artists", "Neil Young", "Harvest"] or ["My Live Radio", "BBC Radio 4"] action: the roon action to take to play the media - leave blank to choose the roon default eg "Play Now", "Queue" or "Start Radio" """ opts = { "zone_or_output_id": zone_or_output_id, "hierarchy": "browse", "count": PAGE_SIZE, "pop_all": True, } total_count = self.browse_browse(opts)["list"]["count"] del opts["pop_all"] load_opts = { "zone_or_output_id": zone_or_output_id, "hierarchy": "browse", "count": PAGE_SIZE, "offset": 0, } items = [] for element in path: load_opts["offset"] = 0 found = None searched = 0 LOGGER.debug("Looking for %s", element) while searched < total_count and found is None: items = self.browse_load(load_opts)["items"] for item in items: searched += 1 if item["title"] == element: found = item break load_opts["offset"] += PAGE_SIZE if searched >= total_count and found is None: if report_error: LOGGER.error( "Could not find media path element '%s' in %s", element, [item["title"] for item in items], ) return None opts["item_key"] = found["item_key"] load_opts["item_key"] = found["item_key"] try: total_count = self.browse_browse(opts)["list"]["count"] except TypeError: LOGGER.error("Exception trying to play media") return None load_opts["offset"] = 0 items = self.browse_load(load_opts)["items"] if found["hint"] == "action": # Loading item we found already started playing return True # First item shoule be the action/action_list for playing this item (eg Play Genre, Play Artist, Play Album) if items[0].get("hint") not in ["action_list", "action"]: LOGGER.error( "Found media does not have playable action_list hint='%s' '%s'", items[0].get("hint"), [item["title"] for item in items], ) return False play_header = items[0]["title"] if items[0].get("hint") == "action_list": opts["item_key"] = items[0]["item_key"] load_opts["item_key"] = items[0]["item_key"] self.browse_browse(opts) items = self.browse_load(load_opts)["items"] # We should now have play actions (eg Play Now, Add Next, Queue action, Start Radio) # So pick the one to use - the default is the first one if action is None: take_action = items[0] else: found_actions = [item for item in items if item["title"] == action] if len(found_actions) == 0: LOGGER.error( "Could not find play action '%s' in %s", action, [item["title"] for item in items], ) return False take_action = found_actions[0] try: if take_action["hint"] != "action": LOGGER.error( "Found media does not have playable action %s - %s", take_action["title"], take_action["hint"], ) return False except KeyError: # I think this is a roon API error - # when playing a tag - there should be a hint here! # so for now just ignore - and hope it's OK pass opts["item_key"] = take_action["item_key"] load_opts["item_key"] = take_action["item_key"] LOGGER.info("Play action was '%s' / '%s'", play_header, take_action["title"]) self.browse_browse(opts) return True # pylint: disable=too-many-return-statements def play_id(self, zone_or_output_id, media_id): """Play based on the media_id from the browse api.""" opts = { "zone_or_output_id": zone_or_output_id, "item_key": media_id, "hierarchy": "browse", } header_result = self.browse_browse(opts) # For Radio the above load starts play - so catch this and return try: if header_result["list"]["level"] == 0: LOGGER.info("Initial load started playback") return True except (NameError, KeyError, TypeError): LOGGER.error("Could not play id:%s, result: %s", media_id, header_result) return False if header_result is None: LOGGER.error( "Playback requested of unsupported id: %s", media_id, ) return False result = self.browse_load(opts) first_item = result["items"][0] hint = first_item["hint"] if not (hint in ["action", "action_list"]): LOGGER.error( "Playback requested but item is a list, not a playable action or action_list id: %s", media_id, ) return False if hint == "action_list": opts["item_key"] = first_item["item_key"] result = self.browse_browse(opts) if result is None: LOGGER.error( "Playback requested of unsupported id: %s", media_id, ) return False result = self.browse_load(opts) first_item = result["items"][0] hint = first_item["hint"] if hint != "action": LOGGER.error( "Playback requested but item does not have a playable action id: %s, %s", media_id, header_result, ) return False play_action = result["items"][0] hint = play_action["hint"] LOGGER.info("'%s' for '%s')", play_action["title"], header_result) opts["item_key"] = play_action["item_key"] self.browse_browse(opts) if result is None: LOGGER.error( "Playback requested of unsupported id: %s", media_id, ) return False return True # private methods # pylint: disable=too-many-arguments def __init__( self, appinfo, token, host, port, blocking_init=True, ): """ Set up the connection with Roon. appinfo: a dict of the required information about the app that should be connected to the api token: used for presistant storage of the auth token, will be set to token attribute if retrieved. You should handle saving of the key yourself host: the ip or hostname of the Roon server, port: the http port of the Roon websockets api. blocking_init: By default the init will halt untill the socket is connected and the app is authenticated, if you set bool to False the init will continue but you will only receive data once the connection is fully initialized. The latter is preferred if you're (only) using the callbacks """ self._appinfo = appinfo self._token = token if not appinfo or not isinstance(appinfo, dict): raise RoonApiException("Appinfo missing or in incorrect format") if not (host and port): raise RoonApiException("Host and port of the roon core must be specified!") self._server_setup(host, port) # block untill we're ready if blocking_init: while not self.ready and not self._exit: time.sleep(0.05) # fill zones and outputs dicts one time so the data is available right away # This might not be needed as the on change callback may have already done this if self.token: if not self._zones: self._zones = self._get_zones() if not self._outputs: self._outputs = self._get_outputs() # start socket watcher thread_id = threading.Thread(target=self._socket_watcher) thread_id.daemon = True thread_id.start() LOGGER.debug("Finished Roonapi Init") # pylint: disable=redefined-builtin def __exit__(self, type, value, exc_tb): """Stop socket on exit.""" self.stop() def __enter__(self): """Just return self on entry.""" return self def stop(self): """Stop socket.""" self._exit = True if self._roonsocket: self._roonsocket.stop() def _server_setup(self, host, port): """Open the roon socket connection to the roon server on the network.""" LOGGER.debug("Connecting to Roon server %s:%s" % (host, port)) ws_address = "ws://%s:%s/api" % (host, port) self._host = host self._port = port self._roonsocket = RoonApiWebSocket(ws_address) self._roonsocket.register_connected_callback(self._socket_connected) self._roonsocket.register_registered_calback(self._server_registered) self._roonsocket.register_volume_controls_callback( self._on_volume_control_request ) self._roonsocket.start() def _socket_connected(self): """Successfully connected the websocket.""" LOGGER.debug("Connection with roon websockets (re)created.") self.ready = False self._volume_controls_request_id = None # authenticate / register # warning: at first launch the user has to approve the app in the Roon settings. appinfo = self._appinfo.copy() appinfo["required_services"] = [SERVICE_TRANSPORT, SERVICE_BROWSE] appinfo["provided_services"] = [CONTROL_VOLUME] if self._token: appinfo["token"] = self._token if not self._token: LOGGER.info("The application should be approved within Roon's settings.") else: LOGGER.debug("Confirming previous registration with Roon...") self._roonsocket.send_request(SERVICE_REGISTRY + "/register", appinfo) def _server_registered(self, reginfo): LOGGER.debug("Registered to Roon server %s", reginfo["display_name"]) LOGGER.debug(reginfo) self._token = reginfo["token"] self._core_id = reginfo["core_id"] self._core_name = reginfo["display_name"] # subscribe to state change events self._roonsocket.subscribe(SERVICE_TRANSPORT, "zones", self._on_state_change) self._roonsocket.subscribe(SERVICE_TRANSPORT, "outputs", self._on_state_change) # set flag that we're fully initialized (used for blocking init) self.ready = True # pylint: disable=too-many-branches def _on_state_change(self, msg): """Process messages we receive from the roon websocket into a more usable format.""" events = [] if not msg or not isinstance(msg, dict): return for state_key, state_values in msg.items(): LOGGER.debug("_on_state_change %s", state_key) changed_ids = [] filter_keys = [] if state_key in [ "zones_seek_changed", "zones_changed", "zones_added", "zones", ]: for zone in state_values: if zone["zone_id"] in self._zones: self._zones[zone["zone_id"]].update(zone) else: self._zones[zone["zone_id"]] = zone changed_ids.append(zone["zone_id"]) if "display_name" in zone: filter_keys.append(zone["display_name"]) if "outputs" in zone: for output in zone["outputs"]: filter_keys.append(output["output_id"]) filter_keys.append(output["display_name"]) event = ( "zones_seek_changed" if state_key == "zones_seek_changed" else "zones_changed" ) events.append((event, changed_ids, filter_keys)) elif state_key in ["outputs_changed", "outputs_added", "outputs"]: for output in state_values: if output["output_id"] in self._outputs: self._outputs[output["output_id"]].update(output) else: self._outputs[output["output_id"]] = output changed_ids.append(output["output_id"]) filter_keys.append(output["display_name"]) filter_keys.append(output["zone_id"]) event = "outputs_changed" events.append((event, changed_ids, filter_keys)) elif state_key == "zones_removed": for item in state_values: del self._zones[item] elif state_key == "outputs_removed": for item in state_values: del self._outputs[item] else: LOGGER.warning("unknown state change: %s" % msg) for event, changed_ids, filter_keys in events: filter_keys.extend(changed_ids) for item in self._state_callbacks: callback = item[0] event_filter = item[1] id_filter = item[2] if event_filter and (event not in event_filter): continue if id_filter and set(id_filter).isdisjoint(filter_keys): continue try: callback(event, changed_ids) # pylint: disable=broad-except except Exception: LOGGER.exception("Error while executing callback!") def _get_outputs(self): outputs = {} data = self._request(SERVICE_TRANSPORT + "/get_outputs") if data and "outputs" in data: for output in data["outputs"]: outputs[output["output_id"]] = output return outputs def _get_zones(self): zones = {} data = self._request(SERVICE_TRANSPORT + "/get_zones") if data and "zones" in data: for zone in data["zones"]: zones[zone["zone_id"]] = zone return zones def _request(self, command, data=None): """Send command and wait for result.""" LOGGER.debug("_request: command: %s", command) if not self._roonsocket: retries = 20 while (not self.ready or not self._roonsocket) and retries: retries -= 1 time.sleep(0.2) if not self.ready or not self._roonsocket: LOGGER.warning("socket is not yet ready") if not self._roonsocket: return None LOGGER.debug("_request: sending") request_id = self._roonsocket.send_request(command, data) result = None retries = 50 while retries: result = self._roonsocket.results.get(request_id) LOGGER.debug( "request: command: %s, retry: %d, success: %s", command, retries, result is not None, ) if result: break retries -= 1 time.sleep(0.05) try: del self._roonsocket.results[request_id] except KeyError: pass return result def _socket_watcher(self): """Monitor the connection state of the socket and reconnect if needed.""" while not self._exit: if self._roonsocket and self._roonsocket.failed_state: LOGGER.warning("Socket connection lost! Will try to reconnect in 20s") count = 0 while not self._exit and count < 21: count += 1 time.sleep(1) if not self._exit: self._server_setup(self._host, self._port) time.sleep(2) def register_volume_control( self, control_key, display_name, callback, initial_volume=0, volume_type="number", volume_step=2, volume_min=0, volume_max=100, is_muted=False, ): """Register a new volume control on the api.""" if control_key in self._volume_controls: LOGGER.error("source_control %s is already registered!" % control_key) return control_data = { "display_name": display_name, "volume_type": volume_type, "volume_min": volume_min, "volume_max": volume_max, "volume_value": initial_volume, "volume_step": volume_step, "is_muted": is_muted, "control_key": control_key, } self._volume_controls[control_key] = (callback, control_data) if self._volume_controls_request_id: data = {"controls_added": [control_data]} self._roonsocket.send_continue(self._volume_controls_request_id, data) def unregister_volume_control( self, control_key, ): """Delete a new volume control on the api.""" if control_key not in self._volume_controls: LOGGER.error("source_control %s is not registered!" % control_key) return control_data = { "control_key": control_key, } del self._volume_controls[control_key] if self._volume_controls_request_id: data = {"controls_removed": [control_data]} self._roonsocket.send_continue(self._volume_controls_request_id, data) def update_volume_control(self, control_key, volume=None, mute=None): """Update an existing volume control, report its state to Roon.""" if control_key not in self._volume_controls: LOGGER.warning("volume_control %s is not (yet) registered!" % control_key) return False if not self._volume_controls_request_id: LOGGER.warning("Not yet registered, can not update volume control") return False if volume is not None: self._volume_controls[control_key][1]["volume_value"] = volume if mute is not None: self._volume_controls[control_key][1]["is_muted"] = mute data = {"controls_changed": [self._volume_controls[control_key][1]]} self._roonsocket.send_continue(self._volume_controls_request_id, data) return True def _on_volume_control_request(self, event, request_id, data): """Got request from roon server for a volume control registered on this endpoint.""" if event == "subscribe_controls": LOGGER.debug("found subscription ID for volume controls: %s " % request_id) # send all volume controls already registered (handle connection loss) controls = [] for _, control_data in self._volume_controls.values(): controls.append(control_data) self._roonsocket.send_continue(request_id, {"controls_added": controls}) self._volume_controls_request_id = request_id elif data and data.get("control_key"): control_key = data["control_key"] if event == "set_volume" and data["mode"] == "absolute": value = data["value"] elif event == "set_volume" and data["mode"] == "relative": value = ( self._volume_controls[control_key][1]["volume_value"] + data["value"] ) elif event == "set_volume" and data["mode"] == "relative_step": value = self._volume_controls[control_key][1]["volume_value"] + ( data["value"] * data["volume_step"] ) elif event == "set_mute": value = data["mode"] == "on" else: return try: self._roonsocket.send_complete(request_id, "Success") self._volume_controls[control_key][0](control_key, event, value) except Exception: # pylint: disable=broad-except LOGGER.exception("Error in volume_control callback") self._roonsocket.send_complete(request_id, "Error") pavoni-pyroon-981a62b/roonapi/roonapisocket.py000066400000000000000000000214531453641423300216030ustar00rootroot00000000000000from __future__ import unicode_literals import threading import websocket from .constants import LOGGER, REGISTERED, SERVICE_PING, CONTROL_VOLUME try: import simplejson as json except ImportError: import json try: import thread except ImportError: import _thread as thread class RoonApiWebSocket( threading.Thread ): # pylint: disable=too-many-instance-attributes """Class to handle the roon websocket connection.""" @property def results(self): """Return the result of the previous request.""" return self._results def register_connected_callback(self, callback): """To be called on connection.""" self._connected_callback = callback def register_registered_calback(self, callback): """To be called on registration.""" self._registered_calback = callback def register_source_controls_callback(self, callback): """To be called on source changes.""" self._source_controls_callback = callback def register_volume_controls_callback(self, callback): """To be called on volume changes.""" self._volume_controls_callback = callback def run(self): """Start the socket thread.""" self._socket.run_forever(ping_interval=10) if not self._exit: LOGGER.warning("Session unexpectedly disconnected!") self._exit = True self.failed_state = True else: LOGGER.debug("socket connection closed") def stop(self): """Stop the socket thread.""" self._exit = True subscriptions = [] for _, value in self._subscriptions.items(): subscriptions.append((value["service"], value["endpoint"])) for service, _ in subscriptions: self.unsubscribe(service, subscriptions) self._socket.close() def __init__(self, host): """Create the websocket connection to the roon server.""" self._socket = None self._results = {} self._requestid = 10 # initial request_id of 10 to prevent confusion with the requests that are sent by the server at initialization self._subkey = 0 self._exit = False self._subscriptions = {} self.connected = False self.failed_state = False self._connected_callback = lambda: None self._registered_calback = lambda _: None self._source_controls_callback = lambda _a, _b, _c: None self._volume_controls_callback = lambda _a, _b, _c: None self._socket = websocket.WebSocketApp( host, on_message=self.on_message, on_error=self.on_error, on_open=self.on_open, on_close=self.on_close, ) threading.Thread.__init__(self) self.daemon = True def subscribe(self, service, endpoint, callback, opt_data=None): """Subscribe to events.""" subkey = self._subkey self._subkey += 1 data = {"subscription_key": subkey} if opt_data and isinstance(opt_data, dict): data.update(opt_data) request_id = self.send_request(service + "/subscribe_" + endpoint, data) self._subscriptions[request_id] = { "service": service, "endpoint": endpoint, "request_id": request_id, "subkey": subkey, "callback": callback, } def unsubscribe(self, service, endpoint): """Subscribe to events.""" matches = [] for key, value in self._subscriptions.items(): if value["service"] == service and value["endpoint"] == endpoint: matches.append((key, value["subkey"])) for item in matches: self.send_request( service + "/unsubscribe_" + endpoint, {"subscription_key": item[1]} ) del self._subscriptions[item[0]] # pylint: disable=too-many-branches def on_message(self, w_socket, message=None): """Handle message callback.""" if not message: message = w_socket # compatability fix because of change in websocket-client v0.49 try: message = message.decode("utf-8") lines = message.split("\n") header = lines[0] body = "" request_id = None line_with_request_id = [ line for line in lines if line.startswith("Request-Id") ] if line_with_request_id: request_id = int(line_with_request_id[0].split("Request-Id: ")[1]) if "Content-Type:" in message: # Roon uses a blank line after the header to indicate body. # See https://github.com/RoonLabs/node-roon-api/blob/master/moomsg.js#L45 body = "".join(message.split("\n\n")[1:]) elif "Logging:" not in message: body = header if body and "{" in body: body = json.loads(body) # handle message if SERVICE_PING in header: # reply to incoming ping from server self.send_complete(request_id, "Success") elif REGISTERED in header: self._registered_calback(body) elif CONTROL_VOLUME in header: # incoming message for volume_control endpoint event = header.split("/")[-1] LOGGER.debug("CONTROL_VOLUME endpoint %s", event) if self._volume_controls_callback: self._volume_controls_callback(event, request_id, body) elif request_id in self._subscriptions: # this is callback for one of our subscriptions self._subscriptions[request_id]["callback"](body) else: # this is just a result for one of our requests self._results[request_id] = body except websocket.WebSocketConnectionClosedException: # This can happen while closing a connection - so ignore pass except Exception: # pylint: disable=broad-except LOGGER.exception("Error while parsing message '%s'", message) def on_error(self, w_socket, error=None): """Handle error callback.""" if not error: error = w_socket # compatability fix because of change in websocket-client v0.49 LOGGER.info("on_error %s", error) # pylint: disable=unused-argument def on_close(self, w_socket, close_status_code, close_msg): """Handle closing the session.""" LOGGER.debug("session closed (%s) %s", close_msg, close_status_code) self.connected = False self._requestid = 10 self._subkey = 0 self._subscriptions = {} # pylint: disable=unused-argument def on_open(self, w_socket=None): """Handle opening the session.""" LOGGER.debug("Opened Websocket connection to the server...") self.connected = True thread.start_new_thread(self._connected_callback, ()) def send_continue(self, request_id, body): """Send continue message if socket open.""" if not self.connected: LOGGER.error("Connection is not (yet) ready!") return body = json.dumps(body) msg = ( "MOO/1 CONTINUE Changed\nRequest-Id: %s\nContent-Length: %s\nContent-Type: application/json\n\n%s" % (request_id, len(body), body) ) msg = bytes(msg, "utf-8") self._socket.send(msg, 0x2) def send_complete(self, request_id, name, body=""): """Send complete message if socket open.""" if not self.connected: LOGGER.error("Connection is not (yet) ready!") return msg = "MOO/1 COMPLETE %s\nRequest-Id: %s" % (name, request_id) if body: body = json.dumps(body) msg += "\nContent-Length: %s\nContent-Type: application/json\n\n%s" % ( len(body), body, ) else: msg += "\n\n" msg = bytes(msg, "utf-8") self._socket.send(msg, 0x2) def send_request( self, command, body=None, content_type="application/json", header_type="REQUEST" ): """Send request to the roon sever.""" if not self.connected: LOGGER.error("Connection is not (yet) ready!") return False request_id = self._requestid self._requestid += 1 self._results[request_id] = None if body is None: msg = "MOO/1 REQUEST %s\nRequest-Id: %s\n\n" % (command, request_id) else: body = json.dumps(body) msg = ( "MOO/1 REQUEST %s\nRequest-Id: %s\nContent-Length: %s\nContent-Type: %s\n\n%s" % (command, request_id, len(body), content_type, body) ) msg = bytes(msg, "utf-8") self._socket.send(msg, 0x2) return request_id pavoni-pyroon-981a62b/roonapi/soodmessage.py000066400000000000000000000075661453641423300212450ustar00rootroot00000000000000r""" SOOD messages consists of a header and a list of properties encoded as key/value pairs. The header starts with "SOOD", followed by a byte with the value 2, followed by a byte representing the type. The type is either 'Q' for "Query" or # 'R' for "Response. The key/value pairs follows directly after the type. The keys and values are prepended with one or two bytes with length info. One byte for keys, two bytes for values. In other words: SOOD\x02<1bytelen><2bytelen><1bytelen><2bytelen>... All lengths are big-endian. The service_id always has the value 00720724-5143-4a9b-abac-0e50cba674bb Query format: SOOD\x02Q<1bytelen>query_service_id<2bytelen>00720724-5143-4a9b-abac-0e50cba674bb<1bytelen>_tid<2bytelen> Response format: SOOD\x02R<1bytelen>name<2bytelen><1bytelen>display_version<2bytelen><1bytelen>unique_id<2bytelen><1bytelen>service_id00720724-5143-4a9b-abac-0e50cba674bb<1bytelen>tcp_port<1bytelen>http_port<1bytelen>_tidc64e3888-f2f2-4c4a-9f89-2093ae4217a6 """ from enum import Enum, auto class FormatException(Exception): """Exception to be raised on errors in a binary SOOD message.""" def __init__(self, message): """Init with the message that causes the error.""" Exception.__init__() self.message = message class SOODMessage: # pylint: disable=too-few-public-methods """Class for parsing SOOD messages.""" __MESSAGE_PREFIX__ = b"SOOD\x02" class SOODMessageType(Enum): """Symbolic names for the message types.""" QUERY = auto() RESPONSE = auto() def __repr__(self): """Print class and name.""" return f"<{self.__class__.__name__}, {self.name}>" def __init__(self, message): """Init with the message to parse.""" if not message.startswith(self.__MESSAGE_PREFIX__): raise FormatException("Error in message header") self._message = message self._current_position = len(self.__MESSAGE_PREFIX__) def _parse_property(self, size_of_size): length = int.from_bytes( self._message[ self._current_position : self._current_position + size_of_size ], "big", ) self._current_position += size_of_size if self._current_position + length > len(self._message): return None part_string = self._message[ self._current_position : self._current_position + length ].decode() self._current_position += len(part_string) return part_string def _parse_properties(self): properties = {} while self._current_position < len(self._message): part_key = self._parse_property(1) if part_key is None: return None part_value = self._parse_property(2) if part_value is None: return None properties[part_key] = part_value return properties def _parse_type(self): type_letter = chr(self._message[self._current_position]) self._current_position += 1 if type_letter not in ["Q", "R"]: return None return ( self.SOODMessageType.QUERY if type_letter == "Q" else self.SOODMessageType.RESPONSE ) @property def as_dictionary(self): """Expose the message as a dictionary.""" message_type = self._parse_type() if message_type is None: raise FormatException("Error in message type") message_properties = self._parse_properties() if message_properties is None: raise FormatException("Error in property") message = { "type": message_type, "properties": message_properties, } return message pavoni-pyroon-981a62b/scripts/000077500000000000000000000000001453641423300163645ustar00rootroot00000000000000pavoni-pyroon-981a62b/scripts/build.sh000077500000000000000000000016351453641423300200270ustar00rootroot00000000000000#!/usr/bin/env bash set -euf -o pipefail SELF_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" cd "$SELF_DIR/.." source "$SELF_DIR/common.sh" assertPython echo echo "===Settting up venv===" enterVenv echo echo "===Installing poetry===" pip install poetry echo echo "===Installing dependencies===" poetry install echo echo "===Installing black===" pip install black echo echo "===Formatting code===" if [[ `which black` ]]; then BLACK_ARGS="" if [[ "${CI:-}" = "1" ]]; then BLACK_ARGS="--check" fi black $BLACK_ARGS . else echo "Warning: Skipping code formatting. You should use python >= 3.6." fi echo echo "===Lint with flake8===" flake8 echo echo "===Lint with pylint===" pylint $LINT_PATHS # Test require a roon core server install locally # echo # echo "===Test with pytest===" # pytest echo echo "===Building package===" poetry build echo echo "Build complete" pavoni-pyroon-981a62b/scripts/build_and_publish.sh000077500000000000000000000005471453641423300224000ustar00rootroot00000000000000#!/usr/bin/env bash set -euf -o pipefail SELF_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" PUBLISH_PASSWORD="$1" source "$SELF_DIR/common.sh" assertPython "$SELF_DIR/build.sh" echo echo "===Settting up venv===" enterVenv echo echo "===Publishing package===" poetry publish --username __token__ --password "$PUBLISH_PASSWORD" pavoni-pyroon-981a62b/scripts/check_dirty000066400000000000000000000003561453641423300206030ustar00rootroot00000000000000#!/bin/bash [[ -z $(git ls-files --others --exclude-standard) ]] && exit 0 echo -e '\n***** ERROR\nTests are leaving files behind. Please update the tests to avoid writing any files:' git ls-files --others --exclude-standard echo exit 1 pavoni-pyroon-981a62b/scripts/clean.sh000077500000000000000000000005761453641423300200150ustar00rootroot00000000000000#!/usr/bin/env bash set -euf -o pipefail SELF_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" cd "$SELF_DIR/.." if [[ `env | grep VIRTUAL_ENV` ]]; then echo "Error: deactivate your venv first." exit 1 fi find . -regex '^.*\(__pycache__\|\.py[co]\)$' -delete rm .coverage .eggs .tox build dist withings*.egg-info .venv venv -rf echo "Clean complete." pavoni-pyroon-981a62b/scripts/common.sh000066400000000000000000000016021453641423300202070ustar00rootroot00000000000000VENV_DIR=".venv" PYTHON_BIN="python3" LINT_PATHS="./roonapi" function assertPython() { if ! [[ $(which "$PYTHON_BIN") ]]; then echo "Error: '$PYTHON_BIN' is not in your path." exit 1 fi } function enterVenv() { # Not sure why I couldn't use "if ! [[ `"$PYTHON_BIN" -c 'import venv'` ]]" below. It just never worked when venv was # present. VENV_NOT_INSTALLED=$("$PYTHON_BIN" -c 'import venv' 2>&1 | grep -ic ' No module named' || true) if [[ "$VENV_NOT_INSTALLED" -gt "0" ]]; then echo "Error: The $PYTHON_BIN 'venv' module is not installed." exit 1 fi if ! [[ -e "$VENV_DIR" ]]; then echo "Creating venv." "$PYTHON_BIN" -m venv "$VENV_DIR" else echo Using existing venv. fi if ! [[ $(env | grep VIRTUAL_ENV) ]]; then echo "Entering venv." set +uf source "$VENV_DIR/bin/activate" set -uf else echo Already in venv. fi }pavoni-pyroon-981a62b/scripts/test.sh000077500000000000000000000007301453641423300177020ustar00rootroot00000000000000#!/usr/bin/env bash set -euf -o pipefail SELF_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" cd "$SELF_DIR/.." source "$SELF_DIR/common.sh" assertPython echo echo "===Settting up venv===" enterVenv echo echo "===Installing poetry===" pip install poetry echo echo "===Installing dependencies===" poetry install # Test require a roon core server installed locally echo echo "===Test with pytest===" pytest -v -s echo echo "Test complete" pavoni-pyroon-981a62b/scripts/update_deps.sh000077500000000000000000000007221453641423300212210ustar00rootroot00000000000000#!/usr/bin/env bash set -euf -o pipefail SELF_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" cd "$SELF_DIR/.." source "$SELF_DIR/common.sh" assertPython echo echo "===Settting up venv===" enterVenv echo echo "===Installing poetry===" pip install poetry echo echo "===Installing dependencies===" poetry install echo echo "===Installing black===" pip install black echo echo "===Updating poetry lock file===" poetry update --lock pavoni-pyroon-981a62b/tests/000077500000000000000000000000001453641423300160375ustar00rootroot00000000000000pavoni-pyroon-981a62b/tests/test__discovery.py000066400000000000000000000020621453641423300216160ustar00rootroot00000000000000#!/usr/bin/env python # -*- coding: utf-8 -*- """Init and test discovery to test the roon api.""" import os.path from roonapi import RoonApi, RoonDiscovery appinfo = { "extension_id": "python_roon_test", "display_name": "Python library for Roon", "display_version": "1.0.0", "publisher": "pavoni", "email": "my@email.com", } def test_discovery(): try: core_id = open("my_core_id_file").read() token = open("my_token_file").read() except OSError: print("Please authorise first using discovery.py") exit() discover = RoonDiscovery(core_id) server = discover.first() discover.stop() assert server[0] != None assert server[1] != None with RoonApi(appinfo, token, server[0], server[1], True) as roonapi: token = roonapi.token roonapi.stop() with open("test_core_server_file", "w") as f: f.write(server[0]) with open("test_core_port_file", "w") as f: f.write(server[1]) with open("test_token_file", "w") as f: f.write(roonapi.token) pavoni-pyroon-981a62b/tests/test_basic.py000066400000000000000000000022771453641423300205410ustar00rootroot00000000000000#!/usr/bin/env python # -*- coding: utf-8 -*- """Some basic functions to test the roon api.""" import os.path from roonapi import RoonApi def test_basic(): try: host = open("test_core_server_file").read() port = open("test_core_port_file").read() token = open("my_token_file").read() except OSError: print("Please authorise first using discovery.py") exit() appinfo = { "extension_id": "python_roon_test", "display_name": "Python library for Roon", "display_version": "1.0.0", "publisher": "pavoni", "email": "my@email.com", } with RoonApi(appinfo, token, host, port, True) as roonapi: # Test basic zone fetching zones = [zone["display_name"] for zone in roonapi.zones.values()] zones.sort() assert len(zones) == 7 assert zones == [ "95 Office", "Bedroom", "Hi Fi", "Kitchen", "Shower", "Study", "Tuner", ] # Test basic output fetching output_count = len(roonapi.outputs) assert output_count == 8 token = roonapi.token roonapi.stop() pavoni-pyroon-981a62b/tests/test_loop.py000066400000000000000000000062631453641423300204300ustar00rootroot00000000000000#!/usr/bin/env python # -*- coding: utf-8 -*- """Some simple tests for callback on the roon api.""" import os.path, pytest from roonapi import RoonApi, LOGGER @pytest.fixture() def roon_api(request): try: host = open("test_core_server_file").read() port = open("test_core_port_file").read() token = open("my_token_file").read() except OSError: print("Please authorise first using discovery.py") exit() appinfo = { "extension_id": "python_roon_test", "display_name": "Python library for Roon", "display_version": "1.0.0", "publisher": "pavoni", "email": "my@email.com", } def teardown(): roonapi.stop() request.addfinalizer(teardown) # initialize Roon api and register the callback for state changes roonapi = RoonApi(appinfo, token, host, port, True) return roonapi def test_loop_settings(roon_api): db_zone = [ zone for zone in roon_api.zones.values() if zone["display_name"] == "95 Office" ][0] db_zone_output_id = db_zone["outputs"][0]["output_id"] loop = db_zone["settings"]["loop"] assert loop == "disabled" roon_api.repeat(db_zone_output_id, "loop_one") db_zone = [ zone for zone in roon_api.zones.values() if zone["display_name"] == "95 Office" ][0] db_zone_output_id = db_zone["outputs"][0]["output_id"] loop = db_zone["settings"]["loop"] assert loop == "loop_one" roon_api.repeat(db_zone_output_id, "loop") db_zone = [ zone for zone in roon_api.zones.values() if zone["display_name"] == "95 Office" ][0] db_zone_output_id = db_zone["outputs"][0]["output_id"] loop = db_zone["settings"]["loop"] assert loop == "loop" roon_api.repeat(db_zone_output_id, "disabled") db_zone = [ zone for zone in roon_api.zones.values() if zone["display_name"] == "95 Office" ][0] db_zone_output_id = db_zone["outputs"][0]["output_id"] loop = db_zone["settings"]["loop"] assert loop == "disabled" def test_loop_old_style_settings(roon_api): db_zone = [ zone for zone in roon_api.zones.values() if zone["display_name"] == "95 Office" ][0] db_zone_output_id = db_zone["outputs"][0]["output_id"] loop = db_zone["settings"]["loop"] assert loop == "disabled" roon_api.repeat(db_zone_output_id, True) db_zone = [ zone for zone in roon_api.zones.values() if zone["display_name"] == "95 Office" ][0] db_zone_output_id = db_zone["outputs"][0]["output_id"] loop = db_zone["settings"]["loop"] assert loop == "loop" roon_api.repeat(db_zone_output_id, False) db_zone = [ zone for zone in roon_api.zones.values() if zone["display_name"] == "95 Office" ][0] db_zone_output_id = db_zone["outputs"][0]["output_id"] loop = db_zone["settings"]["loop"] assert loop == "disabled" roon_api.repeat(db_zone_output_id) db_zone = [ zone for zone in roon_api.zones.values() if zone["display_name"] == "95 Office" ][0] db_zone_output_id = db_zone["outputs"][0]["output_id"] loop = db_zone["settings"]["loop"] assert loop == "loop" roon_api.repeat(db_zone_output_id, False) pavoni-pyroon-981a62b/tests/test_path_parser.py000066400000000000000000000024311453641423300217600ustar00rootroot00000000000000# !/usr/bin/env python # -*- coding: utf-8 -*- from roonapi import split_media_path """Some tests of the path parser""" def test_simple_paths(): assert split_media_path("Library/Artists/Neil Young") == [ "Library", "Artists", "Neil Young", ] assert split_media_path("Library/Artists/Neil Young/Harvest") == [ "Library", "Artists", "Neil Young", "Harvest", ] assert split_media_path("My Live Radio/BBC Radio 4") == [ "My Live Radio", "BBC Radio 4", ] assert split_media_path("Genres/Jazz/Cool") == [ "Genres", "Jazz", "Cool", ] assert split_media_path("Genres/Rock/Pop") == [ "Genres", "Rock", "Pop", ] def test_edge_cases(): assert split_media_path("") == [] assert split_media_path("Library") == [ "Library", ] assert split_media_path("/") == ["", ""] def test_quoted_paths(): assert split_media_path('"Library"/Artists/Neil Young') == [ "Library", "Artists", "Neil Young", ] assert split_media_path('Genres/"Rock/Pop"') == [ "Genres", "Rock/Pop", ] assert split_media_path('Genres/"Rock/Pop"') == [ "Genres", "Rock/Pop", ] pavoni-pyroon-981a62b/tests/test_volume.py000066400000000000000000000135321453641423300207630ustar00rootroot00000000000000#!/usr/bin/env python # -*- coding: utf-8 -*- """Some simple tests for callback on the roon api.""" import os.path, pytest from roonapi import RoonApi, LOGGER @pytest.fixture() def roon_api(request): try: host = open("test_core_server_file").read() port = open("test_core_port_file").read() token = open("my_token_file").read() except OSError: print("Please authorise first using discovery.py") exit() appinfo = { "extension_id": "python_roon_test", "display_name": "Python library for Roon", "display_version": "1.0.0", "publisher": "pavoni", "email": "my@email.com", } def teardown(): roonapi.stop() request.addfinalizer(teardown) # initialize Roon api and register the callback for state changes roonapi = RoonApi(appinfo, token, host, port, True) return roonapi def test_get_volume_db(roon_api): db_zone = [ zone for zone in roon_api.zones.values() if zone["display_name"] == "95 Office" ][0] db_zone_volume_info = db_zone["outputs"][0]["volume"] db_zone_output_id = db_zone["outputs"][0]["output_id"] roon_api.change_volume_raw(db_zone_output_id, -80) vol = [ zone for zone in roon_api.zones.values() if zone["display_name"] == "95 Office" ][0]["outputs"][0]["volume"]["value"] assert vol == -80 assert roon_api.get_volume_percent(db_zone_output_id) == 0 roon_api.change_volume_raw(db_zone_output_id, 0) vol = [ zone for zone in roon_api.zones.values() if zone["display_name"] == "95 Office" ][0]["outputs"][0]["volume"]["value"] assert vol == 0 assert roon_api.get_volume_percent(db_zone_output_id) == 100 roon_api.change_volume_raw(db_zone_output_id, -40) vol = [ zone for zone in roon_api.zones.values() if zone["display_name"] == "95 Office" ][0]["outputs"][0]["volume"]["value"] assert vol == -40 assert roon_api.get_volume_percent(db_zone_output_id) == 50 def test_get_volume_perent(roon_api): percent_zone = [ zone for zone in roon_api.zones.values() if zone["display_name"] == "Gregs Mac System" ][0] percent_zone_volume_info = percent_zone["outputs"][0]["volume"] percent_zone_output_id = percent_zone["outputs"][0]["output_id"] roon_api.change_volume_raw(percent_zone_output_id, 0) vol = [ zone for zone in roon_api.zones.values() if zone["display_name"] == "Gregs Mac System" ][0]["outputs"][0]["volume"]["value"] assert vol == 0 assert roon_api.get_volume_percent(percent_zone_output_id) == 0 roon_api.change_volume_raw(percent_zone_output_id, 100) vol = [ zone for zone in roon_api.zones.values() if zone["display_name"] == "Gregs Mac System" ][0]["outputs"][0]["volume"]["value"] assert vol == 100 assert roon_api.get_volume_percent(percent_zone_output_id) == 100 roon_api.change_volume_raw(percent_zone_output_id, 50) vol = [ zone for zone in roon_api.zones.values() if zone["display_name"] == "Gregs Mac System" ][0]["outputs"][0]["volume"]["value"] assert vol == 50 assert roon_api.get_volume_percent(percent_zone_output_id) == 50 def test_set_volume_db(roon_api): db_zone = [ zone for zone in roon_api.zones.values() if zone["display_name"] == "95 Office" ][0] db_zone_volume_info = db_zone["outputs"][0]["volume"] db_zone_output_id = db_zone["outputs"][0]["output_id"] roon_api.set_volume_percent(db_zone_output_id, 0) assert roon_api.get_volume_percent(db_zone_output_id) == 0 roon_api.set_volume_percent(db_zone_output_id, 100) assert roon_api.get_volume_percent(db_zone_output_id) == 100 roon_api.set_volume_percent(db_zone_output_id, 50) assert roon_api.get_volume_percent(db_zone_output_id) == 50 def test_set_volume_percent(roon_api): percent_zone = [ zone for zone in roon_api.zones.values() if zone["display_name"] == "Gregs Mac System" ][0] percent_zone_volume_info = percent_zone["outputs"][0]["volume"] percent_zone_output_id = percent_zone["outputs"][0]["output_id"] roon_api.set_volume_percent(percent_zone_output_id, 0) assert roon_api.get_volume_percent(percent_zone_output_id) == 0 roon_api.set_volume_percent(percent_zone_output_id, 100) assert roon_api.get_volume_percent(percent_zone_output_id) == 100 roon_api.set_volume_percent(percent_zone_output_id, 50) assert roon_api.get_volume_percent(percent_zone_output_id) == 50 def test_change_volume_db(roon_api): db_zone = [ zone for zone in roon_api.zones.values() if zone["display_name"] == "95 Office" ][0] db_zone_volume_info = db_zone["outputs"][0]["volume"] db_zone_output_id = db_zone["outputs"][0]["output_id"] roon_api.set_volume_percent(db_zone_output_id, 40) assert roon_api.get_volume_percent(db_zone_output_id) == 40 roon_api.change_volume_percent(db_zone_output_id, 1) assert roon_api.get_volume_percent(db_zone_output_id) == 41 roon_api.change_volume_percent(db_zone_output_id, -2) assert roon_api.get_volume_percent(db_zone_output_id) == 39 def test_change_volume_percent(roon_api): percent_zone = [ zone for zone in roon_api.zones.values() if zone["display_name"] == "Gregs Mac System" ][0] percent_zone_volume_info = percent_zone["outputs"][0]["volume"] percent_zone_output_id = percent_zone["outputs"][0]["output_id"] roon_api.set_volume_percent(percent_zone_output_id, 40) assert roon_api.get_volume_percent(percent_zone_output_id) == 40 roon_api.change_volume_percent(percent_zone_output_id, 1) assert roon_api.get_volume_percent(percent_zone_output_id) == 41 roon_api.change_volume_percent(percent_zone_output_id, -2) assert roon_api.get_volume_percent(percent_zone_output_id) == 39 pavoni-pyroon-981a62b/tests/test_with_callbacks.py000066400000000000000000000035211453641423300224230ustar00rootroot00000000000000#!/usr/bin/env python # -*- coding: utf-8 -*- """Some simple tests for callback on the roon api.""" import os.path from roonapi import RoonApi, LOGGER def test_callbacks(): callback_count = 0 events = [] try: host = open("test_core_server_file").read() port = open("test_core_port_file").read() token = open("my_token_file").read() except OSError: print("Please authorise first using discovery.py") exit() appinfo = { "extension_id": "python_roon_test", "display_name": "Python library for Roon", "display_version": "1.0.0", "publisher": "pavoni", "email": "my@email.com", } # initialize Roon api and register the callback for state changes with RoonApi(appinfo, token, host, port, True) as roonapi: def state_callback(event, changed_items): """Update details when the roon state changes.""" nonlocal callback_count, events callback_count += 1 events.append(event) LOGGER.info("%s: %s", event, changed_items) roonapi.register_state_callback(state_callback) zones = [ zone for zone in roonapi.zones.values() if zone["display_name"] == "95 Office" ] assert len(zones) == 1 test_zone = zones[0] test_output_id = test_zone["outputs"][0]["output_id"] assert callback_count == 0 assert events == [] roonapi.change_volume_raw(test_output_id, 1, method="relative") assert callback_count == 2 assert events == ["zones_changed", "outputs_changed"] events = [] roonapi.change_volume_raw(test_output_id, -1, method="relative") assert callback_count == 4 assert events == ["zones_changed", "outputs_changed"] roonapi.stop()