Skip to main content

A package for skipping every k-th iteration

Project description

Use to skip all except every k-th time. e.g. EachK(5) will skip 4 out of 5 times in the loop.

    each5 = EachK(5)
    for _ in range(100):
        if each5:
            # do something, it will be executed every 5th time
            print("Executed every 5th iteration")
            

Useful for logging, debugging, or any other operation that should be performed less often.

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

eachk-0.1.0.tar.gz (1.7 kB view details)

Uploaded Source

Built Distribution

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

eachk-0.1.0-py3-none-any.whl (1.8 kB view details)

Uploaded Python 3

File details

Details for the file eachk-0.1.0.tar.gz.

File metadata

  • Download URL: eachk-0.1.0.tar.gz
  • Upload date:
  • Size: 1.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for eachk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 31312f2d955aca8e8dc1621a9b2742aea64cc60d2fe1a985583e6f116c8aad3c
MD5 559d8be4200371172eeb9db8691fb589
BLAKE2b-256 c82046673a257d6c28dd9e22e37f8b9f58afdd297ab07e93fc6b0f0bf3311a7a

See more details on using hashes here.

File details

Details for the file eachk-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: eachk-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 1.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for eachk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 918397057ac454d3c1c00e9e380fffb1b932f7583b8ac81e8480aac356f721e3
MD5 9ca8b300adee4542b786dbcc0540c2bd
BLAKE2b-256 cdb84e43c904e2c1d389db8b3bebc7f3c3512209a189fd9f0d092a546ef4d894

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