Metadata-Version: 2.5
Name: vovk_hello_world
Version: 0.0.89
Summary: A "Hello World!" app built with Next.js, Vovk.ts and Zod. For details, visit https://vovk.dev/hello-world
Project-URL: Homepage, https://vovk.dev/hello-world
Project-URL: Source, https://github.com/finom/vovk.git
Project-URL: Issues, https://github.com/finom/vovk/issues
Author: Andrey Gubanov
License: MIT
Keywords: api,openapi,vovk,zod
Requires-Python: >=3.9
Requires-Dist: jsonschema[format-nongpl]
Requires-Dist: requests
Requires-Dist: typing-extensions>=4.0.0; python_version < '3.11'
Provides-Extra: dev
Requires-Dist: types-jsonschema; extra == 'dev'
Requires-Dist: types-requests; extra == 'dev'
Description-Content-Type: text/markdown

<!-- Generated by vovk-cli v0.3.0-beta.0 -->

# vovk_hello_world v0.0.89 [![Checked with mypy](http://www.mypy-lang.org/static/mypy_badge.svg)](http://mypy-lang.org/) [![Vovk.ts](https://badgen.net/badge/Built%20with/Vovk.ts/333333?icon=https://vovk.dev/icon-white.svg)](https://vovk.dev)

> A "Hello World!" app built with Next.js, Vovk.ts and Zod. For details, visit https://vovk.dev/hello-world

License: **MIT**

```bash
# Install the package
pip install vovk_hello_world
```

## UserRPC

### UserRPC.update_user

> Update user

Update user by ID

`POST https://hello-world.vovk.dev/api/users/{id}`

```py
from vovk_hello_world import UserRPC

response = UserRPC.update_user(
    body={
        # -----
        # User data object
        # -----
        # User email
        "email": "john@example.com",
        # User profile object
        "profile": {
            # User full name
            "name": "John Doe",
            # User age
            "age": 25
        }
    },
    query={
        # -----
        # Query parameters
        # -----
        # Notification type
        "notify": "email"
    },
    params={
        # -----
        # Path parameters
        # -----
        # User ID
        "id": "123e4567-e89b-12d3-a456-426614174000"
    },
)

print(response)
# {
#     # -----
#     # Response object
#     # -----
#     # Success status
#     "success": True,
#     # User ID
#     "id": "00000000-0000-0000-0000-000000000000",
#     # Notification type
#     "notify": "email"
# }
```

## StreamRPC

### StreamRPC.stream_tokens

> Stream tokens

Stream tokens to the client

`GET https://hello-world.vovk.dev/api/streams/tokens`

```py
from vovk_hello_world import StreamRPC

response = StreamRPC.stream_tokens()

for i, item in enumerate(response):
    print(f"iteration #{i}:\n {item}")
    # iteration #0:
    # {
    #     # -----
    #     # Streamed token object
    #     # -----
    #     # Message from the token
    #     "message": "string"
    # }
```

## OpenApiRPC

### OpenApiRPC.get_spec

> OpenAPI spec

Get the OpenAPI spec for the "Hello World" app API

`GET https://hello-world.vovk.dev/api/static/openapi.json`

```py
from vovk_hello_world import OpenApiRPC

response = OpenApiRPC.get_spec()
```
