tests |
|
|---|---|
pypi |
Run blockly workspaces directly, without the need to convert it to Python code.
Free software: MIT license
Installation
Currently, you must install the in-development version with (we are not on pypi yet):
pip install blockly-runner
Documentation
To use the project:
from blockly_runner import execute_workspace_merge_all_roots, execute_workspace
# Result will contain all the variable updated to match their new value.
# If you have many block roots, you will get a global result.
result = execute_workspace_merge_all_roots(my_dict_workspace, {"var1": 1, "var2": "Hi"})
# If you have many block roots, you will get a list of result with as many element as you have roots.
results = execute_workspace(my_dict_workspace, {"var1": 1, "var2": "Hi"})
We currently support:
Logic with if, if/else, if/else if, negation, comparison operators, logic operations.
Basic math: create a number variable, basic math operations (+, -, *, /, ^).
Basic text: create a text variable.
Variable management: set a variable, access a variable, change a number variable by a delta.
The following exceptions can be raised:
UndefinedVariable if you try to access a variable before it is defined.
InvalidBlock if we encounter an invalid block. It shouldn’t happen if you pay attention in the interface ;-) And it’s there it’s easier to spot where this error comes from.
Contributions are welcomed to help us go further.
Development
To run all the tests run:
tox
Note, to combine the coverage data from all the tox environments run:
Windows |
set PYTEST_ADDOPTS=--cov-append tox |
|---|---|
Other |
PYTEST_ADDOPTS=--cov-append tox |
Create a new release
You need flit to publish the release.
Bump version in src/blockly_runner/__init__.py.
Update the CHANGELOG.rst.
Commit and push.
Publish the package with flit publish.
Metadata
Release files for blockly_runner 0.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| blockly_runner-0.1.4.tar.gz | 16.1 kB | Without provenance | Details for blockly_runner-0.1.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| blockly_runner-0.1.4-py3-none-any.whl | Python 3 | none | any | Details for blockly_runner-0.1.4-py3-none-any.whl |
Total release size: 22.3 kB
Release files / blockly_runner-0.1.4.tar.gz
| Download URL | blockly_runner-0.1.4.tar.gz |
|---|---|
| Size | 16.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
54166321885749ccc2b81064ce57f36f45b9fb5729a091b411a0f56c3adf5615
|
|
BLAKE2b-256 checksum How to use checksums |
a77a127e8052cad54a051947219432c188e5406f32f656b33335c00293345199
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-requests/2.28.0
|
Release files / blockly_runner-0.1.4-py3-none-any.whl
| Download URL | blockly_runner-0.1.4-py3-none-any.whl |
|---|---|
| Size | 6.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4637cd556db6fdf77d677eddeac1b7e35cf7b7c4320c6054572866d6e4a602ce
|
|
BLAKE2b-256 checksum How to use checksums |
a70c6383d3347d0647611295ef369e33d8548c4205c0e0d76216e1e6c434fda0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-requests/2.28.0
|
Security for blockly_runner 0.1.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.