txinvoke
Run inline callbacks from Twisted as Invoke tasks.
Installation
pip install txinvoke
Example
# -*- coding: utf-8 -*-
# tasks.py
import time
import txmongo
from txinvoke import task_on_callbacks
@task_on_callbacks(name='test_task')
def example(verbose=False):
connection = yield txmongo.MongoConnection()
test_collection = connection.db.test
for x in range(10000):
data = x * time.time()
doc = {'something': data}
yield test_collection.insert(doc, safe=True)
if verbose:
print("Test data '{data}' was inserted".format(data=data))
Caveats
Sorry, but tasks chaining will NOT work currently.
Metadata
Release files for txinvoke 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| txinvoke-0.1.0.tar.gz | 3.9 kB | Without provenance | Details for txinvoke-0.1.0.tar.gz |
Release files / txinvoke-0.1.0.tar.gz
| Download URL | txinvoke-0.1.0.tar.gz |
|---|---|
| Size | 3.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cb75f294a8f3a9febfd2dc917c9966d9e326313a538a2ceded6bbea71be5013f
|
|
BLAKE2b-256 checksum How to use checksums |
f0a089bf19694704a9604f52bb15df8959fceaf80a446a2fa43db1080e1b86d7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for txinvoke 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.