pax_global_header00006660000000000000000000000064144506014330014512gustar00rootroot0000000000000052 comment=7e55690c76ad05fd99804d8608c01501ac3d00eb async_property-0.2.2/000077500000000000000000000000001445060143300145745ustar00rootroot00000000000000async_property-0.2.2/.coveragerc000066400000000000000000000001311445060143300167100ustar00rootroot00000000000000[run] source = async_property/ branch = true omit = tests/ [report] show_missing = true async_property-0.2.2/.editorconfig000066400000000000000000000004441445060143300172530ustar00rootroot00000000000000# http://editorconfig.org root = true [*] indent_style = space indent_size = 4 trim_trailing_whitespace = true insert_final_newline = true charset = utf-8 end_of_line = lf [*.bat] indent_style = tab end_of_line = crlf [LICENSE] insert_final_newline = false [Makefile] indent_style = tab async_property-0.2.2/.github/000077500000000000000000000000001445060143300161345ustar00rootroot00000000000000async_property-0.2.2/.github/ISSUE_TEMPLATE.md000066400000000000000000000005051445060143300206410ustar00rootroot00000000000000* async_property version: * Python version: * Operating System: ### Description Describe what you were trying to get done. Tell us what happened, what went wrong, and what you expected to happen. ### What I Did ``` Paste the command(s) you ran and the output. If there was a crash, please include the traceback here. ``` async_property-0.2.2/.gitignore000066400000000000000000000022441445060143300165660ustar00rootroot00000000000000# Byte-compiled / optimized / DLL files __pycache__/ *.py[cod] *$py.class # C extensions *.so # Distribution / packaging .Python env/ build/ develop-eggs/ dist/ downloads/ eggs/ .eggs/ lib/ lib64/ parts/ sdist/ var/ wheels/ *.egg-info/ .installed.cfg *.egg # PyInstaller # Usually these files are written by a python script from a template # before PyInstaller builds the exe, so as to inject date/other infos into it. *.manifest *.spec # Installer logs pip-log.txt pip-delete-this-directory.txt # Unit test / coverage reports htmlcov/ .tox/ .coverage .coverage.* .cache nosetests.xml coverage.xml *.cover .hypothesis/ .pytest_cache/ # Translations *.mo *.pot # Django stuff: *.log local_settings.py # Flask stuff: instance/ .webassets-cache # Scrapy stuff: .scrapy # Sphinx documentation docs/_build/ # PyBuilder target/ # Jupyter Notebook .ipynb_checkpoints # pyenv .python-version # celery beat schedule file celerybeat-schedule # SageMath parsed files *.sage.py # dotenv .env # virtualenv .venv venv/ ENV/ # Spyder project settings .spyderproject .spyproject # Rope project settings .ropeproject # mkdocs documentation /site # mypy .mypy_cache/ # IDEA .idea/ async_property-0.2.2/.travis.yml000066400000000000000000000017401445060143300167070ustar00rootroot00000000000000dist: jammy language: python python: - '3.11' - '3.10' - '3.9' - '3.8' - '3.7' install: pip install -U tox-travis script: tox deploy: provider: pypi distributions: sdist bdist_wheel user: ryananguiano password: secure: L69LOxK09hrnWKcqoMnWQex5uQfJs9SNRS1S71lPvru8QBB6slu84FuNeesQJQ/KpdXVZUv5erxmpKBowCcLH30sByZoa52Drrfy3W5GZtVg0MvHubAn9Yxp6G19AmIyn22pRKyr/bMc0Ut0XZymhAYVpnUSRQ/EoXu/n7mFpTx6VWYjKcKZBs76m0Cx49tffzP13FeoD9YUByMsDtKKyp10T92/YB2Zo45HAS9x09gXkmAVLShEgbU/PzzV10NJEwcpqXcL7CYMYdntIKFMigj4qbta8RuHL/Hma3V/JombcclTnErIGRzWAWPuODy6mmhmHvUicDlTD8EUn4dQvKOwamc+epApglheFHsJqudtth7XSdQzhjvP0d0HzNITL2+rTlcXwN46Z+RyWPutAQKKf1y/KJey+oqDELrkpFA4Om93YHm9v0cFy/31w3V9fSD1tLzkSRO5wARw6mQx28xLTGTLTnIs4wo3AO5B/I+NlejDssJ541l8bAe7C2HPSgkK1uY/P1D00K3NnkCtYAL0nnpYEk6ef8OY2eMHvU9alqsmgontS1/9a7jpDeD7BCDwZOc8Ww1WTwLuVwuMqURbXrmyn1HdtOvhwcm4aV8CHsuKFwPYOb/Kboifal/tSxZzwIE9HXwb4EGzl26CkylqEofS0cW7+EEGA1DZ6TQ= on: tags: true repo: ryananguiano/async_property python: 3.11 async_property-0.2.2/CONTRIBUTING.rst000066400000000000000000000070251445060143300172410ustar00rootroot00000000000000.. highlight:: shell ============ Contributing ============ Contributions are welcome, and they are greatly appreciated! Every little bit helps, and credit will always be given. You can contribute in many ways: Types of Contributions ---------------------- Report Bugs ~~~~~~~~~~~ Report bugs at https://github.com/ryananguiano/async_property/issues. If you are reporting a bug, please include: * Your operating system name and version. * Any details about your local setup that might be helpful in troubleshooting. * Detailed steps to reproduce the bug. Fix Bugs ~~~~~~~~ Look through the GitHub issues for bugs. Anything tagged with "bug" and "help wanted" is open to whoever wants to implement it. Implement Features ~~~~~~~~~~~~~~~~~~ Look through the GitHub issues for features. Anything tagged with "enhancement" and "help wanted" is open to whoever wants to implement it. Write Documentation ~~~~~~~~~~~~~~~~~~~ async_property could always use more documentation, whether as part of the official async_property docs, in docstrings, or even on the web in blog posts, articles, and such. Submit Feedback ~~~~~~~~~~~~~~~ The best way to send feedback is to file an issue at https://github.com/ryananguiano/async_property/issues. If you are proposing a feature: * Explain in detail how it would work. * Keep the scope as narrow as possible, to make it easier to implement. * Remember that this is a volunteer-driven project, and that contributions are welcome :) Get Started! ------------ Ready to contribute? Here's how to set up `async_property` for local development. 1. Fork the `async_property` repo on GitHub. 2. Clone your fork locally:: $ git clone git@github.com:your_name_here/async_property.git 3. Install your local copy into a virtualenv. Assuming you have virtualenvwrapper installed, this is how you set up your fork for local development:: $ mkvirtualenv async_property $ cd async_property/ $ python setup.py develop 4. Create a branch for local development:: $ git checkout -b name-of-your-bugfix-or-feature Now you can make your changes locally. 5. When you're done making changes, check that your changes pass flake8 and the tests, including testing other Python versions with tox:: $ flake8 async_property tests $ python setup.py test or py.test $ tox To get flake8 and tox, just pip install them into your virtualenv. 6. Commit your changes and push your branch to GitHub:: $ git add . $ git commit -m "Your detailed description of your changes." $ git push origin name-of-your-bugfix-or-feature 7. Submit a pull request through the GitHub website. Pull Request Guidelines ----------------------- Before you submit a pull request, check that it meets these guidelines: 1. The pull request should include tests. 2. If the pull request adds functionality, the docs should be updated. Put your new functionality into a function with a docstring, and add the feature to the list in README.rst. 3. The pull request should work for Python 2.7, 3.4, 3.5 and 3.6, and for PyPy. Check https://travis-ci.org/ryananguiano/async_property/pull_requests and make sure that the tests pass for all supported Python versions. Tips ---- To run a subset of tests:: $ py.test tests.test_async_property Deploying --------- A reminder for the maintainers on how to deploy. Make sure all your changes are committed (including an entry in HISTORY.rst). Then run:: $ bumpversion patch # possible: major / minor / patch $ git push $ git push --tags Travis will then deploy to PyPI if tests pass. async_property-0.2.2/HISTORY.rst000066400000000000000000000011431445060143300164660ustar00rootroot00000000000000======= History ======= 0.2.2 (2023-07-03) ------------------ * Add Python 3.11 support and drop Python 3.6. 0.2.1 (2019-04-13) ------------------ * Update docs and readme 0.2.0 (2019-04-12) ------------------ * Use instance state to hold cache and locks 0.1.4 (2019-04-12) ------------------ * Fix inheritance issues on AwaitLoader 0.1.3 (2019-04-12) ------------------ * Cleanup code 0.1.2 (2019-04-12) ------------------ * Fix asyncio.Lock issues 0.1.1 (2019-04-11) ------------------ * Complete test coverage and update readme 0.1.0 (2019-04-11) ------------------ * First release on PyPI. async_property-0.2.2/LICENSE000066400000000000000000000020601445060143300155770ustar00rootroot00000000000000MIT License Copyright (c) 2019, Ryan Anguiano Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. async_property-0.2.2/MANIFEST.in000066400000000000000000000003621445060143300163330ustar00rootroot00000000000000include CONTRIBUTING.rst include HISTORY.rst include LICENSE include README.rst recursive-include tests * recursive-exclude * __pycache__ recursive-exclude * *.py[co] recursive-include docs *.rst conf.py Makefile make.bat *.jpg *.png *.gif async_property-0.2.2/Makefile000066400000000000000000000043411445060143300162360ustar00rootroot00000000000000.PHONY: clean clean-test clean-pyc clean-build docs help .DEFAULT_GOAL := help define BROWSER_PYSCRIPT import os, webbrowser, sys try: from urllib import pathname2url except: from urllib.request import pathname2url webbrowser.open("file://" + pathname2url(os.path.abspath(sys.argv[1]))) endef export BROWSER_PYSCRIPT define PRINT_HELP_PYSCRIPT import re, sys for line in sys.stdin: match = re.match(r'^([a-zA-Z_-]+):.*?## (.*)$$', line) if match: target, help = match.groups() print("%-20s %s" % (target, help)) endef export PRINT_HELP_PYSCRIPT BROWSER := python -c "$$BROWSER_PYSCRIPT" help: @python -c "$$PRINT_HELP_PYSCRIPT" < $(MAKEFILE_LIST) clean: clean-build clean-pyc clean-test ## remove all build, test, coverage and Python artifacts clean-build: ## remove build artifacts rm -fr build/ rm -fr dist/ rm -fr .eggs/ find . -name '*.egg-info' -exec rm -fr {} + find . -name '*.egg' -exec rm -f {} + clean-pyc: ## remove Python file artifacts find . -name '*.pyc' -exec rm -f {} + find . -name '*.pyo' -exec rm -f {} + find . -name '*~' -exec rm -f {} + find . -name '__pycache__' -exec rm -fr {} + clean-test: ## remove test and coverage artifacts rm -fr .tox/ rm -f .coverage rm -fr htmlcov/ rm -fr .pytest_cache lint: ## check style with flake8 flake8 async_property tests test: ## run tests quickly with the default Python py.test test-all: ## run tests on every Python version with tox tox coverage: ## check code coverage quickly with the default Python coverage run --source async_property -m pytest coverage report -m coverage html $(BROWSER) htmlcov/index.html docs: ## generate Sphinx HTML documentation, including API docs rm -f docs/async_property.rst rm -f docs/modules.rst sphinx-apidoc -o docs/ async_property $(MAKE) -C docs clean $(MAKE) -C docs html $(BROWSER) docs/_build/html/index.html servedocs: docs ## compile the docs watching for changes watchmedo shell-command -p '*.rst' -c '$(MAKE) -C docs html' -R -D . release: dist ## package and upload a release twine upload dist/* dist: clean ## builds source and wheel package python setup.py sdist python setup.py bdist_wheel ls -l dist install: clean ## install the package to the active Python's site-packages python setup.py install async_property-0.2.2/Pipfile000066400000000000000000000004211445060143300161040ustar00rootroot00000000000000[[source]] name = "pypi" url = "https://pypi.org/simple" verify_ssl = true [dev-packages] bumpversion = "*" coverage = "*" flake8 = "*" pytest = "*" pytest-asyncio = "*" pytest-runner = "*" sphinx = "*" tox = "*" twine = "*" [packages] [requires] python_version = "3.7" async_property-0.2.2/Pipfile.lock000066400000000000000000001101541445060143300170400ustar00rootroot00000000000000{ "_meta": { "hash": { "sha256": "52185eaf0224c626a4bf98ed35de4e349409a71b5a87ac9cbca6e3788cb74b4d" }, "pipfile-spec": 6, "requires": { "python_version": "3.7" }, "sources": [ { "name": "pypi", "url": "https://pypi.org/simple", "verify_ssl": true } ] }, "default": {}, "develop": { "alabaster": { "hashes": [ "sha256:1ee19aca801bbabb5ba3f5f258e4422dfa86f82f3e9cefb0859b283cdd7f62a3", "sha256:a27a4a084d5e690e16e01e03ad2b2e552c61a65469419b907243193de1a84ae2" ], "markers": "python_version >= '3.6'", "version": "==0.7.13" }, "babel": { "hashes": [ "sha256:b4246fb7677d3b98f501a39d43396d3cafdc8eadb045f4a31be01863f655c610", "sha256:cc2d99999cd01d44420ae725a21c9e3711b3aadc7976d6147f622d8581963455" ], "markers": "python_version >= '3.7'", "version": "==2.12.1" }, "bleach": { "hashes": [ "sha256:1a1a85c1595e07d8db14c5f09f09e6433502c51c595970edc090551f0db99414", "sha256:33c16e3353dbd13028ab4799a0f89a83f113405c766e9c122df8a06f5b85b3f4" ], "markers": "python_version >= '3.7'", "version": "==6.0.0" }, "bump2version": { "hashes": [ "sha256:37f927ea17cde7ae2d7baf832f8e80ce3777624554a653006c9144f8017fe410", "sha256:762cb2bfad61f4ec8e2bdf452c7c267416f8c70dd9ecb1653fd0bbb01fa936e6" ], "markers": "python_version >= '3.5'", "version": "==1.0.1" }, "bumpversion": { "hashes": [ "sha256:4ba55e4080d373f80177b4dabef146c07ce73c7d1377aabf9d3c3ae1f94584a6", "sha256:4eb3267a38194d09f048a2179980bb4803701969bff2c85fa8f6d1ce050be15e" ], "index": "pypi", "version": "==0.6.0" }, "certifi": { "hashes": [ "sha256:0f0d56dc5a6ad56fd4ba36484d6cc34451e1c6548c61daad8c320169f91eddc7", "sha256:c6c2e98f5c7869efca1f8916fed228dd91539f9f1b444c314c06eef02980c716" ], "markers": "python_version >= '3.6'", "version": "==2023.5.7" }, "charset-normalizer": { "hashes": [ "sha256:04afa6387e2b282cf78ff3dbce20f0cc071c12dc8f685bd40960cc68644cfea6", "sha256:04eefcee095f58eaabe6dc3cc2262f3bcd776d2c67005880894f447b3f2cb9c1", "sha256:0be65ccf618c1e7ac9b849c315cc2e8a8751d9cfdaa43027d4f6624bd587ab7e", "sha256:0c95f12b74681e9ae127728f7e5409cbbef9cd914d5896ef238cc779b8152373", "sha256:0ca564606d2caafb0abe6d1b5311c2649e8071eb241b2d64e75a0d0065107e62", "sha256:10c93628d7497c81686e8e5e557aafa78f230cd9e77dd0c40032ef90c18f2230", "sha256:11d117e6c63e8f495412d37e7dc2e2fff09c34b2d09dbe2bee3c6229577818be", "sha256:11d3bcb7be35e7b1bba2c23beedac81ee893ac9871d0ba79effc7fc01167db6c", "sha256:12a2b561af122e3d94cdb97fe6fb2bb2b82cef0cdca131646fdb940a1eda04f0", "sha256:12d1a39aa6b8c6f6248bb54550efcc1c38ce0d8096a146638fd4738e42284448", "sha256:1435ae15108b1cb6fffbcea2af3d468683b7afed0169ad718451f8db5d1aff6f", "sha256:1c60b9c202d00052183c9be85e5eaf18a4ada0a47d188a83c8f5c5b23252f649", "sha256:1e8fcdd8f672a1c4fc8d0bd3a2b576b152d2a349782d1eb0f6b8e52e9954731d", "sha256:20064ead0717cf9a73a6d1e779b23d149b53daf971169289ed2ed43a71e8d3b0", "sha256:21fa558996782fc226b529fdd2ed7866c2c6ec91cee82735c98a197fae39f706", "sha256:22908891a380d50738e1f978667536f6c6b526a2064156203d418f4856d6e86a", "sha256:3160a0fd9754aab7d47f95a6b63ab355388d890163eb03b2d2b87ab0a30cfa59", "sha256:322102cdf1ab682ecc7d9b1c5eed4ec59657a65e1c146a0da342b78f4112db23", "sha256:34e0a2f9c370eb95597aae63bf85eb5e96826d81e3dcf88b8886012906f509b5", "sha256:3573d376454d956553c356df45bb824262c397c6e26ce43e8203c4c540ee0acb", "sha256:3747443b6a904001473370d7810aa19c3a180ccd52a7157aacc264a5ac79265e", "sha256:38e812a197bf8e71a59fe55b757a84c1f946d0ac114acafaafaf21667a7e169e", "sha256:3a06f32c9634a8705f4ca9946d667609f52cf130d5548881401f1eb2c39b1e2c", "sha256:3a5fc78f9e3f501a1614a98f7c54d3969f3ad9bba8ba3d9b438c3bc5d047dd28", "sha256:3d9098b479e78c85080c98e1e35ff40b4a31d8953102bb0fd7d1b6f8a2111a3d", "sha256:3dc5b6a8ecfdc5748a7e429782598e4f17ef378e3e272eeb1340ea57c9109f41", "sha256:4155b51ae05ed47199dc5b2a4e62abccb274cee6b01da5b895099b61b1982974", "sha256:49919f8400b5e49e961f320c735388ee686a62327e773fa5b3ce6721f7e785ce", "sha256:53d0a3fa5f8af98a1e261de6a3943ca631c526635eb5817a87a59d9a57ebf48f", "sha256:5f008525e02908b20e04707a4f704cd286d94718f48bb33edddc7d7b584dddc1", "sha256:628c985afb2c7d27a4800bfb609e03985aaecb42f955049957814e0491d4006d", "sha256:65ed923f84a6844de5fd29726b888e58c62820e0769b76565480e1fdc3d062f8", "sha256:6734e606355834f13445b6adc38b53c0fd45f1a56a9ba06c2058f86893ae8017", "sha256:6baf0baf0d5d265fa7944feb9f7451cc316bfe30e8df1a61b1bb08577c554f31", "sha256:6f4f4668e1831850ebcc2fd0b1cd11721947b6dc7c00bf1c6bd3c929ae14f2c7", "sha256:6f5c2e7bc8a4bf7c426599765b1bd33217ec84023033672c1e9a8b35eaeaaaf8", "sha256:6f6c7a8a57e9405cad7485f4c9d3172ae486cfef1344b5ddd8e5239582d7355e", "sha256:7381c66e0561c5757ffe616af869b916c8b4e42b367ab29fedc98481d1e74e14", "sha256:73dc03a6a7e30b7edc5b01b601e53e7fc924b04e1835e8e407c12c037e81adbd", "sha256:74db0052d985cf37fa111828d0dd230776ac99c740e1a758ad99094be4f1803d", "sha256:75f2568b4189dda1c567339b48cba4ac7384accb9c2a7ed655cd86b04055c795", "sha256:78cacd03e79d009d95635e7d6ff12c21eb89b894c354bd2b2ed0b4763373693b", "sha256:80d1543d58bd3d6c271b66abf454d437a438dff01c3e62fdbcd68f2a11310d4b", "sha256:830d2948a5ec37c386d3170c483063798d7879037492540f10a475e3fd6f244b", "sha256:891cf9b48776b5c61c700b55a598621fdb7b1e301a550365571e9624f270c203", "sha256:8f25e17ab3039b05f762b0a55ae0b3632b2e073d9c8fc88e89aca31a6198e88f", "sha256:9a3267620866c9d17b959a84dd0bd2d45719b817245e49371ead79ed4f710d19", "sha256:a04f86f41a8916fe45ac5024ec477f41f886b3c435da2d4e3d2709b22ab02af1", "sha256:aaf53a6cebad0eae578f062c7d462155eada9c172bd8c4d250b8c1d8eb7f916a", "sha256:abc1185d79f47c0a7aaf7e2412a0eb2c03b724581139193d2d82b3ad8cbb00ac", "sha256:ac0aa6cd53ab9a31d397f8303f92c42f534693528fafbdb997c82bae6e477ad9", "sha256:ac3775e3311661d4adace3697a52ac0bab17edd166087d493b52d4f4f553f9f0", "sha256:b06f0d3bf045158d2fb8837c5785fe9ff9b8c93358be64461a1089f5da983137", "sha256:b116502087ce8a6b7a5f1814568ccbd0e9f6cfd99948aa59b0e241dc57cf739f", "sha256:b82fab78e0b1329e183a65260581de4375f619167478dddab510c6c6fb04d9b6", "sha256:bd7163182133c0c7701b25e604cf1611c0d87712e56e88e7ee5d72deab3e76b5", "sha256:c36bcbc0d5174a80d6cccf43a0ecaca44e81d25be4b7f90f0ed7bcfbb5a00909", "sha256:c3af8e0f07399d3176b179f2e2634c3ce9c1301379a6b8c9c9aeecd481da494f", "sha256:c84132a54c750fda57729d1e2599bb598f5fa0344085dbde5003ba429a4798c0", "sha256:cb7b2ab0188829593b9de646545175547a70d9a6e2b63bf2cd87a0a391599324", "sha256:cca4def576f47a09a943666b8f829606bcb17e2bc2d5911a46c8f8da45f56755", "sha256:cf6511efa4801b9b38dc5546d7547d5b5c6ef4b081c60b23e4d941d0eba9cbeb", "sha256:d16fd5252f883eb074ca55cb622bc0bee49b979ae4e8639fff6ca3ff44f9f854", "sha256:d2686f91611f9e17f4548dbf050e75b079bbc2a82be565832bc8ea9047b61c8c", "sha256:d7fc3fca01da18fbabe4625d64bb612b533533ed10045a2ac3dd194bfa656b60", "sha256:dd5653e67b149503c68c4018bf07e42eeed6b4e956b24c00ccdf93ac79cdff84", "sha256:de5695a6f1d8340b12a5d6d4484290ee74d61e467c39ff03b39e30df62cf83a0", "sha256:e0ac8959c929593fee38da1c2b64ee9778733cdf03c482c9ff1d508b6b593b2b", "sha256:e1b25e3ad6c909f398df8921780d6a3d120d8c09466720226fc621605b6f92b1", "sha256:e633940f28c1e913615fd624fcdd72fdba807bf53ea6925d6a588e84e1151531", "sha256:e89df2958e5159b811af9ff0f92614dabf4ff617c03a4c1c6ff53bf1c399e0e1", "sha256:ea9f9c6034ea2d93d9147818f17c2a0860d41b71c38b9ce4d55f21b6f9165a11", "sha256:f645caaf0008bacf349875a974220f1f1da349c5dbe7c4ec93048cdc785a3326", "sha256:f8303414c7b03f794347ad062c0516cee0e15f7a612abd0ce1e25caf6ceb47df", "sha256:fca62a8301b605b954ad2e9c3666f9d97f63872aa4efcae5492baca2056b74ab" ], "markers": "python_full_version >= '3.7.0'", "version": "==3.1.0" }, "coverage": { "hashes": [ "sha256:06a9a2be0b5b576c3f18f1a241f0473575c4a26021b52b2a85263a00f034d51f", "sha256:06fb182e69f33f6cd1d39a6c597294cff3143554b64b9825d1dc69d18cc2fff2", "sha256:0a5f9e1dbd7fbe30196578ca36f3fba75376fb99888c395c5880b355e2875f8a", "sha256:0e1f928eaf5469c11e886fe0885ad2bf1ec606434e79842a879277895a50942a", "sha256:171717c7cb6b453aebac9a2ef603699da237f341b38eebfee9be75d27dc38e01", "sha256:1e9d683426464e4a252bf70c3498756055016f99ddaec3774bf368e76bbe02b6", "sha256:201e7389591af40950a6480bd9edfa8ed04346ff80002cec1a66cac4549c1ad7", "sha256:245167dd26180ab4c91d5e1496a30be4cd721a5cf2abf52974f965f10f11419f", "sha256:2aee274c46590717f38ae5e4650988d1af340fe06167546cc32fe2f58ed05b02", "sha256:2e07b54284e381531c87f785f613b833569c14ecacdcb85d56b25c4622c16c3c", "sha256:31563e97dae5598556600466ad9beea39fb04e0229e61c12eaa206e0aa202063", "sha256:33d6d3ea29d5b3a1a632b3c4e4f4ecae24ef170b0b9ee493883f2df10039959a", "sha256:3d376df58cc111dc8e21e3b6e24606b5bb5dee6024f46a5abca99124b2229ef5", "sha256:419bfd2caae268623dd469eff96d510a920c90928b60f2073d79f8fe2bbc5959", "sha256:48c19d2159d433ccc99e729ceae7d5293fbffa0bdb94952d3579983d1c8c9d97", "sha256:49969a9f7ffa086d973d91cec8d2e31080436ef0fb4a359cae927e742abfaaa6", "sha256:52edc1a60c0d34afa421c9c37078817b2e67a392cab17d97283b64c5833f427f", "sha256:537891ae8ce59ef63d0123f7ac9e2ae0fc8b72c7ccbe5296fec45fd68967b6c9", "sha256:54b896376ab563bd38453cecb813c295cf347cf5906e8b41d340b0321a5433e5", "sha256:58c2ccc2f00ecb51253cbe5d8d7122a34590fac9646a960d1430d5b15321d95f", "sha256:5b7540161790b2f28143191f5f8ec02fb132660ff175b7747b95dcb77ac26562", "sha256:5baa06420f837184130752b7c5ea0808762083bf3487b5038d68b012e5937dbe", "sha256:5e330fc79bd7207e46c7d7fd2bb4af2963f5f635703925543a70b99574b0fea9", "sha256:61b9a528fb348373c433e8966535074b802c7a5d7f23c4f421e6c6e2f1697a6f", "sha256:63426706118b7f5cf6bb6c895dc215d8a418d5952544042c8a2d9fe87fcf09cb", "sha256:6d040ef7c9859bb11dfeb056ff5b3872436e3b5e401817d87a31e1750b9ae2fb", "sha256:6f48351d66575f535669306aa7d6d6f71bc43372473b54a832222803eb956fd1", "sha256:7ee7d9d4822c8acc74a5e26c50604dff824710bc8de424904c0982e25c39c6cb", "sha256:81c13a1fc7468c40f13420732805a4c38a105d89848b7c10af65a90beff25250", "sha256:8d13c64ee2d33eccf7437961b6ea7ad8673e2be040b4f7fd4fd4d4d28d9ccb1e", "sha256:8de8bb0e5ad103888d65abef8bca41ab93721647590a3f740100cd65c3b00511", "sha256:8fa03bce9bfbeeef9f3b160a8bed39a221d82308b4152b27d82d8daa7041fee5", "sha256:924d94291ca674905fe9481f12294eb11f2d3d3fd1adb20314ba89e94f44ed59", "sha256:975d70ab7e3c80a3fe86001d8751f6778905ec723f5b110aed1e450da9d4b7f2", "sha256:976b9c42fb2a43ebf304fa7d4a310e5f16cc99992f33eced91ef6f908bd8f33d", "sha256:9e31cb64d7de6b6f09702bb27c02d1904b3aebfca610c12772452c4e6c21a0d3", "sha256:a342242fe22407f3c17f4b499276a02b01e80f861f1682ad1d95b04018e0c0d4", "sha256:a3d33a6b3eae87ceaefa91ffdc130b5e8536182cd6dfdbfc1aa56b46ff8c86de", "sha256:a895fcc7b15c3fc72beb43cdcbdf0ddb7d2ebc959edac9cef390b0d14f39f8a9", "sha256:afb17f84d56068a7c29f5fa37bfd38d5aba69e3304af08ee94da8ed5b0865833", "sha256:b1c546aca0ca4d028901d825015dc8e4d56aac4b541877690eb76490f1dc8ed0", "sha256:b29019c76039dc3c0fd815c41392a044ce555d9bcdd38b0fb60fb4cd8e475ba9", "sha256:b46517c02ccd08092f4fa99f24c3b83d8f92f739b4657b0f146246a0ca6a831d", "sha256:b7aa5f8a41217360e600da646004f878250a0d6738bcdc11a0a39928d7dc2050", "sha256:b7b4c971f05e6ae490fef852c218b0e79d4e52f79ef0c8475566584a8fb3e01d", "sha256:ba90a9563ba44a72fda2e85302c3abc71c5589cea608ca16c22b9804262aaeb6", "sha256:cb017fd1b2603ef59e374ba2063f593abe0fc45f2ad9abdde5b4d83bd922a353", "sha256:d22656368f0e6189e24722214ed8d66b8022db19d182927b9a248a2a8a2f67eb", "sha256:d2c2db7fd82e9b72937969bceac4d6ca89660db0a0967614ce2481e81a0b771e", "sha256:d39b5b4f2a66ccae8b7263ac3c8170994b65266797fb96cbbfd3fb5b23921db8", "sha256:d62a5c7dad11015c66fbb9d881bc4caa5b12f16292f857842d9d1871595f4495", "sha256:e7d9405291c6928619403db1d10bd07888888ec1abcbd9748fdaa971d7d661b2", "sha256:e84606b74eb7de6ff581a7915e2dab7a28a0517fbe1c9239eb227e1354064dcd", "sha256:eb393e5ebc85245347950143969b241d08b52b88a3dc39479822e073a1a8eb27", "sha256:ebba1cd308ef115925421d3e6a586e655ca5a77b5bf41e02eb0e4562a111f2d1", "sha256:ee57190f24fba796e36bb6d3aa8a8783c643d8fa9760c89f7a98ab5455fbf818", "sha256:f2f67fe12b22cd130d34d0ef79206061bfb5eda52feb6ce0dba0644e20a03cf4", "sha256:f6951407391b639504e3b3be51b7ba5f3528adbf1a8ac3302b687ecababf929e", "sha256:f75f7168ab25dd93110c8a8117a22450c19976afbc44234cbf71481094c1b850", "sha256:fdec9e8cbf13a5bf63290fc6013d216a4c7232efb51548594ca3631a7f13c3a3" ], "index": "pypi", "version": "==7.2.7" }, "distlib": { "hashes": [ "sha256:14bad2d9b04d3a36127ac97f30b12a19268f211063d8f8ee4f47108896e11b46", "sha256:f35c4b692542ca110de7ef0bea44d73981caeb34ca0b9b6b2e6d7790dda8f80e" ], "version": "==0.3.6" }, "docutils": { "hashes": [ "sha256:686577d2e4c32380bb50cbb22f575ed742d58168cee37e99117a854bcd88f125", "sha256:cf316c8370a737a022b72b56874f6602acf974a37a9fba42ec2876387549fc61" ], "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'", "version": "==0.17.1" }, "exceptiongroup": { "hashes": [ "sha256:12c3e887d6485d16943a309616de20ae5582633e0a2eda17f4e10fd61c1e8af5", "sha256:e346e69d186172ca7cf029c8c1d16235aa0e04035e5750b4b95039e65204328f" ], "markers": "python_version < '3.11'", "version": "==1.1.2" }, "filelock": { "hashes": [ "sha256:002740518d8aa59a26b0c76e10fb8c6e15eae825d34b6fdf670333fd7b938d81", "sha256:cbb791cdea2a72f23da6ac5b5269ab0a0d161e9ef0100e653b69049a7706d1ec" ], "markers": "python_version >= '3.7'", "version": "==3.12.2" }, "flake8": { "hashes": [ "sha256:6fbe320aad8d6b95cec8b8e47bc933004678dc63095be98528b7bdd2a9f510db", "sha256:7a1cf6b73744f5806ab95e526f6f0d8c01c66d7bbe349562d22dfca20610b248" ], "index": "pypi", "version": "==5.0.4" }, "idna": { "hashes": [ "sha256:814f528e8dead7d329833b91c5faa87d60bf71824cd12a7530b5526063d02cb4", "sha256:90b77e79eaa3eba6de819a0c442c0b4ceefc341a7a2ab77d7562bf49f425c5c2" ], "markers": "python_version >= '3.5'", "version": "==3.4" }, "imagesize": { "hashes": [ "sha256:0d8d18d08f840c19d0ee7ca1fd82490fdc3729b7ac93f49870406ddde8ef8d8b", "sha256:69150444affb9cb0d5cc5a92b3676f0b2fb7cd9ae39e947a5e11a36b4497cd4a" ], "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", "version": "==1.4.1" }, "importlib-metadata": { "hashes": [ "sha256:057e92c15bc8d9e8109738a48db0ccb31b4d9d5cfbee5a8670879a30be66304b", "sha256:b7e52a1f8dec14a75ea73e0891f3060099ca1d8e6a462a4dff11c3e119ea1b31" ], "markers": "python_version < '3.8'", "version": "==4.2.0" }, "iniconfig": { "hashes": [ "sha256:2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3", "sha256:b6a85871a79d2e3b22d2d1b94ac2824226a63c6b741c88f7ae975f18b6778374" ], "markers": "python_version >= '3.7'", "version": "==2.0.0" }, "jaraco.classes": { "hashes": [ "sha256:2353de3288bc6b82120752201c6b1c1a14b058267fa424ed5ce5984e3b922158", "sha256:89559fa5c1d3c34eff6f631ad80bb21f378dbcbb35dd161fd2c6b93f5be2f98a" ], "markers": "python_version >= '3.7'", "version": "==3.2.3" }, "jinja2": { "hashes": [ "sha256:31351a702a408a9e7595a8fc6150fc3f43bb6bf7e319770cbc0db9df9437e852", "sha256:6088930bfe239f0e6710546ab9c19c9ef35e29792895fed6e6e31a023a182a61" ], "markers": "python_version >= '3.7'", "version": "==3.1.2" }, "keyring": { "hashes": [ "sha256:69732a15cb1433bdfbc3b980a8a36a04878a6cfd7cb99f497b573f31618001c0", "sha256:69b01dd83c42f590250fe7a1f503fc229b14de83857314b1933a3ddbf595c4a5" ], "markers": "python_version >= '3.7'", "version": "==23.9.3" }, "markdown-it-py": { "hashes": [ "sha256:5a35f8d1870171d9acc47b99612dc146129b631baf04970128b568f190d0cc30", "sha256:7c9a5e412688bc771c67432cbfebcdd686c93ce6484913dccf06cb5a0bea35a1" ], "markers": "python_version >= '3.7'", "version": "==2.2.0" }, "markupsafe": { "hashes": [ "sha256:05fb21170423db021895e1ea1e1f3ab3adb85d1c2333cbc2310f2a26bc77272e", "sha256:0a4e4a1aff6c7ac4cd55792abf96c915634c2b97e3cc1c7129578aa68ebd754e", "sha256:10bbfe99883db80bdbaff2dcf681dfc6533a614f700da1287707e8a5d78a8431", "sha256:134da1eca9ec0ae528110ccc9e48041e0828d79f24121a1a146161103c76e686", "sha256:1577735524cdad32f9f694208aa75e422adba74f1baee7551620e43a3141f559", "sha256:1b40069d487e7edb2676d3fbdb2b0829ffa2cd63a2ec26c4938b2d34391b4ecc", "sha256:282c2cb35b5b673bbcadb33a585408104df04f14b2d9b01d4c345a3b92861c2c", "sha256:2c1b19b3aaacc6e57b7e25710ff571c24d6c3613a45e905b1fde04d691b98ee0", "sha256:2ef12179d3a291be237280175b542c07a36e7f60718296278d8593d21ca937d4", "sha256:338ae27d6b8745585f87218a3f23f1512dbf52c26c28e322dbe54bcede54ccb9", "sha256:3c0fae6c3be832a0a0473ac912810b2877c8cb9d76ca48de1ed31e1c68386575", "sha256:3fd4abcb888d15a94f32b75d8fd18ee162ca0c064f35b11134be77050296d6ba", "sha256:42de32b22b6b804f42c5d98be4f7e5e977ecdd9ee9b660fda1a3edf03b11792d", "sha256:504b320cd4b7eff6f968eddf81127112db685e81f7e36e75f9f84f0df46041c3", "sha256:525808b8019e36eb524b8c68acdd63a37e75714eac50e988180b169d64480a00", "sha256:56d9f2ecac662ca1611d183feb03a3fa4406469dafe241673d521dd5ae92a155", "sha256:5bbe06f8eeafd38e5d0a4894ffec89378b6c6a625ff57e3028921f8ff59318ac", "sha256:65c1a9bcdadc6c28eecee2c119465aebff8f7a584dd719facdd9e825ec61ab52", "sha256:68e78619a61ecf91e76aa3e6e8e33fc4894a2bebe93410754bd28fce0a8a4f9f", "sha256:69c0f17e9f5a7afdf2cc9fb2d1ce6aabdb3bafb7f38017c0b77862bcec2bbad8", "sha256:6b2b56950d93e41f33b4223ead100ea0fe11f8e6ee5f641eb753ce4b77a7042b", "sha256:787003c0ddb00500e49a10f2844fac87aa6ce977b90b0feaaf9de23c22508b24", "sha256:7ef3cb2ebbf91e330e3bb937efada0edd9003683db6b57bb108c4001f37a02ea", "sha256:8023faf4e01efadfa183e863fefde0046de576c6f14659e8782065bcece22198", "sha256:8758846a7e80910096950b67071243da3e5a20ed2546e6392603c096778d48e0", "sha256:8afafd99945ead6e075b973fefa56379c5b5c53fd8937dad92c662da5d8fd5ee", "sha256:8c41976a29d078bb235fea9b2ecd3da465df42a562910f9022f1a03107bd02be", "sha256:8e254ae696c88d98da6555f5ace2279cf7cd5b3f52be2b5cf97feafe883b58d2", "sha256:9402b03f1a1b4dc4c19845e5c749e3ab82d5078d16a2a4c2cd2df62d57bb0707", "sha256:962f82a3086483f5e5f64dbad880d31038b698494799b097bc59c2edf392fce6", "sha256:9dcdfd0eaf283af041973bff14a2e143b8bd64e069f4c383416ecd79a81aab58", "sha256:aa7bd130efab1c280bed0f45501b7c8795f9fdbeb02e965371bbef3523627779", "sha256:ab4a0df41e7c16a1392727727e7998a467472d0ad65f3ad5e6e765015df08636", "sha256:ad9e82fb8f09ade1c3e1b996a6337afac2b8b9e365f926f5a61aacc71adc5b3c", "sha256:af598ed32d6ae86f1b747b82783958b1a4ab8f617b06fe68795c7f026abbdcad", "sha256:b076b6226fb84157e3f7c971a47ff3a679d837cf338547532ab866c57930dbee", "sha256:b7ff0f54cb4ff66dd38bebd335a38e2c22c41a8ee45aa608efc890ac3e3931bc", "sha256:bfce63a9e7834b12b87c64d6b155fdd9b3b96191b6bd334bf37db7ff1fe457f2", "sha256:c011a4149cfbcf9f03994ec2edffcb8b1dc2d2aede7ca243746df97a5d41ce48", "sha256:c9c804664ebe8f83a211cace637506669e7890fec1b4195b505c214e50dd4eb7", "sha256:ca379055a47383d02a5400cb0d110cef0a776fc644cda797db0c5696cfd7e18e", "sha256:cb0932dc158471523c9637e807d9bfb93e06a95cbf010f1a38b98623b929ef2b", "sha256:cd0f502fe016460680cd20aaa5a76d241d6f35a1c3350c474bac1273803893fa", "sha256:ceb01949af7121f9fc39f7d27f91be8546f3fb112c608bc4029aef0bab86a2a5", "sha256:d080e0a5eb2529460b30190fcfcc4199bd7f827663f858a226a81bc27beaa97e", "sha256:dd15ff04ffd7e05ffcb7fe79f1b98041b8ea30ae9234aed2a9168b5797c3effb", "sha256:df0be2b576a7abbf737b1575f048c23fb1d769f267ec4358296f31c2479db8f9", "sha256:e09031c87a1e51556fdcb46e5bd4f59dfb743061cf93c4d6831bf894f125eb57", "sha256:e4dd52d80b8c83fdce44e12478ad2e85c64ea965e75d66dbeafb0a3e77308fcc", "sha256:fec21693218efe39aa7f8599346e90c705afa52c5b31ae019b2e57e8f6542bb2" ], "markers": "python_version >= '3.7'", "version": "==2.1.3" }, "mccabe": { "hashes": [ "sha256:348e0240c33b60bbdf4e523192ef919f28cb2c3d7d5c7794f74009290f236325", "sha256:6c2d30ab6be0e4a46919781807b4f0d834ebdd6c6e3dca0bda5a15f863427b6e" ], "markers": "python_version >= '3.6'", "version": "==0.7.0" }, "mdurl": { "hashes": [ "sha256:84008a41e51615a49fc9966191ff91509e3c40b939176e643fd50a5c2196b8f8", "sha256:bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba" ], "markers": "python_version >= '3.7'", "version": "==0.1.2" }, "more-itertools": { "hashes": [ "sha256:cabaa341ad0389ea83c17a94566a53ae4c9d07349861ecb14dc6d0345cf9ac5d", "sha256:d2bc7f02446e86a68911e58ded76d6561eea00cddfb2a91e7019bbb586c799f3" ], "markers": "python_version >= '3.7'", "version": "==9.1.0" }, "packaging": { "hashes": [ "sha256:994793af429502c4ea2ebf6bf664629d07c1a9fe974af92966e4b8d2df7edc61", "sha256:a392980d2b6cffa644431898be54b0045151319d1e7ec34f0cfed48767dd334f" ], "markers": "python_version >= '3.7'", "version": "==23.1" }, "pkginfo": { "hashes": [ "sha256:4b7a555a6d5a22169fcc9cf7bfd78d296b0361adad412a346c1226849af5e546", "sha256:8fd5896e8718a4372f0ea9cc9d96f6417c9b986e23a4d116dda26b62cc29d046" ], "markers": "python_version >= '3.6'", "version": "==1.9.6" }, "platformdirs": { "hashes": [ "sha256:83c8f6d04389165de7c9b6f0c682439697887bca0aa2f1c87ef1826be3584490", "sha256:e1fea1fe471b9ff8332e229df3cb7de4f53eeea4998d3b6bfff542115e998bd2" ], "markers": "python_version >= '3.7'", "version": "==2.6.2" }, "pluggy": { "hashes": [ "sha256:c2fd55a7d7a3863cba1a013e4e2414658b1d07b6bc57b3919e0c63c9abb99849", "sha256:d12f0c4b579b15f5e054301bb226ee85eeeba08ffec228092f8defbaa3a4c4b3" ], "markers": "python_version >= '3.7'", "version": "==1.2.0" }, "py": { "hashes": [ "sha256:51c75c4126074b472f746a24399ad32f6053d1b34b68d2fa41e558e6f4a98719", "sha256:607c53218732647dff4acdfcd50cb62615cedf612e72d1724fb1a0cc6405b378" ], "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'", "version": "==1.11.0" }, "pycodestyle": { "hashes": [ "sha256:2c9607871d58c76354b697b42f5d57e1ada7d261c261efac224b664affdc5785", "sha256:d1735fc58b418fd7c5f658d28d943854f8a849b01a5d0a1e6f3f3fdd0166804b" ], "markers": "python_version >= '3.6'", "version": "==2.9.1" }, "pyflakes": { "hashes": [ "sha256:4579f67d887f804e67edb544428f264b7b24f435b263c4614f384135cea553d2", "sha256:491feb020dca48ccc562a8c0cbe8df07ee13078df59813b83959cbdada312ea3" ], "markers": "python_version >= '3.6'", "version": "==2.5.0" }, "pygments": { "hashes": [ "sha256:8ace4d3c1dd481894b2005f560ead0f9f19ee64fe983366be1a21e171d12775c", "sha256:db2db3deb4b4179f399a09054b023b6a586b76499d36965813c71aa8ed7b5fd1" ], "markers": "python_version >= '3.7'", "version": "==2.15.1" }, "pytest": { "hashes": [ "sha256:78bf16451a2eb8c7a2ea98e32dc119fd2aa758f1d5d66dbf0a59d69a3969df32", "sha256:b4bf8c45bd59934ed84001ad51e11b4ee40d40a1229d2c79f9c592b0a3f6bd8a" ], "index": "pypi", "version": "==7.4.0" }, "pytest-asyncio": { "hashes": [ "sha256:2b38a496aef56f56b0e87557ec313e11e1ab9276fc3863f6a7be0f1d0e415e1b", "sha256:f2b3366b7cd501a4056858bd39349d5af19742aed2d81660b7998b6341c7eb9c" ], "index": "pypi", "version": "==0.21.0" }, "pytest-runner": { "hashes": [ "sha256:4c059cf11cf4306e369c0f8f703d1eaf8f32fad370f41deb5f007044656aca6b", "sha256:b4d85362ed29b4c348678de797df438f0f0509497ddb8c647096c02a6d87b685" ], "index": "pypi", "version": "==6.0.0" }, "pytz": { "hashes": [ "sha256:1d8ce29db189191fb55338ee6d0387d82ab59f3d00eac103412d64e0ebd0c588", "sha256:a151b3abb88eda1d4e34a9814df37de2a80e301e68ba0fd856fb9b46bfbbbffb" ], "markers": "python_version < '3.9'", "version": "==2023.3" }, "readme-renderer": { "hashes": [ "sha256:cd653186dfc73055656f090f227f5cb22a046d7f71a841dfa305f55c9a513273", "sha256:f67a16caedfa71eef48a31b39708637a6f4664c4394801a7b0d6432d13907343" ], "markers": "python_version >= '3.7'", "version": "==37.3" }, "requests": { "hashes": [ "sha256:58cd2187c01e70e6e26505bca751777aa9f2ee0b7f4300988b709f44e013003f", "sha256:942c5a758f98d790eaed1a29cb6eefc7ffb0d1cf7af05c3d2791656dbd6ad1e1" ], "markers": "python_version >= '3.7'", "version": "==2.31.0" }, "requests-toolbelt": { "hashes": [ "sha256:7681a0a3d047012b5bdc0ee37d7f8f07ebe76ab08caeccfc3921ce23c88d5bc6", "sha256:cccfdd665f0a24fcf4726e690f65639d272bb0637b9b92dfd91a5568ccf6bd06" ], "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", "version": "==1.0.0" }, "rfc3986": { "hashes": [ "sha256:50b1502b60e289cb37883f3dfd34532b8873c7de9f49bb546641ce9cbd256ebd", "sha256:97aacf9dbd4bfd829baad6e6309fa6573aaf1be3f6fa735c8ab05e46cecb261c" ], "markers": "python_version >= '3.7'", "version": "==2.0.0" }, "rich": { "hashes": [ "sha256:8f87bc7ee54675732fa66a05ebfe489e27264caeeff3728c945d25971b6485ec", "sha256:d653d6bccede5844304c605d5aac802c7cf9621efd700b46c7ec2b51ea914898" ], "markers": "python_full_version >= '3.7.0'", "version": "==13.4.2" }, "setuptools": { "hashes": [ "sha256:11e52c67415a381d10d6b462ced9cfb97066179f0e871399e006c4ab101fc85f", "sha256:baf1fdb41c6da4cd2eae722e135500da913332ab3f2f5c7d33af9b492acb5235" ], "markers": "python_version >= '3.7'", "version": "==68.0.0" }, "six": { "hashes": [ "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926", "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254" ], "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2'", "version": "==1.16.0" }, "snowballstemmer": { "hashes": [ "sha256:09b16deb8547d3412ad7b590689584cd0fe25ec8db3be37788be3810cbf19cb1", "sha256:c8e1716e83cc398ae16824e5572ae04e0d9fc2c6b985fb0f900f5f0c96ecba1a" ], "version": "==2.2.0" }, "sphinx": { "hashes": [ "sha256:0a8836751a68306b3fe97ecbe44db786f8479c3bf4b80e3a7f5c838657b4698c", "sha256:6a11ea5dd0bdb197f9c2abc2e0ce73e01340464feaece525e64036546d24c851" ], "index": "pypi", "version": "==4.3.2" }, "sphinxcontrib-applehelp": { "hashes": [ "sha256:806111e5e962be97c29ec4c1e7fe277bfd19e9652fb1a4392105b43e01af885a", "sha256:a072735ec80e7675e3f432fcae8610ecf509c5f1869d17e2eecff44389cdbc58" ], "markers": "python_version >= '3.5'", "version": "==1.0.2" }, "sphinxcontrib-devhelp": { "hashes": [ "sha256:8165223f9a335cc1af7ffe1ed31d2871f325254c0423bc0c4c7cd1c1e4734a2e", "sha256:ff7f1afa7b9642e7060379360a67e9c41e8f3121f2ce9164266f61b9f4b338e4" ], "markers": "python_version >= '3.5'", "version": "==1.0.2" }, "sphinxcontrib-htmlhelp": { "hashes": [ "sha256:d412243dfb797ae3ec2b59eca0e52dac12e75a241bf0e4eb861e450d06c6ed07", "sha256:f5f8bb2d0d629f398bf47d0d69c07bc13b65f75a81ad9e2f71a63d4b7a2f6db2" ], "markers": "python_version >= '3.6'", "version": "==2.0.0" }, "sphinxcontrib-jsmath": { "hashes": [ "sha256:2ec2eaebfb78f3f2078e73666b1415417a116cc848b72e5172e596c871103178", "sha256:a9925e4a4587247ed2191a22df5f6970656cb8ca2bd6284309578f2153e0c4b8" ], "markers": "python_version >= '3.5'", "version": "==1.0.1" }, "sphinxcontrib-qthelp": { "hashes": [ "sha256:4c33767ee058b70dba89a6fc5c1892c0d57a54be67ddd3e7875a18d14cba5a72", "sha256:bd9fc24bcb748a8d51fd4ecaade681350aa63009a347a8c14e637895444dfab6" ], "markers": "python_version >= '3.5'", "version": "==1.0.3" }, "sphinxcontrib-serializinghtml": { "hashes": [ "sha256:352a9a00ae864471d3a7ead8d7d79f5fc0b57e8b3f95e9867eb9eb28999b92fd", "sha256:aa5f6de5dfdf809ef505c4895e51ef5c9eac17d0f287933eb49ec495280b6952" ], "markers": "python_version >= '3.5'", "version": "==1.1.5" }, "tomli": { "hashes": [ "sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc", "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f" ], "markers": "python_version < '3.11'", "version": "==2.0.1" }, "tox": { "hashes": [ "sha256:57b5ab7e8bb3074edc3c0c0b4b192a4f3799d3723b2c5b76f1fa9f2d40316eea", "sha256:d0d28f3fe6d6d7195c27f8b054c3e99d5451952b54abdae673b71609a581f640" ], "index": "pypi", "version": "==3.28.0" }, "twine": { "hashes": [ "sha256:929bc3c280033347a00f847236564d1c52a3e61b1ac2516c97c48f3ceab756d8", "sha256:9e102ef5fdd5a20661eb88fad46338806c3bd32cf1db729603fe3697b1bc83c8" ], "index": "pypi", "version": "==4.0.2" }, "typing-extensions": { "hashes": [ "sha256:440d5dd3af93b060174bf433bccd69b0babc3b15b1a8dca43789fd7f61514b36", "sha256:b75ddc264f0ba5615db7ba217daeb99701ad295353c45f9e95963337ceeeffb2" ], "markers": "python_version < '3.8'", "version": "==4.7.1" }, "urllib3": { "hashes": [ "sha256:48e7fafa40319d358848e1bc6809b208340fafe2096f1725d05d67443d0483d1", "sha256:bee28b5e56addb8226c96f7f13ac28cb4c301dd5ea8a6ca179c0b9835e032825" ], "markers": "python_version >= '3.7'", "version": "==2.0.3" }, "virtualenv": { "hashes": [ "sha256:0ef5be6d07181946891f5abc8047fda8bc2f0b4b9bf222c64e6e8963baee76db", "sha256:635b272a8e2f77cb051946f46c60a54ace3cb5e25568228bd6b57fc70eca9ff3" ], "markers": "python_version >= '3.6'", "version": "==20.16.2" }, "webencodings": { "hashes": [ "sha256:a0af1213f3c2226497a97e2b3aa01a7e4bee4f403f95be16fc9acd2947514a78", "sha256:b36a1c245f2d304965eb4e0a82848379241dc04b865afcc4aab16748587e1923" ], "version": "==0.5.1" }, "zipp": { "hashes": [ "sha256:112929ad649da941c23de50f356a2b5570c954b65150642bccdd66bf194d224b", "sha256:48904fc76a60e542af151aded95726c1a5c34ed43ab4134b597665c86d7ad556" ], "markers": "python_version >= '3.7'", "version": "==3.15.0" } } } async_property-0.2.2/README.rst000066400000000000000000000073701445060143300162720ustar00rootroot00000000000000============== async_property ============== .. image:: https://img.shields.io/pypi/v/async_property.svg :target: https://pypi.org/project/async-property/ .. image:: https://app.travis-ci.com/ryananguiano/async_property.svg?branch=master :target: https://app.travis-ci.com/github/ryananguiano/async_property .. image:: https://readthedocs.org/projects/async-property/badge/?version=latest :target: https://async-property.readthedocs.io/en/latest/?badge=latest :alt: Documentation Status .. image:: https://pyup.io/repos/github/ryananguiano/async_property/shield.svg :target: https://pyup.io/repos/github/ryananguiano/async_property/ :alt: Updates Python decorator for async properties. * Python: 3.7+ * Free software: MIT license * Documentation: https://async-property.readthedocs.io * Package: https://pypi.org/project/async-property * Source code: https://github.com/ryananguiano/async_property Install ------- To install async_property, run this command in your terminal: .. code-block:: console $ pip install async-property Or if you have pipenv: .. code-block:: console $ pipenv install async-property Usage ----- You can use ``@async_property`` just as you would with ``@property``, but on an async function. .. code-block:: python class Foo: @async_property async def remote_value(self): return await get_remote_value() The property ``remote_value`` now returns an awaitable coroutine. .. code-block:: python instance = Foo() await instance.remote_value Cached Properties ~~~~~~~~~~~~~~~~~ ``@async_cached_property`` will call the function only once. Subsequent awaits to the property will return a cached value. .. code-block:: python class Foo: @async_cached_property async def value(self): print('loading value') return 123 >>> instance = Foo() >>> instance.value >>> await instance.value loading value 123 >>> await instance.value 123 >>> instance.value 123 >>> instance.value = 'abc' >>> instance.value 'abc' >>> await instance.value 'abc' >>> del instance.value >>> await instance.value loading value 123 AwaitLoader ~~~~~~~~~~~ If you have an object with multiple cached properties, you can subclass ``AwaitLoader``. This will make your class instances awaitable and will load all ``@async_cached_property`` fields concurrently. ``AwaitLoader`` will call ``await instance.load()``, if it exists, before loading properties. .. code-block:: python class Foo(AwaitLoader): async def load(self): print('load called') @async_cached_property async def db_lookup(self): return 'success' @async_cached_property async def api_call(self): print('calling api') return 'works every time' >>> instance = await Foo() load called calling api >>> instance.db_lookup 'success' >>> instance.api_call 'works every time' Features -------- * Both regular and cached property. * Cached properties can be accessed multiple times without repeating function call. * Uses asyncio.Lock to ensure cached functions are called only once. * Full test coverage with py.test Credits ------- This package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template. .. _Cookiecutter: https://github.com/audreyr/cookiecutter .. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage The ObjectProxy_ class was taken from wrapt_ library by Graham Dumpleton. .. _ObjectProxy: https://github.com/GrahamDumpleton/wrapt/blob/master/src/wrapt/wrappers.py .. _wrapt: https://github.com/GrahamDumpleton/wrapt async_property-0.2.2/async_property/000077500000000000000000000000001445060143300176555ustar00rootroot00000000000000async_property-0.2.2/async_property/__init__.py000066400000000000000000000005031445060143300217640ustar00rootroot00000000000000__author__ = """Ryan Anguiano""" __email__ = 'ryan.anguiano@gmail.com' __version__ = '0.2.2' from .base import async_property from .cached import async_cached_property from .loader import AwaitLoader from .proxy import AwaitableOnly __all__ = ['async_property', 'async_cached_property', 'AwaitLoader', 'AwaitableOnly'] async_property-0.2.2/async_property/base.py000066400000000000000000000023771445060143300211520ustar00rootroot00000000000000import asyncio import functools from async_property.proxy import AwaitableOnly is_coroutine = asyncio.iscoroutinefunction def async_property(func, *args, **kwargs): assert is_coroutine(func), 'Can only use with async def' return AsyncPropertyDescriptor(func, *args, **kwargs) class AsyncPropertyDescriptor: def __init__(self, _fget, field_name=None): self._fget = _fget self.field_name = field_name or _fget.__name__ functools.update_wrapper(self, _fget) def __set_name__(self, owner, name): self.field_name = name def __get__(self, instance, owner): if instance is None: return self return self.awaitable_only(instance) def __set__(self, instance, value): raise ValueError(INVALID_ACTION.format('set')) def __delete__(self, instance): raise ValueError(INVALID_ACTION.format('delete')) def get_loader(self, instance): @functools.wraps(self._fget) async def get_value(): return await self._fget(instance) return get_value def awaitable_only(self, instance): return AwaitableOnly(self.get_loader(instance)) INVALID_ACTION = 'Cannot {} @async_property. ' \ 'Use @async_cached_property instead.' async_property-0.2.2/async_property/cached.py000066400000000000000000000075541445060143300214510ustar00rootroot00000000000000import asyncio import functools from collections import defaultdict from async_property.proxy import AwaitableOnly, AwaitableProxy is_coroutine = asyncio.iscoroutinefunction ASYNC_PROPERTY_ATTR = '__async_property__' def async_cached_property(func, *args, **kwargs): assert is_coroutine(func), 'Can only use with async def' return AsyncCachedPropertyDescriptor(func, *args, **kwargs) class AsyncCachedPropertyInstanceState: def __init__(self): self.cache = {} self.lock = defaultdict(asyncio.Lock) __slots__ = 'cache', 'lock' class AsyncCachedPropertyDescriptor: def __init__(self, _fget, _fset=None, _fdel=None, field_name=None): self._fget = _fget self._fset = _fset self._fdel = _fdel self.field_name = field_name or _fget.__name__ functools.update_wrapper(self, _fget) self._check_method_sync(_fset, 'setter') self._check_method_sync(_fdel, 'deleter') def __set_name__(self, owner, name): self.field_name = name def __get__(self, instance, owner): if instance is None: return self if self.has_cache_value(instance): return self.already_loaded(instance) return self.not_loaded(instance) def __set__(self, instance, value): if self._fset is not None: self._fset(instance, value) self.set_cache_value(instance, value) def __delete__(self, instance): if self._fdel is not None: self._fdel(instance) self.del_cache_value(instance) def setter(self, method): self._check_method_name(method, 'setter') return type(self)(self._fget, method, self._fdel, self.field_name) def deleter(self, method): self._check_method_name(method, 'deleter') return type(self)(self._fget, self._fset, method, self.field_name) def _check_method_name(self, method, method_type): if method.__name__ != self.field_name: raise AssertionError( f'@{self.field_name}.{method_type} name must match property name' ) def _check_method_sync(self, method, method_type): if method and is_coroutine(method): raise AssertionError( f'@{self.field_name}.{method_type} must be synchronous' ) def get_instance_state(self, instance): try: return getattr(instance, ASYNC_PROPERTY_ATTR) except AttributeError: state = AsyncCachedPropertyInstanceState() object.__setattr__(instance, ASYNC_PROPERTY_ATTR, state) return state def get_lock(self, instance): lock = self.get_instance_state(instance).lock return lock[self.field_name] def get_cache(self, instance): return self.get_instance_state(instance).cache def has_cache_value(self, instance): cache = self.get_cache(instance) return self.field_name in cache def get_cache_value(self, instance): cache = self.get_cache(instance) return cache[self.field_name] def set_cache_value(self, instance, value): cache = self.get_cache(instance) cache[self.field_name] = value def del_cache_value(self, instance): cache = self.get_cache(instance) del cache[self.field_name] def get_loader(self, instance): @functools.wraps(self._fget) async def load_value(): async with self.get_lock(instance): if self.has_cache_value(instance): return self.get_cache_value(instance) value = await self._fget(instance) self.__set__(instance, value) return value return load_value def already_loaded(self, instance): return AwaitableProxy(self.get_cache_value(instance)) def not_loaded(self, instance): return AwaitableOnly(self.get_loader(instance)) async_property-0.2.2/async_property/loader.py000066400000000000000000000025661445060143300215060ustar00rootroot00000000000000import asyncio from async_property.cached import AsyncCachedPropertyDescriptor is_coroutine = asyncio.iscoroutinefunction AWAIT_LOADER_ATTR = '_async_property_loaders' def get_loaders(instance): return getattr(instance, AWAIT_LOADER_ATTR, ()) class AwaitLoaderMeta(type): def __new__(mcs, name, bases, attrs) -> type: loaders = {} for key, value in attrs.items(): if isinstance(value, AsyncCachedPropertyDescriptor): loaders[key] = value.get_loader for base in reversed(bases): for field, get_loader in get_loaders(base): if field not in loaders: loaders[field] = get_loader attrs[AWAIT_LOADER_ATTR] = tuple(loaders.items()) return super().__new__(mcs, name, bases, attrs) class AwaitLoader(metaclass=AwaitLoaderMeta): def __await__(self): return self._load().__await__() async def _load(self): """ Calls overridable async load method and then calls async property loaders """ if hasattr(self, 'load') and is_coroutine(self.load): await self.load() loaders = get_loaders(self) if loaders: await asyncio.wait([ asyncio.create_task(get_loader(self)()) for field, get_loader in loaders ]) return self async_property-0.2.2/async_property/proxy.py000066400000000000000000000313441445060143300214150ustar00rootroot00000000000000 class AwaitableOnly: """This wraps a coroutine will call it on await.""" def __init__(self, coro): object.__setattr__(self, '_coro', coro) def __repr__(self): return f'' def __await__(self): return self._coro().__await__() __slots__ = ['_coro'] """Below taken from: https://github.com/GrahamDumpleton/wrapt/blob/master/src/wrapt/wrappers.py Copyright (c) 2013-2019, Graham Dumpleton All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. """ import operator class _ObjectProxyMethods(object): # We use properties to override the values of __module__ and # __doc__. If we add these in ObjectProxy, the derived class # __dict__ will still be setup to have string variants of these # attributes and the rules of descriptors means that they appear to # take precedence over the properties in the base class. To avoid # that, we copy the properties into the derived class type itself # via a meta class. In that way the properties will always take # precedence. @property def __module__(self): return self.__wrapped__.__module__ @__module__.setter def __module__(self, value): self.__wrapped__.__module__ = value @property def __doc__(self): return self.__wrapped__.__doc__ @__doc__.setter def __doc__(self, value): self.__wrapped__.__doc__ = value # We similar use a property for __dict__. We need __dict__ to be # explicit to ensure that vars() works as expected. @property def __dict__(self): return self.__wrapped__.__dict__ # Need to also propagate the special __weakref__ attribute for case # where decorating classes which will define this. If do not define # it and use a function like inspect.getmembers() on a decorator # class it will fail. This can't be in the derived classes. @property def __weakref__(self): return self.__wrapped__.__weakref__ class _ObjectProxyMetaType(type): def __new__(cls, name, bases, dictionary): # Copy our special properties into the class so that they # always take precedence over attributes of the same name added # during construction of a derived class. This is to save # duplicating the implementation for them in all derived classes. dictionary.update(vars(_ObjectProxyMethods)) return type.__new__(cls, name, bases, dictionary) class ObjectProxy(metaclass=_ObjectProxyMetaType): __slots__ = '__wrapped__' def __init__(self, wrapped): object.__setattr__(self, '__wrapped__', wrapped) # Python 3.2+ has the __qualname__ attribute, but it does not # allow it to be overridden using a property and it must instead # be an actual string object instead. try: object.__setattr__(self, '__qualname__', wrapped.__qualname__) except AttributeError: pass @property def __name__(self): return self.__wrapped__.__name__ @__name__.setter def __name__(self, value): self.__wrapped__.__name__ = value @property def __class__(self): return self.__wrapped__.__class__ @__class__.setter def __class__(self, value): self.__wrapped__.__class__ = value @property def __annotations__(self): return self.__wrapped__.__annotations__ @__annotations__.setter def __annotations__(self, value): self.__wrapped__.__annotations__ = value def __dir__(self): return dir(self.__wrapped__) def __str__(self): return str(self.__wrapped__) def __bytes__(self): return bytes(self.__wrapped__) def __repr__(self): return '<{} at 0x{:x} for {} at 0x{:x}>'.format( type(self).__name__, id(self), type(self.__wrapped__).__name__, id(self.__wrapped__)) def __reversed__(self): return reversed(self.__wrapped__) def __round__(self): return round(self.__wrapped__) def __lt__(self, other): return self.__wrapped__ < other def __le__(self, other): return self.__wrapped__ <= other def __eq__(self, other): return self.__wrapped__ == other def __ne__(self, other): return self.__wrapped__ != other def __gt__(self, other): return self.__wrapped__ > other def __ge__(self, other): return self.__wrapped__ >= other def __hash__(self): return hash(self.__wrapped__) def __bool__(self): return bool(self.__wrapped__) def __setattr__(self, name, value): if name.startswith('_self_'): object.__setattr__(self, name, value) elif name == '__wrapped__': object.__setattr__(self, name, value) try: object.__delattr__(self, '__qualname__') except AttributeError: pass try: object.__setattr__(self, '__qualname__', value.__qualname__) except AttributeError: pass elif name == '__qualname__': setattr(self.__wrapped__, name, value) object.__setattr__(self, name, value) elif hasattr(type(self), name): object.__setattr__(self, name, value) else: setattr(self.__wrapped__, name, value) def __getattr__(self, name): # If we are being to lookup '__wrapped__' then the # '__init__()' method cannot have been called. if name == '__wrapped__': raise ValueError('wrapper has not been initialised') return getattr(self.__wrapped__, name) def __delattr__(self, name): if name.startswith('_self_'): object.__delattr__(self, name) elif name == '__wrapped__': raise TypeError('__wrapped__ must be an object') elif name == '__qualname__': object.__delattr__(self, name) delattr(self.__wrapped__, name) elif hasattr(type(self), name): object.__delattr__(self, name) else: delattr(self.__wrapped__, name) def __add__(self, other): return self.__wrapped__ + other def __sub__(self, other): return self.__wrapped__ - other def __mul__(self, other): return self.__wrapped__ * other def __truediv__(self, other): return operator.truediv(self.__wrapped__, other) def __floordiv__(self, other): return self.__wrapped__ // other def __mod__(self, other): return self.__wrapped__ % other def __divmod__(self, other): return divmod(self.__wrapped__, other) def __pow__(self, other, *args): return pow(self.__wrapped__, other, *args) def __lshift__(self, other): return self.__wrapped__ << other def __rshift__(self, other): return self.__wrapped__ >> other def __and__(self, other): return self.__wrapped__ & other def __xor__(self, other): return self.__wrapped__ ^ other def __or__(self, other): return self.__wrapped__ | other def __radd__(self, other): return other + self.__wrapped__ def __rsub__(self, other): return other - self.__wrapped__ def __rmul__(self, other): return other * self.__wrapped__ def __rtruediv__(self, other): return operator.truediv(other, self.__wrapped__) def __rfloordiv__(self, other): return other // self.__wrapped__ def __rmod__(self, other): return other % self.__wrapped__ def __rdivmod__(self, other): return divmod(other, self.__wrapped__) def __rpow__(self, other, *args): return pow(other, self.__wrapped__, *args) def __rlshift__(self, other): return other << self.__wrapped__ def __rrshift__(self, other): return other >> self.__wrapped__ def __rand__(self, other): return other & self.__wrapped__ def __rxor__(self, other): return other ^ self.__wrapped__ def __ror__(self, other): return other | self.__wrapped__ def __iadd__(self, other): self.__wrapped__ += other return self def __isub__(self, other): self.__wrapped__ -= other return self def __imul__(self, other): self.__wrapped__ *= other return self def __itruediv__(self, other): self.__wrapped__ = operator.itruediv(self.__wrapped__, other) return self def __ifloordiv__(self, other): self.__wrapped__ //= other return self def __imod__(self, other): self.__wrapped__ %= other return self def __ipow__(self, other): self.__wrapped__ **= other return self def __ilshift__(self, other): self.__wrapped__ <<= other return self def __irshift__(self, other): self.__wrapped__ >>= other return self def __iand__(self, other): self.__wrapped__ &= other return self def __ixor__(self, other): self.__wrapped__ ^= other return self def __ior__(self, other): self.__wrapped__ |= other return self def __neg__(self): return -self.__wrapped__ def __pos__(self): return +self.__wrapped__ def __abs__(self): return abs(self.__wrapped__) def __invert__(self): return ~self.__wrapped__ def __int__(self): return int(self.__wrapped__) def __float__(self): return float(self.__wrapped__) def __complex__(self): return complex(self.__wrapped__) def __oct__(self): return oct(self.__wrapped__) def __hex__(self): return hex(self.__wrapped__) def __index__(self): return operator.index(self.__wrapped__) def __len__(self): return len(self.__wrapped__) def __contains__(self, value): return value in self.__wrapped__ def __getitem__(self, key): return self.__wrapped__[key] def __setitem__(self, key, value): self.__wrapped__[key] = value def __delitem__(self, key): del self.__wrapped__[key] def __getslice__(self, i, j): return self.__wrapped__[i:j] def __setslice__(self, i, j, value): self.__wrapped__[i:j] = value def __delslice__(self, i, j): del self.__wrapped__[i:j] def __enter__(self): return self.__wrapped__.__enter__() def __exit__(self, *args, **kwargs): return self.__wrapped__.__exit__(*args, **kwargs) def __iter__(self): return iter(self.__wrapped__) def __copy__(self): raise NotImplementedError('object proxy must define __copy__()') def __deepcopy__(self, memo): raise NotImplementedError('object proxy must define __deepcopy__()') def __reduce__(self): raise NotImplementedError( 'object proxy must define __reduce_ex__()') def __reduce_ex__(self, protocol): raise NotImplementedError( 'object proxy must define __reduce_ex__()') def __call__(self, *args, **kwargs): return self.__wrapped__(*args, **kwargs) class AwaitableProxy(ObjectProxy): def __await__(self): async def get_wrapped(): return self.__wrapped__ return get_wrapped().__await__() async def __aenter__(self): return await self.__wrapped__.__aenter__() async def __aexit__(self, *args, **kwargs): return await self.__wrapped__.__aexit__(*args, **kwargs) async def __aiter__(self): return await self.__wrapped__.__aiter__() async def __anext__(self): return await self.__wrapped__.__anext__() async_property-0.2.2/docs/000077500000000000000000000000001445060143300155245ustar00rootroot00000000000000async_property-0.2.2/docs/Makefile000066400000000000000000000011471445060143300171670ustar00rootroot00000000000000# Minimal makefile for Sphinx documentation # # You can set these variables from the command line. SPHINXOPTS = SPHINXBUILD = python -msphinx SPHINXPROJ = async_property SOURCEDIR = . BUILDDIR = _build # Put it first so that "make" without argument is like "make help". help: @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) .PHONY: help Makefile # Catch-all target: route all unknown targets to Sphinx using the new # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). %: Makefile @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) async_property-0.2.2/docs/conf.py000077500000000000000000000114471445060143300170350ustar00rootroot00000000000000#!/usr/bin/env python # -*- coding: utf-8 -*- # # async_property documentation build configuration file, created by # sphinx-quickstart on Fri Jun 9 13:47:02 2017. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All configuration values have a default; values that are commented out # serve to show the default. # If extensions (or modules to document with autodoc) are in another # directory, add these directories to sys.path here. If the directory is # relative to the documentation root, use os.path.abspath to make it # absolute, like shown here. # import os import sys sys.path.insert(0, os.path.abspath('..')) import async_property # -- General configuration --------------------------------------------- # If your documentation needs a minimal Sphinx version, state it here. # # needs_sphinx = '1.0' # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones. extensions = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode'] # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] # The suffix(es) of source filenames. # You can specify multiple suffix as a list of string: # # source_suffix = ['.rst', '.md'] source_suffix = '.rst' # The master toctree document. master_doc = 'index' # General information about the project. project = u'async_property' copyright = u"2019, Ryan Anguiano" author = u"Ryan Anguiano" # The version info for the project you're documenting, acts as replacement # for |version| and |release|, also used in various other places throughout # the built documents. # # The short X.Y version. version = async_property.__version__ # The full version, including alpha/beta/rc tags. release = async_property.__version__ # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. # # This is also used if you do content translation via gettext catalogs. # Usually you set "language" from the command line for these cases. language = None # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. # This patterns also effect to html_static_path and html_extra_path exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] # The name of the Pygments (syntax highlighting) style to use. pygments_style = 'sphinx' # If true, `todo` and `todoList` produce output, else they produce nothing. todo_include_todos = False # -- Options for HTML output ------------------------------------------- # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. # html_theme = 'alabaster' # Theme options are theme-specific and customize the look and feel of a # theme further. For a list of options available for each theme, see the # documentation. # # html_theme_options = {} # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". html_static_path = ['_static'] # -- Options for HTMLHelp output --------------------------------------- # Output file base name for HTML help builder. htmlhelp_basename = 'async_propertydoc' # -- Options for LaTeX output ------------------------------------------ latex_elements = { # The paper size ('letterpaper' or 'a4paper'). # # 'papersize': 'letterpaper', # The font size ('10pt', '11pt' or '12pt'). # # 'pointsize': '10pt', # Additional stuff for the LaTeX preamble. # # 'preamble': '', # Latex figure (float) alignment # # 'figure_align': 'htbp', } # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, author, documentclass # [howto, manual, or own class]). latex_documents = [ (master_doc, 'async_property.tex', u'async_property Documentation', u'Ryan Anguiano', 'manual'), ] # -- Options for manual page output ------------------------------------ # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). man_pages = [ (master_doc, 'async_property', u'async_property Documentation', [author], 1) ] # -- Options for Texinfo output ---------------------------------------- # Grouping the document tree into Texinfo files. List of tuples # (source start file, target name, title, author, # dir menu entry, description, category) texinfo_documents = [ (master_doc, 'async_property', u'async_property Documentation', author, 'async_property', 'One line description of project.', 'Miscellaneous'), ] async_property-0.2.2/docs/contributing.rst000066400000000000000000000000411445060143300207600ustar00rootroot00000000000000.. include:: ../CONTRIBUTING.rst async_property-0.2.2/docs/history.rst000066400000000000000000000000341445060143300177540ustar00rootroot00000000000000.. include:: ../HISTORY.rst async_property-0.2.2/docs/index.rst000066400000000000000000000004341445060143300173660ustar00rootroot00000000000000Welcome to async_property's documentation! ========================================== .. toctree:: :maxdepth: 2 :caption: Contents: readme installation contributing history Indices and tables ================== * :ref:`genindex` * :ref:`modindex` * :ref:`search` async_property-0.2.2/docs/installation.rst000066400000000000000000000023711445060143300207620ustar00rootroot00000000000000.. highlight:: shell ============ Installation ============ Stable release -------------- To install async_property, run this command in your terminal: .. code-block:: console $ pip install async-property Or if you have pipenv: .. code-block:: console $ pipenv install async-property This is the preferred method to install async_property, as it will always install the most recent stable release. If you don't have `pip`_ installed, this `Python installation guide`_ can guide you through the process. .. _pip: https://pip.pypa.io .. _Python installation guide: http://docs.python-guide.org/en/latest/starting/installation/ From sources ------------ The sources for async_property can be downloaded from the `Github repo`_. You can either clone the public repository: .. code-block:: console $ git clone git://github.com/ryananguiano/async_property Or download the `tarball`_: .. code-block:: console $ curl -OL https://github.com/ryananguiano/async_property/tarball/master Once you have a copy of the source, you can install it with: .. code-block:: console $ python setup.py install .. _Github repo: https://github.com/ryananguiano/async_property .. _tarball: https://github.com/ryananguiano/async_property/tarball/master async_property-0.2.2/docs/make.bat000066400000000000000000000014101445060143300171250ustar00rootroot00000000000000@ECHO OFF pushd %~dp0 REM Command file for Sphinx documentation if "%SPHINXBUILD%" == "" ( set SPHINXBUILD=python -msphinx ) set SOURCEDIR=. set BUILDDIR=_build set SPHINXPROJ=async_property if "%1" == "" goto help %SPHINXBUILD% >NUL 2>NUL if errorlevel 9009 ( echo. echo.The Sphinx module was not found. Make sure you have Sphinx installed, echo.then set the SPHINXBUILD environment variable to point to the full echo.path of the 'sphinx-build' executable. Alternatively you may add the echo.Sphinx directory to PATH. echo. echo.If you don't have Sphinx installed, grab it from echo.http://sphinx-doc.org/ exit /b 1 ) %SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% goto end :help %SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% :end popd async_property-0.2.2/docs/readme.rst000066400000000000000000000000331445060143300175070ustar00rootroot00000000000000.. include:: ../README.rst async_property-0.2.2/setup.cfg000066400000000000000000000006271445060143300164220ustar00rootroot00000000000000[bumpversion] current_version = 0.2.2 commit = True tag = True [bumpversion:file:setup.py] search = version='{current_version}' replace = version='{new_version}' [bumpversion:file:async_property/__init__.py] search = __version__ = '{current_version}' replace = __version__ = '{new_version}' [bdist_wheel] universal = 1 [flake8] exclude = docs [aliases] test = pytest [tool:pytest] asyncio_mode = auto async_property-0.2.2/setup.py000066400000000000000000000027221445060143300163110ustar00rootroot00000000000000#!/usr/bin/env python """The setup script.""" from setuptools import setup, find_packages with open('README.rst') as readme_file: readme = readme_file.read() with open('HISTORY.rst') as history_file: history = history_file.read() requirements = [] setup_requirements = ['pytest-runner'] test_requirements = ['pytest'] setup( author="Ryan Anguiano", author_email='ryan.anguiano@gmail.com', classifiers=[ 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Natural Language :: English', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: 3.10', 'Programming Language :: Python :: 3.11', 'Topic :: Software Development', 'Topic :: Utilities', ], description="Python decorator for async properties.", install_requires=requirements, license="MIT license", long_description=readme + '\n\n' + history, include_package_data=True, keywords='async_property', name='async_property', packages=find_packages(include=['async_property']), setup_requires=setup_requirements, test_suite='tests', tests_require=test_requirements, url='https://github.com/ryananguiano/async_property', version='0.2.2', zip_safe=False, ) async_property-0.2.2/tests/000077500000000000000000000000001445060143300157365ustar00rootroot00000000000000async_property-0.2.2/tests/__init__.py000066400000000000000000000000001445060143300200350ustar00rootroot00000000000000async_property-0.2.2/tests/test_async_cached_property.py000066400000000000000000000060031445060143300237160ustar00rootroot00000000000000import pytest from async_property import async_cached_property from async_property.cached import AsyncCachedPropertyDescriptor from async_property.proxy import AwaitableOnly, AwaitableProxy pytestmark = pytest.mark.asyncio class MyModel: @async_cached_property async def foo(self) -> str: return 'bar' async def test_descriptor(): assert isinstance(MyModel.foo, AsyncCachedPropertyDescriptor) assert MyModel.foo.__name__ == 'foo' assert MyModel.foo.__annotations__['return'] == str async def test_field(): instance = MyModel() assert isinstance(instance.foo, AwaitableOnly) assert await instance.foo == 'bar' assert 'foo' in instance.__async_property__.cache async def test_awaited_repeated(): instance = MyModel() assert await instance.foo == 'bar' assert isinstance(instance.foo, AwaitableProxy) assert instance.foo == 'bar' assert await instance.foo == 'bar' async def test_default_setter(): instance = MyModel() instance.foo = 'abc' assert 'foo' in instance.__async_property__.cache assert instance.foo == 'abc' async def test_default_deleter(): instance = MyModel() await instance.foo assert 'foo' in instance.__async_property__.cache del instance.foo assert 'foo' not in instance.__async_property__.cache class ModelWithSetterDeleter: @async_cached_property async def foo(self): return 'bar' @foo.setter def foo(self, value): self.bar = '123' @foo.deleter def foo(self): del self.bar async def test_async_property_with_setter(): instance = ModelWithSetterDeleter() instance.foo = 'abc' assert instance.foo == 'abc' assert await instance.foo == 'abc' assert 'foo' in instance.__async_property__.cache assert hasattr(instance, 'bar') assert instance.bar == '123' async def test_async_property_with_deleter(): instance = ModelWithSetterDeleter() await instance.foo assert 'foo' in instance.__async_property__.cache assert hasattr(instance, 'bar') del instance.foo assert 'foo' not in instance.__async_property__.cache assert not hasattr(instance, 'bar') class MyModelWithMultiple: @async_cached_property async def first(self): return 123 @async_cached_property async def second(self): return 456 async def test_multiple_fields(): instance = MyModelWithMultiple() assert await instance.first == 123 assert await instance.second == 456 async def test_bad_setter_name(): with pytest.raises(AssertionError): class BadSetter: @async_cached_property async def foo(self): return True @foo.setter def not_foo(self, value): pass async def test_async_setter(): with pytest.raises(AssertionError): class AsyncSetter: @async_cached_property async def foo(self): return True @foo.setter async def foo(self, value): pass async_property-0.2.2/tests/test_async_property.py000066400000000000000000000022141445060143300224270ustar00rootroot00000000000000import pytest from async_property import async_property from async_property.base import AsyncPropertyDescriptor from async_property.proxy import AwaitableOnly pytestmark = pytest.mark.asyncio class MyModel: @async_property async def foo(self) -> str: return 'bar' async def test_descriptor(): assert isinstance(MyModel.foo, AsyncPropertyDescriptor) assert MyModel.foo.__name__ == 'foo' assert MyModel.foo.__annotations__['return'] == str async def test_property(): instance = MyModel() assert isinstance(instance.foo, AwaitableOnly) assert await instance.foo == 'bar' async def test_multiple_calls(): instance = MyModel() assert await instance.foo == 'bar' assert await instance.foo == 'bar' async def test_setter(): instance = MyModel() with pytest.raises(ValueError): instance.foo = 'abc' async def test_deleter(): instance = MyModel() with pytest.raises(ValueError): del instance.foo async def test_sync_error(): with pytest.raises(AssertionError): class BadModel: @async_property def foo(self): return 'bar' async_property-0.2.2/tests/test_asyncio_lock.py000066400000000000000000000031231445060143300220230ustar00rootroot00000000000000import asyncio import time import pytest from async_property import async_cached_property, AwaitLoader pytestmark = pytest.mark.asyncio class MyModel(AwaitLoader): def __init__(self): self.num_loaded = 0 @async_cached_property async def first(self): await asyncio.sleep(0.1) self.num_loaded += 1 @async_cached_property async def second(self): await asyncio.sleep(0.2) self.num_loaded += 1 @async_cached_property async def third(self): await asyncio.sleep(0.3) self.num_loaded += 1 async def test_is_locking(): start = time.time() instance = MyModel() await asyncio.gather(instance.first, instance.first, instance.first) duration = time.time() - start assert instance.num_loaded == 1 assert 0.1 <= duration < 0.15 async def test_lock_multiple_instances(): start = time.time() instance_one = MyModel() instance_two = MyModel() await asyncio.gather(instance_one.first, instance_two.first) duration = time.time() - start assert 0.1 <= duration < 0.15 async def test_concurrent(): start = time.time() instance = MyModel() await asyncio.gather(instance.first, instance.second, instance.third, instance.first, instance.second, instance.third) duration = time.time() - start assert instance.num_loaded == 3 assert 0.3 <= duration < 0.4 async def test_await_concurrent(): start = time.time() instance = await MyModel() duration = time.time() - start assert instance.num_loaded == 3 assert 0.3 <= duration < 0.4 async_property-0.2.2/tests/test_inheritance.py000066400000000000000000000016761445060143300216520ustar00rootroot00000000000000import pytest from async_property import async_cached_property, AwaitLoader from async_property.loader import get_loaders pytestmark = pytest.mark.asyncio class TestLoaderA(AwaitLoader): @async_cached_property async def foo(self): return True class TestLoaderB(AwaitLoader): @async_cached_property async def bar(self): return False class TestLoader(TestLoaderA, TestLoaderB): @async_cached_property async def abc(self): return 123 @async_cached_property async def foo(self): return False async def test_loaders_exist(): instance = TestLoader() assert len(get_loaders(instance)) == 3 async def test_loader_keys(): instance = TestLoader() assert set(dict(get_loaders(instance))) == {'foo', 'bar', 'abc'} async def test_inherited_value(): instance = await TestLoader() assert instance.foo == False base = await TestLoaderA() assert base.foo == True async_property-0.2.2/tests/test_loader.py000066400000000000000000000023001445060143300206100ustar00rootroot00000000000000import pytest from async_property import async_cached_property, AwaitLoader pytestmark = pytest.mark.asyncio class MyModel(AwaitLoader): @async_cached_property async def foo(self): return 'bar' async def test_empty_instance(): assert await AwaitLoader() async def test_loader(): instance = await MyModel() assert 'foo' in instance.__async_property__.cache assert instance.foo == 'bar' async def test_delayed_field(): instance = MyModel() coro = instance.foo await instance assert instance.foo == 'bar' assert await coro == 'bar' async def test_delayed_field_with_setter(): instance = MyModel() coro = instance.foo await instance assert instance.foo == 'bar' instance.foo = 'abc' assert await coro == 'abc' async def test_empty_instance_loaders(): assert AwaitLoader._async_property_loaders == () async def test_instance_loaders(): assert MyModel._async_property_loaders == ( ('foo', MyModel.foo.get_loader), ) class MyModelWithLoad(AwaitLoader): async def load(self): self.loaded = True async def test_call_load(): instance = await MyModelWithLoad() assert instance.loaded == True async_property-0.2.2/tox.ini000066400000000000000000000007531445060143300161140ustar00rootroot00000000000000[tox] envlist = py311, py310, py39, py38, py37, flake8 [travis] python = 3.11: py311 3.10: py310 3.9: py39 3.8: py38 3.7: py37 [testenv:flake8] basepython = python3.11 deps = pipenv commands = pipenv install --dev --ignore-pipfile pipenv run flake8 --version pipenv run flake8 setup.py async_property docs tests [testenv] setenv = PYTHONPATH = {toxinidir} deps = pipenv commands = pipenv install --dev --ignore-pipfile pipenv run py.test tests