Skip to main content

A python library for integrating data sources with Bonsai BRAIN.

Installation

To install the current release version:

$ pip install bonsai-ai

Usage

Clients will subclass bonsai.Simulator and implement the required methods.

Example:

#!/usr/bin/env python3

import sys
from bonsai_ai import Simulator, Brain, Config

class MySim(Simulator):
    def episode_start(self, parameters):
        initial = {"value": 1.0}
        return initial

    def simulate(self, action, objective):
        terminal = True
        state = {"value": 1.0}
        return (state, 1.0, terminal)

Then, the simulator is configured and assigned a BRAIN and run.

def example():
    config = Config(sys.argv)
    brain = Brain(config)
    sim = MySim(brain, 'example_simulator')
    while sim.run():
        continue

Metadata

Release files for bonsai-ai 2.2.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bonsai-ai 2.2.8
File Size Uploaded Provenance
bonsai-ai-2.2.8.tar.gz 36.9 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for bonsai-ai 2.2.8
File Interpreter ABI Platform
bonsai_ai-2.2.8-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 130.8 kB

Release files / bonsai-ai-2.2.8.tar.gz

Download URL bonsai-ai-2.2.8.tar.gz
Size 36.9 kB
Tags Source
SHA-256 checksum
How to use checksums
2ab27c78725f1566ff08a16c568b7df6a20b74a733ef444fb37e24b34343ce87
BLAKE2b-256 checksum
How to use checksums
872e9aa33054df72503d2166a555ddfeedfffb202feb70ac61eb233c66030988
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.18.4 setuptools/41.0.0 requests-toolbelt/0.9.1 tqdm/4.33.0 CPython/3.6.5

Release files / bonsai_ai-2.2.8-py2.py3-none-any.whl

Download URL bonsai_ai-2.2.8-py2.py3-none-any.whl
Size 93.8 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
44c5d494299c2cae1937f4a13e5494dea7d65eb35548f5cbf59f0b0e852c1eec
BLAKE2b-256 checksum
How to use checksums
2f3028e80fb6d0f0de7b5d11b2bb2890047bd14e3059d9bcc08d6134cac7bab0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.18.4 setuptools/41.0.0 requests-toolbelt/0.9.1 tqdm/4.33.0 CPython/3.6.5

Security for bonsai-ai 2.2.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

2.2.8 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page