A utility for watching and syncing AWS SAM local development files
Project description
SAM Local Watcher
A utility for watching and syncing AWS SAM local development files.
Overview
SAM Local Watcher monitors your AWS SAM project files and automatically syncs changes to the .aws-sam/build directory. This eliminates the need to rebuild your SAM application after every code change, making local development faster and more efficient.
Installation
pip install sam-local-watcher
Usage
Command Line
# Watch the current directory using the default template.yaml
sam-watcher
# Watch a specific directory
sam-watcher --path /path/to/sam/project
# Use a different template file
sam-watcher --template sam-template.yaml
Python API
from sam_local_watcher import watch_folder
# Watch the current directory
watch_folder(".", "template.yaml")
# Watch a specific directory with a custom template
watch_folder("/path/to/sam/project", "/path/to/template.yaml")
How It Works
- SAM Local Watcher parses your SAM template to identify all Lambda functions
- It creates a mapping between your source code directories and the corresponding functions
- When a file is modified, it automatically copies the changes to the appropriate location in the
.aws-sam/builddirectory
Supported File Types
Currently, the watcher syncs files with the following extensions:
.py(Python).js(JavaScript).json(JSON).txt(Text)
License
MIT
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
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 sam_local_watcher-0.1.0.tar.gz.
File metadata
- Download URL: sam_local_watcher-0.1.0.tar.gz
- Upload date:
- Size: 5.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8e19bcc7a769a3396839ca9630dc22b4c35d262e7e424d540f6b7335124811f5
|
|
| MD5 |
8aae72026f7fa25c5eedf02e080e7d5c
|
|
| BLAKE2b-256 |
5a8e44f5fa2075b1928d21deadfe2a5dbefec1c431da55df0ef83c7e74567abf
|
File details
Details for the file sam_local_watcher-0.1.0-py3-none-any.whl.
File metadata
- Download URL: sam_local_watcher-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dc09a0eb7010ab125cd15b1c1b239564d0abf8e115acdfcf99aec40354a76687
|
|
| MD5 |
eab68e399fabc49d5f7e666ed5cc2d38
|
|
| BLAKE2b-256 |
3314174397c31546e9d3604fb8db105e14be99d07100512d1b41dc2bfcd57227
|