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

If you're not sure about the file name format, learn more about wheel file names.

terrariumai-0.1.10-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

Details for the file terrariumai-0.1.10-py3-none-any.whl.

File metadata

  • Download URL: terrariumai-0.1.10-py3-none-any.whl
  • Upload date:
  • Size: 6.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.4

File hashes

Hashes for terrariumai-0.1.10-py3-none-any.whl
Algorithm Hash digest
SHA256 c8c728ab7b7415a349f6010a7a5902f6eaa7c3af156f3a2e491d187c9db6786f
MD5 405e0c88004fe644fcd88621a42cc645
BLAKE2b-256 e66b6cc70b9b4a7b31bf0c25d9eb4f609139f22175d36ba157698ad471e6e338

See more details on using hashes here.

Supported by

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