semvec/pypi-packages huggingface dataset:
testPackagingHillelPinto 0.0.5
Test for building packages
Keywords: python,video,stream,video stream,camera stream,sockets


# vidstream

Under construction! Not ready for use yet! Currently experimenting and planning!

Developed by Florian Dedov from NeuralNine (c) 2020

## Examples of How To Use (Buggy Alpha Version)

Creating A Server

```python
from vidstream import StreamingServer

server = StreamingServer('127.0.0.1', 9999)
server.start_server()

# Other Code

# When You Are Done
server.stop_server()
```

Creating A Client
```python
from vidstream import CameraClient
from vidstream import VideoClient
from vidstream import ScreenShareClient

# Choose One
client1 = CameraClient('127.0.0.1', 9999)
client2 = VideoClient('127.0.0.1', 9999, 'video.mp4')
client3 = ScreenShareClient('127.0.0.1', 9999)

client1.start_stream()
client2.start_stream()
client3.start_stream()
```

Check out: https://www.youtube.com/c/NeuralNine
fastapi-fancy-exceptions 0.0.3
A sample Python project
Requires Python: >=3.7, <4
Keywords: sample,setuptools,development

# FastAPI Fancy Exceptions

#### Sample code
```python
import uvicorn
from fastapi import FastAPI
from starlette import status
from starlette.requests import Request
from starlette.responses import JSONResponse
from src.fastapi_fancy_exceptions import FancyHTTPException


app = FastAPI()


class AuthException(FancyHTTPException):
    code = "auth_error"
    type = "AuthError"
    message = "Auth error"
    status_code = status.HTTP_401_UNAUTHORIZED


@app.exception_handler(FancyHTTPException)
async def http_exception_accept_handler(request: Request, exc: FancyHTTPException) -> JSONResponse:
    return JSONResponse(
        status_code=exc.status_code,
        content=[{"code": exc.code, "type": exc.type, "message": exc.message}]
    )


@app.get("/")
async def root():
    raise AuthException()

uvicorn.run(app, host="localhost", port=8000)
```

#### This code will lead to this response with status code 401:

```json
[
  {
    "code": "auth_error",
    "type": "AuthError",
    "message": "Auth error"
  }
]
```