Utility package for using Terrarium.ai
Project description
Example usage
import random
from terrariumai import connectRemoteModel, createAction
def randomAction():
return random.randint(0, 1)
def randomDirection():
return random.randint(0, 3)
def modelFunc(obsv):
action = createAction(obsv.id, randomAction(), randomDirection())
return action
connectRemoteModel(
# Find your secret key in your dashboard at http://terrarium.ai
secret='secret-key',
modelFunc=modelFunc,
)
Converting Compiled gRPC Files
When gRPC files are compiled into this package, they need to be edited slightly in order to fit in.
The import at the top of collective_pb2_grpc.py
must be changed to
from . import collective_pb2 as collective__pb2
This is because of the way python 3 handles relative imports.
Any kind of workaround would be appreciated, this is super annoying!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Filename, size | File type | Python version | Upload date | Hashes |
---|---|---|---|---|
Filename, size terrariumai-0.1.9-py3-none-any.whl (6.1 kB) | File type Wheel | Python version py3 | Upload date | Hashes View |
Close
Hashes for terrariumai-0.1.9-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 23d84495fd1cd2fef701f414e96d963f74e021ee3254242ea3a9661cdc22163a |
|
MD5 | 1cc8f26dd0c5e2769db54b1eba36a85b |
|
BLAKE2-256 | a36c0f0d5694a1558db59827fa2bcf21c42cb0bdb3fc72153c19859375be215d |