Skip to main content

Developing

Install extras:

python -m pip install .[test] .[lint]

Testing

https://pypi.org/project/tox-pyenv/

Ideas

Parallel States

To model a parallel substate, for example you have a MenuMachine and only in the specific menu SFTPState it is possible to change the SFTPState. The SFTPState would be a substate which lives indipendently (parallel) from the main MenuMachine state, however it can only be changed when being when the MenuMachine is in the SFTPMenu state.

It could look something like:

class SFTPMenu(MenuMachine):
    def enable_sftp(self) -> Prallel(SFTPEnabled):
        pass

    def disable_sftp(self) -> Prallel(SFTPDisabled):
        pass

calling enable_sftp or disable_sftp would not change the main menu state, which would still be in SFTPMenu but the substate would change.

The object carrying the state would probably have multiple attribs, like menustate and sftpstate.

Automatic Transitions

I created this module for automatic transitions, it however only works transparently if there is only one transitions to each state, my current solution is:

class MyState(MyMachine):
    def transition_which_is_not_normal_path(self):
        self.state(MyState,NewState)

which works but is not transparent, better would be something like:

class MyState(MyMachine):
    def transition_which_is_not_normal_path(self) -> NoAutoTrans(NewState):
        self.state(MyState,NewState)

And to have an easier auto transition it would be great to maybe set some key in the Machine to do auto transitions if possible and then:

MyState(stateobj)

would automaticallly transition if it wouldn’t be in the correct state.

Metadata

Release files for taskcontext 0.1.0

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

Source distribution (sdist)

Source distribution for taskcontext 0.1.0
File Size Uploaded Provenance Actions
taskcontext-0.1.0.tar.gz 5.8 kB Without provenance Details for taskcontext-0.1.0.tar.gz

Release files / taskcontext-0.1.0.tar.gz

Download URL taskcontext-0.1.0.tar.gz
Size 5.8 kB
Tags Source
SHA-256 checksum
How to use checksums
0058e6966bdd571f5fc132209efe93ccb67f999af53401c918a96a7687724a7a
BLAKE2b-256 checksum
How to use checksums
bd7eae1d67b130b327a4702d347d5f235b5ae24ec05b0cc48a804d05326a2d0e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.45.0 CPython/3.6.7

Security for taskcontext 0.1.0

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.0 This release

1 release file 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