Skip to main content

Fast save screenshots every x seconds for workspace

Project description

pyautoscreenshot

🖼️ A Python utility for automatically capturing and saving screenshots at regular intervals

PyPI version Python Support License

✨ 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

  1. Clone the repository
git clone https://github.com/fxyzbtc/pyautoscreenshot.git
cd pyautoscreenshot
  1. Create and activate virtual environment
python -m venv venv
.\venv\Scripts\activate  # Windows
  1. 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

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🙏 Acknowledgments

📞 Support


Made with ❤️ using Python

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyautoscreenshot-0.1.1.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyautoscreenshot-0.1.1-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

Details for the file pyautoscreenshot-0.1.1.tar.gz.

File metadata

  • Download URL: pyautoscreenshot-0.1.1.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.25

File hashes

Hashes for pyautoscreenshot-0.1.1.tar.gz
Algorithm Hash digest
SHA256 b9261b5eca3c9ca19eee24cbaa1fcf3d33f4f2152974dbc17eb468b67e76fb87
MD5 e2a131264a84384ed74667c1cedda53f
BLAKE2b-256 7efea75cba7f93443b8242a016ea834032d8a871d3f56b41f709bce948cf2be5

See more details on using hashes here.

File details

Details for the file pyautoscreenshot-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for pyautoscreenshot-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 41d9aeb6307b9e8d6a3fea5d7557e4e9469cafd0f96301c042911c269fe3d1b1
MD5 2e42c5dfb0dedf0a61083f1e81f784d3
BLAKE2b-256 4f00d0728eb2fdd6e2759493f3cce2065aeee1d233dbcfc9aaeb6886381ff3a7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page