Skip to main content

模拟requests的timeout参数,使任意函数都拥有超时跳出的功能,防止访问超时阻塞影响代码的运行

Project description

安装

pip install with_timeout

使用示例

from with_timeout import with_timeout
@with_timeout(5)
def my_func():
    pass

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

with_timeout-0.0.5.tar.gz (2.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

with_timeout-0.0.5-py3-none-any.whl (3.0 kB view details)

Uploaded Python 3

File details

Details for the file with_timeout-0.0.5.tar.gz.

File metadata

  • Download URL: with_timeout-0.0.5.tar.gz
  • Upload date:
  • Size: 2.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.9

File hashes

Hashes for with_timeout-0.0.5.tar.gz
Algorithm Hash digest
SHA256 7fcf36ecae7ee398663c7399ad7783ed59c15d2b4d0dc7174f5d72ab93c84dd0
MD5 67b3bd1f30da8353b1dc1b5defbdd670
BLAKE2b-256 d4e05e1bc9054a72db454ca2bcca7e842ed9532db4e7eff1d9ade9b8257bcc6b

See more details on using hashes here.

File details

Details for the file with_timeout-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: with_timeout-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 3.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.9

File hashes

Hashes for with_timeout-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 400a19d2fd1cd2508557872533b60f38f52d3d507105c41fe9a2f31bc016c5d1
MD5 90be88e46d376c2aa70823babbd5c0d8
BLAKE2b-256 c5d4d4bfc7c9dc9baa8351216453be1c6c3c5a081264d2fc4d6e6a691d24d5ed

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page