https://github.com/jml/txapply
Tools for combining Twisted Deferreds
https://github.com/jml/txapply
Last synced: 2 months ago
JSON representation
Tools for combining Twisted Deferreds
- Host: GitHub
- URL: https://github.com/jml/txapply
- Owner: jml
- License: other
- Created: 2015-12-30T12:08:12.000Z (over 10 years ago)
- Default Branch: main
- Last Pushed: 2021-01-16T09:59:30.000Z (over 5 years ago)
- Last Synced: 2025-12-26T06:47:53.170Z (6 months ago)
- Language: Python
- Size: 27.3 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# txapply
A little library for calling functions with
[Deferred](https://twistedmatrix.com/documents/current/api/twisted.internet.defer.Deferred.html)
arguments.
## Example
```python
def function(some, name=None):
print('Got {} (name={})'.format(some, name))
return name
def finished(value):
print('Finished: {}'.format(value))
reactor.stop()
result = txapply(function, some_deferred, name=other_deferred)
result.addCallback(finished)
```
## Warning
This is unreleased, unsupported software that makes no claims to backwards
compatibility or correctness.
In particular, I dislike the name `txapply` and am likely to change it.
## License
Copyright (c) Twisted Matrix Laboratories.
Made available under the MIT license. See LICENSE for details.