-
Notifications
You must be signed in to change notification settings - Fork 300
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* cleanup of rst * renaming files * pw.demo docstring * debug docstring * universes * reexporting universes * missing file * reducers * moving files * moving index * rename * . * . * removing unnecessary pages * moving files * . * all the submodules * cleanup * rename sql article * flake8 * broken links * broken links * Update public/website3/content/2.developers/6.tutorials/.json_type/article.py * Update public/website3/content/2.developers/6.tutorials/.json_type/article.py * Update public/website3/content/2.developers/7.showcases/.vectorstore_pipeline/article.py * missing links * broken links * broken links * Update public/website3/content/2.developers/6.tutorials/.json_type/article.py * Update public/website3/content/2.developers/6.tutorials/.json_type/article.py * non-broken index * noprint * redirects * Update public/pathway/python/pathway/asynchronous.py * Update public/pathway/python/pathway/asynchronous.py * Update public/pathway/python/pathway/debug/__init__.py Co-authored-by: Olivier Ruas <[email protected]> * pw.Table --------- Co-authored-by: Olivier Ruas <[email protected]> GitOrigin-RevId: eb0510aca837fdc9b1de299b3cf676995c3206ee
- Loading branch information
1 parent
d4d58f0
commit 6c94762
Showing
9 changed files
with
107 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
# Copyright © 2024 Pathway | ||
""" | ||
Helper methods and classes used along with :py:func:`~pathway.udf_async` and :py:func:`~pathway.AsyncTransformer`. | ||
Typical use: | ||
>>> import pathway as pw | ||
>>> import asyncio | ||
>>> @pw.udf_async(retry_strategy=pw.asynchronous.FixedDelayRetryStrategy(max_retries=5)) | ||
... async def concat(left: str, right: str) -> str: | ||
... await asyncio.sleep(0.1) | ||
... return left+right | ||
>>> t1 = pw.debug.table_from_markdown(''' | ||
... age owner pet | ||
... 10 Alice dog | ||
... 9 Bob dog | ||
... 8 Alice cat | ||
... 7 Bob dog''') | ||
>>> t2 = t1.select(col = concat(t1.owner, t1.pet)) | ||
>>> pw.debug.compute_and_print(t2, include_id=False) | ||
col | ||
Alicecat | ||
Alicedog | ||
Bobdog | ||
Bobdog | ||
""" | ||
|
||
from pathway.internals.asynchronous import ( | ||
AsyncRetryStrategy, | ||
CacheStrategy, | ||
DefaultCache, | ||
ExponentialBackoffRetryStrategy, | ||
FixedDelayRetryStrategy, | ||
NoRetryStrategy, | ||
async_options, | ||
coerce_async, | ||
with_cache_strategy, | ||
with_capacity, | ||
with_retry_strategy, | ||
) | ||
|
||
__all__ = [ | ||
"with_capacity", | ||
"with_retry_strategy", | ||
"with_cache_strategy", | ||
"async_options", | ||
"coerce_async", | ||
"AsyncRetryStrategy", | ||
"NoRetryStrategy", | ||
"ExponentialBackoffRetryStrategy", | ||
"FixedDelayRetryStrategy", | ||
"CacheStrategy", | ||
"DefaultCache", | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters