lyric-py-worker
A Python worker implementation for the lyric.
It allows you to run your python code in a wasm environment.
Installation
pip install lyric-py-worker
How To Add Your Dependencies
- You can add your dependencies to the
app-requrements.txtfile.
echo "chardet" >> app-requirements.txt
- Import the dependencies
src/worker.py
Modify the src/worker.py file to import your dependencies.
import asyncio
# ...
# Import your dependencies at the top of the file
import chardet
# ...
import shortuuid
from lyric_task.std import *
- Build the worker
make build
After building the worker, you can see the wheel file in the ../dist directory.
ls ../dist/lyric_py_worker-*.whl
../dist/lyric_py_worker-0.1.7rc0-py3-none-any.whl
The output may be like the above.
- Install the worker
You can install your worker using the following command.
pip install --force-reinstall lyric_py_worker-0.1.7rc0-py3-none-any.whl
Make sure to replace the wheel file name with the one you have and the path to the wheel file.
Metadata
Release files for lyric-py-worker 0.1.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| lyric_py_worker-0.1.7.tar.gz | 10.8 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| lyric_py_worker-0.1.7-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 21.7 MB
Release files / lyric_py_worker-0.1.7.tar.gz
| Download URL | lyric_py_worker-0.1.7.tar.gz |
|---|---|
| Size | 10.8 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
06328b3806bddac258fcc81eab444c351d22157839c0f7d2f5ac1a1df5bfe179
|
|
BLAKE2b-256 checksum How to use checksums |
286e674988e462db7e9748688713a8b3e24034848c3a5518f1bbed7f7ec9b183
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.8
|
Release files / lyric_py_worker-0.1.7-py3-none-any.whl
| Download URL | lyric_py_worker-0.1.7-py3-none-any.whl |
|---|---|
| Size | 10.9 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fb2f437bad7638185f1ef182722d449523dd7a518400744dc42a99cb3d8e25a3
|
|
BLAKE2b-256 checksum How to use checksums |
f8c44d68e8d32a5e0876ede77af11c4a10739e47a0688c91eae9194935cec86a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.8
|