Skip to main content

Add your description here

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lyric_py_worker-0.1.7rc0.tar.gz (10.8 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lyric_py_worker-0.1.7rc0-py3-none-any.whl (10.9 MB view details)

Uploaded Python 3

File details

Details for the file lyric_py_worker-0.1.7rc0.tar.gz.

File metadata

  • Download URL: lyric_py_worker-0.1.7rc0.tar.gz
  • Upload date:
  • Size: 10.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.16

File hashes

Hashes for lyric_py_worker-0.1.7rc0.tar.gz
Algorithm Hash digest
SHA256 e7e39fa3a231caf680d66cc6c9694bf29ca8b6e5512a66559d27a956b22595ba
MD5 b36a9481c8c00e4b7be2d0aaa2b61ea8
BLAKE2b-256 3023266504f14d149c6e5d073950b55550542b9a0b39b4af43df49e191ff25af

See more details on using hashes here.

File details

Details for the file lyric_py_worker-0.1.7rc0-py3-none-any.whl.

File metadata

File hashes

Hashes for lyric_py_worker-0.1.7rc0-py3-none-any.whl
Algorithm Hash digest
SHA256 357595c8b192239b45b06adee8b7e62964cacadec5d6225bb2a49cd632922f95
MD5 d30827244957c13b1b689a5f29f041eb
BLAKE2b-256 6799a48e5de3c61bb4b4c557a8c2892d26bfe9a08b1de7b7e59606e170ff8860

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page