semvec/pypi-packages huggingface dataset:
obs-ws-client 0.1.0
A websocket client for OBS Studio in Python.
License: MIT
Requires Python: <4.0,>=3.9
Keywords: obs, obs-studio, websocket, asyncio, client

# OBS WebSocket Client

A Python library for interacting with OBS Studio through its WebSocket protocol (v5.x.x). This client provides a simple async interface to control OBS Studio programmatically.

## Features

- Support for [OBS WebSocket 5.x.x protocol](https://github.com/obsproject/obs-websocket/blob/master/docs/generated/protocol.md)
- Asynchronous interface using asyncio

## Requirements

- Python 3.9 or higher
- OBS Studio 28.0.0 or higher with WebSocket server enabled

## Installation

This package uses [Poetry](https://python-poetry.org/) for dependency management. Make sure you have installed Poetry (v1.8.3). Then simply run:

```bash
poetry install
```

## Setting up OBS WebSocket Server

1. Open OBS Studio
2. Go to Tools -> WebSocket Server Settings
3. Enable WebSocket server
4. Set the Server Port (default is 4455)
5. Optionally set the password for authentication

## Quickstart

Below is a simple code snippet that demonstrates the usage of ObsWsClient to start and stop recording in OBS Studio. For more examples, checkout the `example` folder.

```python
from obswsc.client import ObsWsClient
from obswsc.data import Request

import asyncio

async def main():
  client = ObsWsClient(url='ws://localhost:4455')

  async with client:
    await client.request(Request('StartRecord'))
    await asyncio.sleep(10.0)
    res = await client.request(Request('StopRecord'))
    print(f'recorded video: {res.res_data["outputPath"]}')

asyncio.run(main())
```

## License

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

## Acknowledgments

- Thanks to the OBS Studio team for creating the WebSocket protocol.
literatureScrape 0.250205.2
Get literature information
License: MIT
Keywords: literature, paper, doi, abstract

# Literature Scrape

## Usage

```
from literatureScrape import async_summary, sync_summary


# 设置代理
# import os
# os.environ["LITERATURE_SCRAPE_PROXY"] = "http://127.0.0.1:1080"


# 同步调用
def test_sync():
    print(sync_summary("10.1186/s12967-024-05786-4"))
        

# 异步调用
async def test_async():
    tasks = [asyncio.create_task(async_summary("10.1186/s12967-024-05786-4")) for _ in range(3)]
    ret = await asyncio.gather(*tasks)
    print(ret)
```