Chainlit for Amazon Brazil Build
Brazil-compatible version of Chainlit for Amazon's internal build system.
🚀 Quick Start
Prerequisites
- Brazil build system access
uvinstalled (for virtual environment management)
Setup & Build
# 1. Navigate to project
cd /Volumes/workplace/Aki/src/Chainlit
# 2. Create proper virtual environment (CRITICAL for local builds)
uv venv .venv
# 3. Run Brazil build
brazil-build
Publish
-
make sure you update the version
-
run below command (temporarily use public PYPI, need to migrate to internal source)
uv publish build/* --token {PYPI_TOKEN}
✅ Build Status
Production Ready - All issues resolved:
- ✅ Remote Brazil builds: Working
- ✅ Local Brazil builds: Working
- ✅ Python 3.10/3.11 compatibility: Fixed
- ✅ PeruPython integration: Complete
🏗 Architecture
Polyglot Build System:
- Frontend: React/TypeScript (pnpm) → Build assets
- Backend: Python package → Integrate frontend assets
- Output:
amazon_chainlit-2.6.2-py3-none-any.whl(~12MB)
📁 Project Structure
Chainlit/
├── README.md # This guide
├── BRAZIL_BUILD_INTEGRATION.md # Troubleshooting FAQ
├── brazil.ion # Peru package config
├── .venv/ # Virtual environment (create with uv)
├── build-tools/bin/polyglot-build.sh # Main build script
├── third-party-src/
│ ├── backend/ # Python source
│ ├── frontend/ # React frontend
│ └── libs/ # React libraries
└── build/ # Build output
🔧 Development
Local Development Setup
# Virtual environment (required for local Brazil builds)
uv venv .venv
source .venv/bin/activate
# Install development dependencies
cd third-party-src
pnpm install
Build Commands
# Full build (local)
brazil-build
# Clean build
brazil-build clean
# Test individual components
cd third-party-src
pnpm build # Build all frontend components
Testing Your Changes
# 1. Local build test
brazil-build
# 2. Verify artifacts
ls -la build/
# Expected: amazon_chainlit-2.6.2-py3-none-any.whl (~12MB)
⚠️ Critical Setup Requirements
1. Virtual Environment Setup
Must use uv venv .venv - not mkdir .venv
# ✅ Correct
uv venv .venv
# ❌ Wrong - will fail
mkdir .venv
PeruPython expects proper activation scripts at .venv/bin/activate.
2. Build Dependencies
Automatically handled by brazil.ion:
- PeruPython (for virtual environment)
- PeruNPM (for frontend builds)
3. Build Process
- Frontend Build: React components with pnpm
- Backend Build: Python package with PeruPython
- Asset Integration: Frontend → Python package
- Output: Wheel file in
build/
🧪 Verification
Successful Build Output:
=== Build completed successfully! ===
Artifacts available in: /path/to/build
BUILD SUCCEEDED
Expected Artifacts:
build/
├── amazon_chainlit-2.6.2-py3-none-any.whl (~12MB)
└── amazon_chainlit-2.6.2.tar.gz (~12MB)
🆘 Troubleshooting
Having build issues? See BRAZIL_BUILD_INTEGRATION.md for:
- Complete troubleshooting FAQ
- Common error solutions
- Debug commands
- Environment fixes
Quick Fixes
Build failing locally?
# Fix virtual environment
rm -rf .venv
uv venv .venv
brazil-build
PeruPython issues?
# Check availability
which perupy-get-venv
# Should return: /path/to/PeruPython/bin/perupy-get-venv
📚 Additional Resources
- Troubleshooting FAQ - Fix build failures
- Original Chainlit - Upstream documentation
- Brazil Build System - Amazon internal docs
Ready to build! Run brazil-build and expect BUILD SUCCEEDED ✅
Metadata
Release files for chainlit-aki 2.9.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| chainlit_aki-2.9.0-py3-none-any.whl | Python 3 | none | any | Details for chainlit_aki-2.9.0-py3-none-any.whl |
Release files / chainlit_aki-2.9.0-py3-none-any.whl
| Download URL | chainlit_aki-2.9.0-py3-none-any.whl |
|---|---|
| Size | 9.8 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5c8b5b8623fb2bbf47f0dbfc3c5c6a58d3144f9eca1e848e02f3f4c183348950
|
|
BLAKE2b-256 checksum How to use checksums |
f58fed2e50d076496dcf4b597bbf11e9e15fb613d7659ada42560ed40adb49db
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.3
|
Security for chainlit-aki 2.9.0
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.