windows-capture


Namewindows-capture JSON
Version 1.0.62 PyPI version JSON
download
home_pageNone
SummaryFastest Windows Screen Capture Library For Python 🔥
upload_time2024-03-02 15:02:23
maintainerNone
docs_urlNone
authorNiiightmareXD
requires_python>=3.9
licenseMIT
keywords screen capture screenshot graphics windows
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Windows Capture   [![Licence]][Licence URL] [![Build Status]][repository] [![Latest Version]][pypi.org]

[Licence]: https://img.shields.io/crates/l/windows-capture
[Licence URL]: https://github.com/NiiightmareXD/windows-capture/blob/main/windows-capture-python/LICENCE

[Build Status]: https://img.shields.io/github/actions/workflow/status/NiiightmareXD/windows-capture/rust.yml
[repository]: https://github.com/NiiightmareXD/windows-capture/tree/main/windows-capture-python

[Latest Version]: https://img.shields.io/pypi/v/windows-capture
[pypi.org]: https://pypi.org/project/windows-capture

**Windows Capture** is a highly efficient Rust and Python library that enables you to capture the screen using the Graphics Capture API effortlessly. This library allows you to easily capture the screen of your Windows-based computer and use it for various purposes, such as creating instructional videos, taking screenshots, or recording your gameplay. With its intuitive interface and robust functionality, Windows Capture is an excellent choice for anyone looking for a reliable, easy-to-use screen-capturing solution.

**Note** this README.md is for [Python library](https://github.com/NiiightmareXD/windows-capture/tree/main/windows-capture-python) Rust library can be found [here](https://github.com/NiiightmareXD/windows-capture)  

## Features

- Only Updates The Frame When Required.
- High Performance.
- Easy To Use.
- Latest Screen Capturing API.

## Installation

Run this command

```
pip install windows-capture
```

## Usage

```python
from windows_capture import WindowsCapture, Frame, InternalCaptureControl

# Every Error From on_closed and on_frame_arrived Will End Up Here
capture = WindowsCapture(
    cursor_capture=None,
    draw_border=None,
    monitor_index=None,
    window_name=None,
)


# Called Every Time A New Frame Is Available
@capture.event
def on_frame_arrived(frame: Frame, capture_control: InternalCaptureControl):
    print("New Frame Arrived")

    # Save The Frame As An Image To The Specified Path
    frame.save_as_image("image.png")

    # Gracefully Stop The Capture Thread
    capture_control.stop()


# Called When The Capture Item Closes Usually When The Window Closes, Capture
# Session Will End After This Function Ends
@capture.event
def on_closed():
    print("Capture Session Closed")


capture.start()
```

## Benchmark

Windows Capture Is The Fastest Python Screen Capture Library

![Benchmark Showing Windows Capture Is The Fastest Python Screen Capture Library](https://github.com/NiiightmareXD/windows-capture/assets/90005793/444fa93e-5e27-48c8-8eb6-b9e21ab26452)

## Contributing

Contributions are welcome! If you find a bug or want to add new features to the library, please open an issue or submit a pull request.

## License

This project is licensed under the [MIT License](LICENSE).


            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "windows-capture",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": "screen,capture,screenshot,graphics,windows",
    "author": "NiiightmareXD",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/7c/f0/0264bd920de73094e62c6b40ec906a5800dd3f6991bdd5a2a5258fabc3fc/windows_capture-1.0.62.tar.gz",
    "platform": null,
    "description": "# Windows Capture   [![Licence]][Licence URL] [![Build Status]][repository] [![Latest Version]][pypi.org]\r\n\r\n[Licence]: https://img.shields.io/crates/l/windows-capture\r\n[Licence URL]: https://github.com/NiiightmareXD/windows-capture/blob/main/windows-capture-python/LICENCE\r\n\r\n[Build Status]: https://img.shields.io/github/actions/workflow/status/NiiightmareXD/windows-capture/rust.yml\r\n[repository]: https://github.com/NiiightmareXD/windows-capture/tree/main/windows-capture-python\r\n\r\n[Latest Version]: https://img.shields.io/pypi/v/windows-capture\r\n[pypi.org]: https://pypi.org/project/windows-capture\r\n\r\n**Windows Capture** is a highly efficient Rust and Python library that enables you to capture the screen using the Graphics Capture API effortlessly. This library allows you to easily capture the screen of your Windows-based computer and use it for various purposes, such as creating instructional videos, taking screenshots, or recording your gameplay. With its intuitive interface and robust functionality, Windows Capture is an excellent choice for anyone looking for a reliable, easy-to-use screen-capturing solution.\r\n\r\n**Note** this README.md is for [Python library](https://github.com/NiiightmareXD/windows-capture/tree/main/windows-capture-python) Rust library can be found [here](https://github.com/NiiightmareXD/windows-capture)  \r\n\r\n## Features\r\n\r\n- Only Updates The Frame When Required.\r\n- High Performance.\r\n- Easy To Use.\r\n- Latest Screen Capturing API.\r\n\r\n## Installation\r\n\r\nRun this command\r\n\r\n```\r\npip install windows-capture\r\n```\r\n\r\n## Usage\r\n\r\n```python\r\nfrom windows_capture import WindowsCapture, Frame, InternalCaptureControl\r\n\r\n# Every Error From on_closed and on_frame_arrived Will End Up Here\r\ncapture = WindowsCapture(\r\n    cursor_capture=None,\r\n    draw_border=None,\r\n    monitor_index=None,\r\n    window_name=None,\r\n)\r\n\r\n\r\n# Called Every Time A New Frame Is Available\r\n@capture.event\r\ndef on_frame_arrived(frame: Frame, capture_control: InternalCaptureControl):\r\n    print(\"New Frame Arrived\")\r\n\r\n    # Save The Frame As An Image To The Specified Path\r\n    frame.save_as_image(\"image.png\")\r\n\r\n    # Gracefully Stop The Capture Thread\r\n    capture_control.stop()\r\n\r\n\r\n# Called When The Capture Item Closes Usually When The Window Closes, Capture\r\n# Session Will End After This Function Ends\r\n@capture.event\r\ndef on_closed():\r\n    print(\"Capture Session Closed\")\r\n\r\n\r\ncapture.start()\r\n```\r\n\r\n## Benchmark\r\n\r\nWindows Capture Is The Fastest Python Screen Capture Library\r\n\r\n![Benchmark Showing Windows Capture Is The Fastest Python Screen Capture Library](https://github.com/NiiightmareXD/windows-capture/assets/90005793/444fa93e-5e27-48c8-8eb6-b9e21ab26452)\r\n\r\n## Contributing\r\n\r\nContributions are welcome! If you find a bug or want to add new features to the library, please open an issue or submit a pull request.\r\n\r\n## License\r\n\r\nThis project is licensed under the [MIT License](LICENSE).\r\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Fastest Windows Screen Capture Library For Python \ud83d\udd25",
    "version": "1.0.62",
    "project_urls": {
        "Source Code": "https://github.com/NiiightmareXD/windows-capture/tree/main/windows-capture-python"
    },
    "split_keywords": [
        "screen",
        "capture",
        "screenshot",
        "graphics",
        "windows"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "6a4b820ba7d34390c60c39df14007c628cb57e4e0d41252742e4b2a548e5cf9f",
                "md5": "fc5235ec608604edb659e8c8d69e4e1e",
                "sha256": "075ff8176955acc85e3b470044c89a969ebcf77a51a3c3dc6560bcb54c3ece7f"
            },
            "downloads": -1,
            "filename": "windows_capture-1.0.62-cp312-none-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "fc5235ec608604edb659e8c8d69e4e1e",
            "packagetype": "bdist_wheel",
            "python_version": "cp312",
            "requires_python": ">=3.9",
            "size": 185592,
            "upload_time": "2024-03-02T15:02:21",
            "upload_time_iso_8601": "2024-03-02T15:02:21.591748Z",
            "url": "https://files.pythonhosted.org/packages/6a/4b/820ba7d34390c60c39df14007c628cb57e4e0d41252742e4b2a548e5cf9f/windows_capture-1.0.62-cp312-none-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "7cf00264bd920de73094e62c6b40ec906a5800dd3f6991bdd5a2a5258fabc3fc",
                "md5": "226e78ec902c4a339eeb1d9381d028b2",
                "sha256": "dd0a2ec7209ca243ae8c4c29092d3ce6d58671dd114a419f8615706f0358e5df"
            },
            "downloads": -1,
            "filename": "windows_capture-1.0.62.tar.gz",
            "has_sig": false,
            "md5_digest": "226e78ec902c4a339eeb1d9381d028b2",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 35325,
            "upload_time": "2024-03-02T15:02:23",
            "upload_time_iso_8601": "2024-03-02T15:02:23.783205Z",
            "url": "https://files.pythonhosted.org/packages/7c/f0/0264bd920de73094e62c6b40ec906a5800dd3f6991bdd5a2a5258fabc3fc/windows_capture-1.0.62.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-02 15:02:23",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "NiiightmareXD",
    "github_project": "windows-capture",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "windows-capture"
}
        
Elapsed time: 0.19646s