Observed since 21 Oct, 09:46 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
Utilities and standard configurations for creating Streamlit workers in the AIAIAI ecosystem
A Python package that provides utilities and standard configurations for creating Streamlit workers in the AIAIAI ecosystem.
Install using Poetry:
poetry add ai3-workers
Or with pip:
pip install ai3-workers
Create a new worker with minimal boilerplate:
from ai3_workers.core.config import create_worker
# Initialize the worker - must be first line after imports
st = create_worker()
def main():
name = st.text_input("Enter your name")
if st.button("Submit"):
st.write(f"Hello, {name}!")
if __name__ == "__main__":
main()
Recommended project structure for a worker:
my-worker/
├── src/
│ ├── i18n.json # Translations file
│ ├── interface.py # Main worker file
│ └── modules/ # Worker-specific modules
├── pyproject.toml
└── poetry.lock
Add translations in src/i18n.json:
{
"title": {
"en": "My Worker",
"es": "Mi Worker",
"nl": "Mijn Worker"
},
"description": {
"en": "A simple worker example",
"es": "Un ejemplo simple de worker",
"nl": "Een eenvoudig worker voorbeeld"
}
}
The package will automatically load translations and use them for the worker title and description. You can also customize these directly:
st = create_worker(
title="Custom Title",
description="Custom description"
)
The package provides a wrapped version of Streamlit that automatically:
Supported components include:
git clone git@hub.nucleoo.com:aiaiai/ai3-workers.git
poetry install
From your worker directory:
poetry run streamlit run src/interface.py
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 0.1.3 | 4 Dec 2024 | 2 |
This describes our collected data; it is not a security assessment.
Observed since 21 Oct, 09:46 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:dc46de23b98f60f8669d7fdb033985c792dd45a790c6adca6cdece57b3bccb7b