A Python library easing use of Jordan in your Python code.
Project description
Jordan ?
Jordan project let an executing program being interacted with, from anywhere. Once registered to a Jordan server, a program instance becomes a Jordan client which may emit statuses (such as logs and progress details), and may react to some user action. For example, a Human user may want to trigger an email sending for reporting purpose. Actions are generic, as much as the App GUI. Therefore, you already have an App for your program !
Get started
-
Get a working Jordan server instance
-
Import jordan
from jordan_py import jordan -
In your Python program, register to this server
jordan_instance = jordan.register('<jordan_server_url>')-
Send a status
jordan_instance.send_status('The program is well started.') -
React on received message
while True: if jordan_message = jordan_instance.read_message(): if jordan_message.action_name == 'BREAK_LOOP': break
-
More use cases
Explore samples for details on features like :
- action
- task
- status type
Action
Has a name, and optionally (typed) (defaulted) parameters. e.g.
actions = jordan.with_action('send_email')
.with_parameter('recipient')
.with_parameter('delay', jordan.PARAMETER_TYPE_INT, 0)
.build()
jordan_instance = jordan.register('<jordan_server_url>', 'sample-client-sending-email', actions)
Task
Hierarchy of task/sub-task. The jordan client instance returned by register() function is a root task.
meal_task = dinner_jordan_instance.create_task('meal')
dessert_task = dinner_jordan_instance.create_task('dessert')
meal_task.send_status('Not enough food in storage')
dessert_task.send_status('Dessert is ready')
Status Type
May be easier to understand and analyze statuses (in a client app which allows filtering).
meal_task.send_failure_status('Not enough food in storage')
dessert_task.send_status('Dessert is being prepared')
dessert_task.send_progress(50)
dessert_task.send_success_status('Dessert is ready')
dessert_task.send_typed_status('eaten', 'Dessert has been eaten by Michael')
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file jordan_py-2.0.0.tar.gz.
File metadata
- Download URL: jordan_py-2.0.0.tar.gz
- Upload date:
- Size: 8.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3cc5c0173ab6848351a83cae693b2946bf3376edd2c4db34afeef9fa8bdfb26c
|
|
| MD5 |
112521a07d8a3f389a097247c8e51b1d
|
|
| BLAKE2b-256 |
c2f66df4ffd784614007d84c7e9844fa14a8feafd54d355254634f3e203e8140
|
Provenance
The following attestation bundles were made for jordan_py-2.0.0.tar.gz:
Publisher:
release-library-python.yml on Mara-tech/jordan
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
jordan_py-2.0.0.tar.gz -
Subject digest:
3cc5c0173ab6848351a83cae693b2946bf3376edd2c4db34afeef9fa8bdfb26c - Sigstore transparency entry: 1931520069
- Sigstore integration time:
-
Permalink:
Mara-tech/jordan@ec98a2af71262b7907677b4ce90d450ebc723df8 -
Branch / Tag:
refs/tags/jordan_py/v2.0.0 - Owner: https://github.com/Mara-tech
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-library-python.yml@ec98a2af71262b7907677b4ce90d450ebc723df8 -
Trigger Event:
push
-
Statement type:
File details
Details for the file jordan_py-2.0.0-py3-none-any.whl.
File metadata
- Download URL: jordan_py-2.0.0-py3-none-any.whl
- Upload date:
- Size: 8.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
78967996c587ce1bc13c067a163b8333ceb500dd5490bdc974b1b1098dd0a799
|
|
| MD5 |
57986a11adae7d498d588e5a6614c15d
|
|
| BLAKE2b-256 |
d14e1cae4bcf2c00bb046f6dc1def3fee240d01db9e59200d1bf10d064d2839a
|
Provenance
The following attestation bundles were made for jordan_py-2.0.0-py3-none-any.whl:
Publisher:
release-library-python.yml on Mara-tech/jordan
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
jordan_py-2.0.0-py3-none-any.whl -
Subject digest:
78967996c587ce1bc13c067a163b8333ceb500dd5490bdc974b1b1098dd0a799 - Sigstore transparency entry: 1931520226
- Sigstore integration time:
-
Permalink:
Mara-tech/jordan@ec98a2af71262b7907677b4ce90d450ebc723df8 -
Branch / Tag:
refs/tags/jordan_py/v2.0.0 - Owner: https://github.com/Mara-tech
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-library-python.yml@ec98a2af71262b7907677b4ce90d450ebc723df8 -
Trigger Event:
push
-
Statement type: