pyautoscreenshot
🖼️ A Python utility for automatically capturing and saving screenshots at regular intervals
✨ Features
- 📸 Capture screenshots at customizable intervals
- 🕒 Automatic timestamp-based filenames
- 📁 Configurable output directory
- 🏷️ Custom filename prefixes
- 🖼️ High-quality PNG format
- 🚀 Simple CLI interface
📦 Installation
Using pip
pip install pyautoscreenshot
Using uv (Recommended)
uv is a blazing-fast Python package installer:
# Install uv
pip install uv
# Install pyautoscreenshot using uv
uv pip install pyautoscreenshot
🚀 Quick Start
Command Line Usage
# Basic usage (default: 10-second interval)
pyautoscreenshot
# Custom output directory
pyautoscreenshot --output D:/screenshots
# Custom prefix and interval
pyautoscreenshot --prefix workscreen --interval 5
Python Module Usage
python -m pyautoscreenshot [options]
In Your Code
from pyautoscreenshot import take_screenshot
# Take a single screenshot
filepath = take_screenshot("./screenshots", "custom")
print(f"Screenshot saved to: {filepath}")
🎛️ Configuration Options
| Option | Short | Description | Default |
|---|---|---|---|
--output |
-o |
Output directory | ./screenshots |
--prefix |
-p |
Filename prefix | screenshot |
--interval |
-i |
Capture interval (seconds) | 10 |
🛠️ Development
Setup Development Environment
- Clone the repository
git clone https://github.com/fxyzbtc/pyautoscreenshot.git
cd pyautoscreenshot
- Create and activate virtual environment
python -m venv venv
.\venv\Scripts\activate # Windows
- Install development dependencies
uv pip install -e ".[dev]"
Running Tests
pytest
Code Style
# Format code
black .
# Sort imports
isort .
📝 Example Output
Screenshots are saved with the following naming pattern:
{prefix}_{YYYYMMDD}_{HHMMSS}.png
Example:
screenshot_20250404_153022.png
🤝 Contributing
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
🙏 Acknowledgments
📞 Support
- 📫 Report issues on GitHub Issues
- 💬 Ask questions in Discussions
- 📚 Read the documentation
Made with ❤️ using Python
Metadata
Release files for pyautoscreenshot 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pyautoscreenshot-0.1.1.tar.gz | 5.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pyautoscreenshot-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.6 kB
Release files / pyautoscreenshot-0.1.1.tar.gz
| Download URL | pyautoscreenshot-0.1.1.tar.gz |
|---|---|
| Size | 5.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b9261b5eca3c9ca19eee24cbaa1fcf3d33f4f2152974dbc17eb468b67e76fb87
|
|
BLAKE2b-256 checksum How to use checksums |
7efea75cba7f93443b8242a016ea834032d8a871d3f56b41f709bce948cf2be5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.5.25
|
Release files / pyautoscreenshot-0.1.1-py3-none-any.whl
| Download URL | pyautoscreenshot-0.1.1-py3-none-any.whl |
|---|---|
| Size | 4.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
41d9aeb6307b9e8d6a3fea5d7557e4e9469cafd0f96301c042911c269fe3d1b1
|
|
BLAKE2b-256 checksum How to use checksums |
4f00d0728eb2fdd6e2759493f3cce2065aeee1d233dbcfc9aaeb6886381ff3a7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.5.25
|