semvec/pypi-packages huggingface dataset:
pydantic-socket 0.1.1
Simple TCP socket client and server with Pydantic models
License: MIT
Requires Python: >=3.9,<4.0

# pydantic_socket - Simple socket client and server with [Pydantic](https://github.com/samuelcolvin/pydantic) models

[![PyPI version shields.io](https://img.shields.io/pypi/v/pydantic_socket.svg)](https://pypi.python.org/pypi/pydantic_socket/)
[![PyPI pyversions](https://img.shields.io/pypi/pyversions/pydantic_socket.svg)](https://pypi.python.org/pypi/pydantic_socket/)
[![PyPI license](https://img.shields.io/pypi/l/pydantic_socket.svg)](https://pypi.python.org/pypi/pydantic_socket/)

## Examples

> Output examples are provided for simultaneous run of Server and Client examples

### Server

```python
import asyncio
import logging

import pydantic_socket
from pydantic_socket.types import Action
from pydantic_socket.websocket import (
    Server,
    ServerClient,
)

server = Server()


class TestResponse(pydantic_socket.types.BaseModel):
    foo: int = 1
    bar: str = "bar"
    input: str | None = None


# Register handler for certain action type    
@server.action_handler("hello")
async def hello_handler(s: Server, client: ServerClient, action: Action):
    logging.info(f"Hello, {action.payload.get('name', 'World')}!")
    # Will print:
    # INFO:root:Hello, pydantic_socket!


async def test_handler(s: Server, client: ServerClient, action: Action):
    return TestResponse(foo=1, bar="bar", input=action.payload.get('input'))


# Another way to register handler for certain action type
server.set_action_handler("test", test_handler)

if __name__ == '__main__':
    logging.basicConfig(level=logging.INFO)
    asyncio.run(server.run())

```

### Client

```python
import asyncio
import logging

import pydantic

from pydantic_socket.types import Action
from pydantic_socket.websocket import Client

client = Client("http://127.0.0.1:8080", auto_reconnect=False, client_id=1)


class SomeActionInputPayload(pydantic.BaseModel):
    input: str


async def main():
    # Establishing connection to server
    asyncio.create_task(client.run())
    # Wait some time until connection is done
    await asyncio.sleep(2)
    # Send action
    await client.send(Action(type='hello', payload={"name": "pydantic_socket"}))
    # Send and wait for response
    response = await client.request(Action(type='test', payload={"input": "Some Input"}))

    logging.info(f"Payload is: {response.payload}")
    # Will print: 
    # INFO:root:Payload is: {'foo': 1, 'bar': 'bar', 'input': 'Some Input'}

    await client.close()


if __name__ == '__main__':
    logging.basicConfig(level=logging.INFO)
    asyncio.run(main())

```

## LICENSE

This project is licensed under the terms of the MIT license.
pytubedata 1.1.0
A simple wrapper for YouTube Data API v3 written in Python
License: MIT
Keywords: youtubedata,youtubedataapi,pytubedata,pytubedata.py,googleapi

# Pytubedata

Pytubedata is a simple wrapper for [YouTube Data API](https://developers.google.com/youtube/v3) written in python

## Installation

```
pip install pytubedata
```

## Usage
This package requies a valid YT Data API Key. You can get one from [Google Cloud Console](https://console.cloud.google.com/apis/dashboard).


## Quickstart
- Create a file in `secret.yml` in the project's root directory and save the YouTube Data API key in that file.


- Getting the `Client`
  ```python
  from Youtube import Client

  c= Client()
  ```

## Documentation
- Search for videos
  ```python
    c.search(query="api")
  ```

  check out `Youtube/client.py` for other parameters


- Get activities of a channel
  ```python
    c.request("activity",id="channel_id")
  ```

- Get details of a channel
  ```python
    c.request("channel",id="channel_id")
  ```

- Get sections of a channel
  ```python
    c.request("channel_sections",id="channel_id")
  ```

- Get section of a channel by id
  ```python
    c.request("channel_section_by_id",id="section_id")
  ```

- Get playlists of a channel
  ```python
    c.request("playlists",id="channel_id")
  ```

- Get playlist by id
  ```python
    c.request("playlist_by_id",id="playlist_id")
  ```

- Get videos of a playlist
  ```python
    c.request("playlist_videos",id="playlist_id")
  ```

- Get details of a video by id
  ```python
    c.request("video_by_id",id="video_id")
   ```

- Get comments on a video
  ```python
    c.request("comments_on_video",id="video_id")
  ```

- Get comment details by id
  ```python
    c.request("comment_by_id",id="comment_id")
  ```

- Get replies of a comment
  ```python
    c.request("replies_to_comment",id="comment_id")
  ```


[//]: # (Check [Youtube Data API Documentation]&#40;https://developers.google.com/youtube/v3/docs/&#41; for optional parameters you can pass )


## Contact
Mail: [keshavandteam@gmail.com](mailto:keshavandteam@gmail.com?PyTubeData)
celery-pantry 1.1.4
Monitor and archive Celery task information
License: MIT
Requires Python: >=3.6
Keywords: celery monitoring archiving


Celery Pantry
=============

.. image:: https://readthedocs.org/projects/celery-pantry/badge/?version=latest
    :target: https://celery-pantry.readthedocs.io/en/latest/?badge=latest
    :alt: Documentation Status

Django Rest Framework application to store and access Celery task information.

The `example_project` Django project demonstrates how to integrate `celery_pantry` into a Django project.

It can be seen in action with Docker by running::

    docker-compose up