Skip to main content

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

Project description

vovk_hello_world v0.0.87 Checked with mypy Vovk.ts

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

License: MIT

# 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}

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

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

from vovk_hello_world import OpenApiRPC

response = OpenApiRPC.get_spec()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vovk_hello_world-0.0.87.tar.gz (6.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vovk_hello_world-0.0.87-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

Details for the file vovk_hello_world-0.0.87.tar.gz.

File metadata

  • Download URL: vovk_hello_world-0.0.87.tar.gz
  • Upload date:
  • Size: 6.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.6

File hashes

Hashes for vovk_hello_world-0.0.87.tar.gz
Algorithm Hash digest
SHA256 f16570e8916e2c0182a66af271ad1f8d4ac005268fd951c2038f044fa8e32766
MD5 ac4722c25e35154998030c8f57565102
BLAKE2b-256 6af460e467d1b4c2adf5bd7eb7fd453820ed5b3a8b975e5eb7a1022f6a26fbf5

See more details on using hashes here.

File details

Details for the file vovk_hello_world-0.0.87-py3-none-any.whl.

File metadata

File hashes

Hashes for vovk_hello_world-0.0.87-py3-none-any.whl
Algorithm Hash digest
SHA256 04f5c5612e95e2feeb9881302ce1c1a086a927b7c65991912e7dcefd977a374c
MD5 f48ad5d89dd9d527d2039c535389f537
BLAKE2b-256 a097ea277fa18f6ab13926a47070e716b2ceb2c5914b5026aabd9e290d3c5de9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page