Skip to main content

EthoPy Logo

PyPI Version Python Versions Documentation License: MIT

A Python framework for automated behavioral experiments with database integration.

EthoPy provides a flexible, state-based system for designing and running behavioral experiments. Built for neuroscience research, it offers tight integration with database storage, cross-platform support, and modular architecture for easy customization.

Getting Started

Requirements

  • Python 3.9 to 3.11
  • Maria DB Database
    • EthoPy requires database setup before running experiments. Follow our step-by-step guide: Getting Started Guide for a complete setup from installation to first experiment

Installation

pip install ethopy

Run Your First Experiment

# Test with simulation mode (no hardware required)
ethopy --task-path grating_test.py --log-console

# The simulation uses keyboard controls:
# ← → arrow keys: activate lick ports 1 & 2
# spacebar: proximity detection

Key Features

  • State-based Experiments: Flexible state machine design for complex behavioral paradigms
  • Database Integration: Automatic data storage with DataJoint
  • Hardware Agnostic: Supports Raspberry Pi, Arduino, PC interfaces, or simulation mode
  • Multiple Experiment Types: 2AFC, match-to-sample, passive presentation, calibration
  • Rich Stimuli: Visual (gratings, moving bars, dots), olfactory, and custom stimuli
  • Cross-platform: Linux, macOS, Windows compatibility

Architecture Overview

Understanding Ethopy's core architecture is essential for both using the system effectively and extending it for your needs. Ethopy is built around five core modules that work together to provide a flexible and extensible experimental framework. Each module handles a specific aspect of the experiment, from controlling the overall flow to managing stimuli and recording behavior.

EthoPy Architecture
  • Experiment: Defines the state control system with multiple experimental states (PreTrial, Trial, Reward, Punishment, etc.). Each state has four overridable functions that control its behavior and transitions.
  • Behavior: Handles animal responses and actions (port selection, licking activity, proximity detection)
  • Stimulus: Creates and manages presented stimuli (visual, olfactory, auditory)
  • Interface: Hardware communication layer (Raspberry Pi, Arduino, PC interfaces, simulation)
  • Logger: Data storage and management using DataJoint for seamless database integration
Experiment Overview

Ecosystem

Extend EthoPy with additional tools:

Documentation

Full Documentation

Essential Guides:

Contributing

We welcome contributions! See our Contributing Guide for:

  • Development setup
  • Code standards
  • Documentation updates

License

MIT License - see LICENSE for details.

Support

Metadata

Release files for ethopy 0.0.8.9

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

Source distribution (sdist)

Source distribution for ethopy 0.0.8.9
File Size Uploaded Provenance Actions
ethopy-0.0.8.9.tar.gz 1.7 MB Without provenance Details for ethopy-0.0.8.9.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ethopy 0.0.8.9
File Interpreter ABI Platform Actions
ethopy-0.0.8.9-py3-none-any.whl Python 3 none any Details for ethopy-0.0.8.9-py3-none-any.whl

Total release size: 1.9 MB

Release files / ethopy-0.0.8.9.tar.gz

Download URL ethopy-0.0.8.9.tar.gz
Size 1.7 MB
Tags Source
SHA-256 checksum
How to use checksums
13f3959b74198f30ccbd4b95c1988f23c0bcb803030ef6643613c852f7d8e772
BLAKE2b-256 checksum
How to use checksums
198f23cc0d22f9d77493f9cba0f8ad34586775affb70cd8327c785c627339d97
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / ethopy-0.0.8.9-py3-none-any.whl

Download URL ethopy-0.0.8.9-py3-none-any.whl
Size 151.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
36eefc3e02a3475a2c91c47b23d89228748259b42dd00dcc10a7373f88e404aa
BLAKE2b-256 checksum
How to use checksums
1e981d975123abc0af4afe4e99709f9be7d925c34c803f0357e855e520c4d34c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Security for ethopy 0.0.8.9

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.

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