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/yourusername/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.0.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.0-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyautoscreenshot-0.1.0.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.0.tar.gz
Algorithm Hash digest
SHA256 419701d6d4b8a709aafd22d273d6722bee49a0f387f80bb8248d3682d319c8f5
MD5 09e6ce83cac7cff46c12258639ce5799
BLAKE2b-256 a75ad78905330c5bf1c3d8a41c857dbabce0844e148fc1ab788e4e548826164e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyautoscreenshot-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f448827cb1c1d4883a153354eff5c7aa8acc1f0e250337e08ca2d2a49a72617a
MD5 647c9667b0e97ac0bca436f705dff648
BLAKE2b-256 de09421b51015b2550a60c47cc150cc55d59a15d4f0cf547f4ebc537a6593f0c

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