Python - kv.set()
Store a key value pair in a key value store.
from nitric.resources import kv
from nitric.application import Nitric
profiles = kv('profiles').allow('set')
await profiles.set('profile-1a2b3c', { 'name': 'John Smith' })
Nitric.run()
Parameters
- Name
- key
- Required
- Required
- Type
- string
- Description
- The key that references value. 
 
- Name
- value
- Required
- Required
- Type
- object
- Description
- A json serializable object that is stored as the value. 
 
Examples
Set a key value pair
from nitric.resources import kv
from nitric.application import Nitric
profiles = kv('profiles').allow('set')
await profiles.set('profile-1a2b3c', { 'name': 'John Smith' })
Nitric.run()