Skip to content

Instantly share code, notes, and snippets.

@danthelion
Last active October 20, 2022 11:40
Show Gist options
  • Save danthelion/d4d71f964a3812841b33153cb239530e to your computer and use it in GitHub Desktop.
Save danthelion/d4d71f964a3812841b33153cb239530e to your computer and use it in GitHub Desktop.
Register schema registry
client = SchemaRegistryClient(url="http://127.0.0.1:8081")
class User(BaseModel):
ts: datetime.datetime
name: str
country: str
age: int
schema_id = client.register("USERS-value", User.schema_json(), schema_type="JSON")
print(schema_id)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment