A showcase for Next.js + Vovk.ts + Zod, demonstrating its capabilities with TypeScript, Rust, and Python RPC.
License: MIT
# Install the package
pip install vovk_hello_world
POST https://vovk-hello-world.vercel.app/api/users/{id}
from vovk_hello_world import UserRPC
response = UserRPC.update_user(
body={
# User email
"email": "john@example.com",
# User profile object
"profile": {
# User full name
"name": "John Doe",
# User age
"age": 25
}
},
query={
# Notification type
"notify": "email"
},
params={
# User ID
"id": "123e4567-e89b-12d3-a456-426614174000"
},
)
print(response)
{
# -----
# Response object
# -----
# Success status
"success": true
}
GET https://vovk-hello-world.vercel.app/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:
{
# Message from the token
"message": "string"
}
GET https://vovk-hello-world.vercel.app/api/static/openapi/spec.json
from vovk_hello_world import OpenApiRPC
response = OpenApiRPC.get_spec()