Skip to main content

statuses

The Status class represents the status of some event. It is one of either:

  • Failed
  • NotStarted
  • InProgress(progress)
  • Succeeded

Installation

$ pip install statuses

Example

from typing import Iterable

from status import InProgress, Failed, NotStarted, Succeeded

class Report:
    def __init__(self: "Report"):
        self.status = NotStarted()

    def run(self: "Report", foo: str, bar: Iterable[int]):
        if foo == "badstring":
            self.status = Failed()

        for i, b in enumerate(bar):
            self.status = InProgress(i / len(bar) * 100)
            print(self.status)

        self.status = Succeeded()

r = Report()
print(r.status)
r.run("goodstring", range(10))
print(r.status)

Documentation

Ugly looking documentation can be located at docs/index.html.

Release files for statuses 0.5.2

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

Source distribution (sdist)

Source distribution for statuses 0.5.2
File Size Uploaded
statuses-0.5.2.tar.gz 7.5 kB Details

Built distribution (wheel)

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

Total release size: 11.5 kB

Release files / statuses-0.5.2.tar.gz

Download URL statuses-0.5.2.tar.gz
Size 7.5 kB
Tags Source
SHA-256 checksum
How to use checksums
5a19729a12e05a4d1e0fff8ff52c582e2875fea633f11b2c2c662312b28ba380
BLAKE2b-256 checksum
How to use checksums
3ac33f54146c66a1ca46e9698b7e1a2039978819d574651f7ef06f14105458b9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3

Release files / statuses-0.5.2-py3-none-any.whl

Download URL statuses-0.5.2-py3-none-any.whl
Size 4.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c750648e86c4fce81732a5e5c3c3238312cb1dfd74356339aa49e9f411e121ad
BLAKE2b-256 checksum
How to use checksums
4619633b8a4fd907ee2d20f4b858d89cd35428a8ffe67facb41124ec6a307a10
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3

Release history Release notifications | RSS feed

This release

0.5.2 This release

2 release files

0.5.1

2 release files

0.5.0

1 release file

0.4.0

1 release file

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