Realtime webcam streaming and video processing with a FastAPI UI
Project description
Kamera
Kamera streams your webcam in real time and gives you a fast control panel for brightness, rotation, grayscale, mirroring, and filters.
Install
pip install kamera
Run
kamera
Then open http://127.0.0.1:4141.
What is new in v1.0.0
- Refactored backend architecture with explicit camera lifecycle management.
- New API-driven UI state sync and reset workflow.
- Improved stream resilience for temporary camera read failures.
- Improved filter behavior (
edgesnow handles color input safely). - Added automated tests and modern project metadata in
pyproject.toml. - Added
uvworkflow and lockfile for reproducible local development.
Breaking changes in v1.0.0
- Recommended Python version range is now
>=3.10. - JSON API endpoints are now primary:
GET /api/settingsPOST /api/settingsPOST /api/settings/reset
- Legacy
POST /settingsstill works for form clients, but new integrations should migrate to/api/settings.
API
GET /video_feed
Returns an MJPEG stream from the active webcam.
GET /api/settings
Returns current settings:
{
"rotate": 0,
"brightness": 1.0,
"grayscale": false,
"mirror": false,
"filter_name": "none"
}
POST /api/settings
Updates one or more settings.
Example:
curl -X POST http://127.0.0.1:4141/api/settings \
-H "content-type: application/json" \
-d '{"rotate":90,"brightness":1.3,"grayscale":true,"filter_name":"sepia"}'
POST /api/settings/reset
Resets all settings to defaults.
curl -X POST http://127.0.0.1:4141/api/settings/reset
Development with uv
uv sync --extra dev
uv run pytest
uv run kamera
Release checklist
uv sync --extra dev
uv run pytest
uv build
uv run python -m pip install --force-reinstall dist/*.whl
kamera
Publish to PyPI:
uv run twine check dist/*
uv run twine upload dist/*
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file kamera-1.0.0.tar.gz.
File metadata
- Download URL: kamera-1.0.0.tar.gz
- Upload date:
- Size: 11.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f484b53d9c25aa185bede5e1e20055063228ef76bf9a3404d63d2835566644db
|
|
| MD5 |
81df7ed6177c38b04a6b3847e2f222b6
|
|
| BLAKE2b-256 |
23b0107accb04c471419e5beb847b7c7003e44cd0e8b7a60f517396e9153ecec
|
File details
Details for the file kamera-1.0.0-py3-none-any.whl.
File metadata
- Download URL: kamera-1.0.0-py3-none-any.whl
- Upload date:
- Size: 10.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9fc992497a9dd7ff9ead0ff8f86416297a93d070fe584f96a93341dd9e209ede
|
|
| MD5 |
12465bf45cbf03a2c5dac5034fb69373
|
|
| BLAKE2b-256 |
a0d5ae254e87152c05437485582dd1fe62f8f19f682d5fcf3305a6ccbd6dab13
|