Skip to main content

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

  1. You can add your dependencies to the app-requrements.txt file.
echo "chardet" >> app-requirements.txt
  1. 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 *
  1. 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.

  1. 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)

Source distribution for lyric-py-worker 0.1.7
File Size Uploaded
lyric_py_worker-0.1.7.tar.gz 10.8 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for lyric-py-worker 0.1.7
File Interpreter ABI Platform
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
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