Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

terrariumai-0.1.7-py3-none-any.whl (5.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page