The result type
Those of you familiar with Rust will feel right at home with the Result
type this library implements. All requests that go out over the network
via the Client
come back to you in the form of a Result
. The result
can be one of two things: an Ok
or an Err
.
Correct usage
client = unkey.Client("unkey_123")
await client.start()
result = await client.keys.verify_key("test_123")
if result.is_ok:
print(result.unwrap())
else:
print(result.unwrap_err())