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.88 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.88.tar.gz (7.0 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.88-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: vovk_hello_world-0.0.88.tar.gz
  • Upload date:
  • Size: 7.0 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.88.tar.gz
Algorithm Hash digest
SHA256 b08e48155b5bdc411f717f592e9da1c8648d196b2971e5f608aca2e3d9f99b32
MD5 36156dd385891769e5ae30f978b14d58
BLAKE2b-256 11eb3ea7ab4c76063fc895e847bba4949f713177c85774dcb13d881e1fc47218

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vovk_hello_world-0.0.88-py3-none-any.whl
Algorithm Hash digest
SHA256 e27f1a7db6d6314f7d29980d8f4783a81f154ce043b86eb86fbc4738130c33f9
MD5 16d339ddb363d92f10c1cf9719365fd2
BLAKE2b-256 56bd1552172f7ee948961a0243e107f75bbfc2dc80048c704088685632c7e611

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