Skip to main content

OneStep

Test Package version Supported Python versions
仅需一步,轻松实现分布式异步任务。

Brokers

  • MemoryBroker
  • CronBroker
  • WebHookBroker
  • RabbitMQBroker
  • RedisBroker
  • KafkaBroker

example

from onestep import step, WebHookBroker


# 对外提供一个webhook接口,接收外部的消息
@step(from_broker=WebHookBroker(path="/push"))
def waiting_messages(message):
    print("收到消息:", message)


if __name__ == '__main__':
    step.start(block=True)
from onestep import step, CronBroker


# 每3秒触发一次任务
@step(from_broker=CronBroker("* * * * * */3", a=1))
def cron_task(message):
    assert message.body == {"a": 1}
    return message


if __name__ == '__main__':
    step.start(block=True)

更多例子请参阅:examples

Metadata

Release files for onestep 0.1.73

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for onestep 0.1.73
File Size Uploaded Provenance Actions
onestep-0.1.73.tar.gz 11.5 kB Without provenance Details for onestep-0.1.73.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for onestep 0.1.73
File Interpreter ABI Platform Actions
onestep-0.1.73-py3-none-any.whl Python 3 none any Details for onestep-0.1.73-py3-none-any.whl

Total release size: 27.8 kB

Release files / onestep-0.1.73.tar.gz

Download URL onestep-0.1.73.tar.gz
Size 11.5 kB
Tags Source
SHA-256 checksum
How to use checksums
39e38178b0e94a4d4df4a68e75b6f9e6a72b78a74eafecab8ab99a0bb5b3b031
BLAKE2b-256 checksum
How to use checksums
b571de2207db1f476cfe2dc951e27949a9452bf63e1da8850ee2e42c13a376aa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.4.2 CPython/3.10.10 Linux/5.15.0-1035-azure

Release files / onestep-0.1.73-py3-none-any.whl

Download URL onestep-0.1.73-py3-none-any.whl
Size 16.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
85bae1eb9745b8616b16a511fd0e0d4d06fe5f3c7bb302677fd47d43a11298d0
BLAKE2b-256 checksum
How to use checksums
05ffd400c5c1ad90ce23b5fca991ace83888440a3130fd696c85f60b381e4608
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.4.2 CPython/3.10.10 Linux/5.15.0-1035-azure

Security for onestep 0.1.73

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.

Release history Release notifications | RSS feed

This release

0.1.73 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page