Skip to main content

ntt-command-service

Library for implementing Command Pattern

Examples

from ntt_command_service import *
from typing import List

fScores: List[float] = []

class AppendDataCommand(ICommand):
    def __init__(self, fScores: List[float], fScore: float):
        self._fScores = fScores
        self._fScore = fScore

    def Execute(self) -> None:
        self._fScores.append(self._fScore)

    def CanExecute(self) -> bool:
        return True

    def Undo(self) -> None:
        self._fScore.pop()

serCommandService = CommandService()
serCommandService.AddCommand(AppendDataCommand(fScores, 3))
# ----> fScores = [3]
serCommandService.AddCommand(AppendDataCommand(fScores, 5))
# ----> fScores = [3, 5]
serCommandService.AddCommand(AppendDataCommand(fScores, 1))
# ----> fScores = [3, 5, 1]
serCommandService.Undo()
# ----> fScores = [3, 5]
serCommandService.Clear()
serCommandService.CanUndo()
# ----> False

Metadata

Release files for ntt-command-service 1.0.4

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

Source distribution (sdist)

Source distribution for ntt-command-service 1.0.4
File Size Uploaded Provenance Actions
ntt-command-service-1.0.4.tar.gz 4.0 kB Without provenance Details for ntt-command-service-1.0.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ntt-command-service 1.0.4
File Interpreter ABI Platform Actions
ntt_command_service-1.0.4-py3-none-any.whl Python 3 none any Details for ntt_command_service-1.0.4-py3-none-any.whl

Total release size: 9.7 kB

Release files / ntt-command-service-1.0.4.tar.gz

Download URL ntt-command-service-1.0.4.tar.gz
Size 4.0 kB
Tags Source
SHA-256 checksum
How to use checksums
a2c6fed89cdfb84c44fd6c2dd3aca9eabe412a6823c676137df27bc01c827d92
BLAKE2b-256 checksum
How to use checksums
e6be485b938b2f24bccfedaf83c573fd1d53df5fd92d057f891ec97263e10198
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.7

Release files / ntt_command_service-1.0.4-py3-none-any.whl

Download URL ntt_command_service-1.0.4-py3-none-any.whl
Size 5.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c35f26a84f7c8f32907ed096677fa46170a1f9f6ce296d3baf2294108f603392
BLAKE2b-256 checksum
How to use checksums
c92a47e0442aa6950c0e63c0cae2296c74e23a402f9a90eef5c3e55a16d4ec1e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.7

Security for ntt-command-service 1.0.4

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.

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