brainpy


Namebrainpy JSON
Version 2.7.2 PyPI version JSON
download
home_pageNone
SummaryBrainPy: Brain Dynamics Programming in Python
upload_time2025-10-16 12:35:28
maintainerNone
docs_urlNone
authorNone
requires_python>=3.10
licenseGPL-3.0 license
keywords computational neuroscience brain-inspired computation brain modeling brain dynamics modeling brain dynamics programming
VCS
bugtrack_url
requirements numpy brainstate brainunit brainevent braintools jax tqdm
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <p align="center">
  	<img alt="Header image of BrainPy - brain dynamics programming in Python." src="https://raw.githubusercontent.com/brainpy/BrainPy/master/images/logo-banner.png" width=80%>
</p> 



<p align="center">
	<a href="https://pypi.org/project/brainpy/"><img alt="Supported Python Version" src="https://img.shields.io/pypi/pyversions/brainpy"></a>
	<a href="https://github.com/brainpy/BrainPy"><img alt="LICENSE" src="https://img.shields.io/badge/license-%20%20GNU%20GPLv3%20-green?style=plastic"></a>
  	<a href="https://brainpy.readthedocs.io/en/latest/?badge=latest"><img alt="Documentation" src="https://readthedocs.org/projects/brainpy/badge/?version=latest"></a>
  	<a href="https://badge.fury.io/py/brainpy"><img alt="PyPI version" src="https://badge.fury.io/py/brainpy.svg"></a>
    <a href="https://github.com/brainpy/BrainPy/actions/workflows/CI.yml"><img alt="Continuous Integration" src="https://github.com/brainpy/BrainPy/actions/workflows/CI.yml/badge.svg"></a>
    <a href="https://github.com/brainpy/BrainPy/actions/workflows/CI-models.yml"><img alt="Continuous Integration with Models" src="https://github.com/brainpy/BrainPy/actions/workflows/CI-models.yml/badge.svg"></a>
</p>


BrainPy is a flexible, efficient, and extensible framework for computational neuroscience and brain-inspired computation based on the Just-In-Time (JIT) compilation. It provides an integrative ecosystem for brain dynamics programming, including brain dynamics **building**, **simulation**, **training**, **analysis**, etc. 

- **Source**: https://github.com/brainpy/BrainPy
- **Documentation**: https://brainpy.readthedocs.io/
- **Documentation (state-based)**: https://brainpy-state.readthedocs.io/
- **Bug reports**: https://github.com/brainpy/BrainPy/issues
- **Ecosystem**: https://brainmodeling.readthedocs.io/


## Installation

BrainPy is based on Python (>=3.10) and can be installed on Linux (Ubuntu 16.04 or later), macOS (10.12 or later), and Windows platforms. 

```bash
pip install brainpy -U
```

If you want to use BrainPy with different hardware support, please install the corresponding version of BrainPy:

```bash
pip install brainpy[cpu] -U  # install with CPU support only
pip install brainpy[cuda12] -U  # install with CUDA 12.x support
pip install brainpy[cuda13] -U  # install with CUDA 13.x support
pip install brainpy[tpu] -U  # install with TPU support
```


Install the brainpy with the ecosystem packages:

```bash
pip install BrainX -U
```




### Using BrainPy with Binder

We provide a Binder environment for BrainPy. You can use the following button to launch the environment:

[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/brainpy/BrainPy-binder/main)




## Ecosystem

- **[BrainPy](https://github.com/brainpy/BrainPy)**: The solution for the general-purpose brain dynamics programming. 
- **[brainpy-examples](https://github.com/brainpy/examples)**: Comprehensive examples of BrainPy computation. 
- **[brain modeling ecosystem](https://brainmodeling.readthedocs.io/)**: A collection of tools and libraries for brain modeling and simulation.
- [《神经计算建模实战》 (Neural Modeling in Action)](https://github.com/c-xy17/NeuralModeling)
- [第一届神经计算建模与编程培训班 (First Training Course on Neural Modeling and Programming)](https://github.com/brainpy/1st-neural-modeling-and-programming-course)
- [第二届神经计算建模与编程培训班 (Second Training Course on Neural Modeling and Programming)](https://github.com/brainpy/2nd-neural-modeling-and-programming-course)



## Citing 

If you are using ``brainpy >= 2.0``, please consider citing the corresponding paper:

```bibtex
@article {10.7554/eLife.86365,
    article_type = {journal},
    title = {BrainPy, a flexible, integrative, efficient, and extensible framework for general-purpose brain dynamics programming},
    author = {Wang, Chaoming and Zhang, Tianqiu and Chen, Xiaoyu and He, Sichao and Li, Shangyang and Wu, Si},
    editor = {Stimberg, Marcel},
    volume = 12,
    year = 2023,
    month = {dec},
    pub_date = {2023-12-22},
    pages = {e86365},
    citation = {eLife 2023;12:e86365},
    doi = {10.7554/eLife.86365},
    url = {https://doi.org/10.7554/eLife.86365},
    abstract = {Elucidating the intricate neural mechanisms underlying brain functions requires integrative brain dynamics modeling. To facilitate this process, it is crucial to develop a general-purpose programming framework that allows users to freely define neural models across multiple scales, efficiently simulate, train, and analyze model dynamics, and conveniently incorporate new modeling approaches. In response to this need, we present BrainPy. BrainPy leverages the advanced just-in-time (JIT) compilation capabilities of JAX and XLA to provide a powerful infrastructure tailored for brain dynamics programming. It offers an integrated platform for building, simulating, training, and analyzing brain dynamics models. Models defined in BrainPy can be JIT compiled into binary instructions for various devices, including Central Processing Unit (CPU), Graphics Processing Unit (GPU), and Tensor Processing Unit (TPU), which ensures high running performance comparable to native C or CUDA. Additionally, BrainPy features an extensible architecture that allows for easy expansion of new infrastructure, utilities, and machine-learning approaches. This flexibility enables researchers to incorporate cutting-edge techniques and adapt the framework to their specific needs},
    journal = {eLife},
    issn = {2050-084X},
    publisher = {eLife Sciences Publications, Ltd},
}
```


If you want to cite ``brainpy 1.0``, please consider using the corresponding paper:

```bibtex
@inproceedings{wang2021just,
    title={A Just-In-Time Compilation Approach for Neural Dynamics Simulation},
    author={Wang, Chaoming and Jiang, Yingqian and Liu, Xinyu and Lin, Xiaohan and Zou, Xiaolong and Ji, Zilong and Wu, Si},
    booktitle={International Conference on Neural Information Processing},
    pages={15--26},
    year={2021},
    organization={Springer}
}
```



            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "brainpy",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "computational neuroscience, brain-inspired computation, brain modeling, brain dynamics modeling, brain dynamics programming",
    "author": null,
    "author_email": "BrainPy Team <chao.brain@qq.com>",
    "download_url": "https://files.pythonhosted.org/packages/51/a6/9a0582521e0aff8df55c431cfa9256505968adb11ad3292f9c1cfb80e07b/brainpy-2.7.2.tar.gz",
    "platform": null,
    "description": "<p align=\"center\">\r\n  \t<img alt=\"Header image of BrainPy - brain dynamics programming in Python.\" src=\"https://raw.githubusercontent.com/brainpy/BrainPy/master/images/logo-banner.png\" width=80%>\r\n</p> \r\n\r\n\r\n\r\n<p align=\"center\">\r\n\t<a href=\"https://pypi.org/project/brainpy/\"><img alt=\"Supported Python Version\" src=\"https://img.shields.io/pypi/pyversions/brainpy\"></a>\r\n\t<a href=\"https://github.com/brainpy/BrainPy\"><img alt=\"LICENSE\" src=\"https://img.shields.io/badge/license-%20%20GNU%20GPLv3%20-green?style=plastic\"></a>\r\n  \t<a href=\"https://brainpy.readthedocs.io/en/latest/?badge=latest\"><img alt=\"Documentation\" src=\"https://readthedocs.org/projects/brainpy/badge/?version=latest\"></a>\r\n  \t<a href=\"https://badge.fury.io/py/brainpy\"><img alt=\"PyPI version\" src=\"https://badge.fury.io/py/brainpy.svg\"></a>\r\n    <a href=\"https://github.com/brainpy/BrainPy/actions/workflows/CI.yml\"><img alt=\"Continuous Integration\" src=\"https://github.com/brainpy/BrainPy/actions/workflows/CI.yml/badge.svg\"></a>\r\n    <a href=\"https://github.com/brainpy/BrainPy/actions/workflows/CI-models.yml\"><img alt=\"Continuous Integration with Models\" src=\"https://github.com/brainpy/BrainPy/actions/workflows/CI-models.yml/badge.svg\"></a>\r\n</p>\r\n\r\n\r\nBrainPy is a flexible, efficient, and extensible framework for computational neuroscience and brain-inspired computation based on the Just-In-Time (JIT) compilation. It provides an integrative ecosystem for brain dynamics programming, including brain dynamics **building**, **simulation**, **training**, **analysis**, etc. \r\n\r\n- **Source**: https://github.com/brainpy/BrainPy\r\n- **Documentation**: https://brainpy.readthedocs.io/\r\n- **Documentation (state-based)**: https://brainpy-state.readthedocs.io/\r\n- **Bug reports**: https://github.com/brainpy/BrainPy/issues\r\n- **Ecosystem**: https://brainmodeling.readthedocs.io/\r\n\r\n\r\n## Installation\r\n\r\nBrainPy is based on Python (>=3.10) and can be installed on Linux (Ubuntu 16.04 or later), macOS (10.12 or later), and Windows platforms. \r\n\r\n```bash\r\npip install brainpy -U\r\n```\r\n\r\nIf you want to use BrainPy with different hardware support, please install the corresponding version of BrainPy:\r\n\r\n```bash\r\npip install brainpy[cpu] -U  # install with CPU support only\r\npip install brainpy[cuda12] -U  # install with CUDA 12.x support\r\npip install brainpy[cuda13] -U  # install with CUDA 13.x support\r\npip install brainpy[tpu] -U  # install with TPU support\r\n```\r\n\r\n\r\nInstall the brainpy with the ecosystem packages:\r\n\r\n```bash\r\npip install BrainX -U\r\n```\r\n\r\n\r\n\r\n\r\n### Using BrainPy with Binder\r\n\r\nWe provide a Binder environment for BrainPy. You can use the following button to launch the environment:\r\n\r\n[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/brainpy/BrainPy-binder/main)\r\n\r\n\r\n\r\n\r\n## Ecosystem\r\n\r\n- **[BrainPy](https://github.com/brainpy/BrainPy)**: The solution for the general-purpose brain dynamics programming. \r\n- **[brainpy-examples](https://github.com/brainpy/examples)**: Comprehensive examples of BrainPy computation. \r\n- **[brain modeling ecosystem](https://brainmodeling.readthedocs.io/)**: A collection of tools and libraries for brain modeling and simulation.\r\n- [\u300a\u795e\u7ecf\u8ba1\u7b97\u5efa\u6a21\u5b9e\u6218\u300b (Neural Modeling in Action)](https://github.com/c-xy17/NeuralModeling)\r\n- [\u7b2c\u4e00\u5c4a\u795e\u7ecf\u8ba1\u7b97\u5efa\u6a21\u4e0e\u7f16\u7a0b\u57f9\u8bad\u73ed (First Training Course on Neural Modeling and Programming)](https://github.com/brainpy/1st-neural-modeling-and-programming-course)\r\n- [\u7b2c\u4e8c\u5c4a\u795e\u7ecf\u8ba1\u7b97\u5efa\u6a21\u4e0e\u7f16\u7a0b\u57f9\u8bad\u73ed (Second Training Course on Neural Modeling and Programming)](https://github.com/brainpy/2nd-neural-modeling-and-programming-course)\r\n\r\n\r\n\r\n## Citing \r\n\r\nIf you are using ``brainpy >= 2.0``, please consider citing the corresponding paper:\r\n\r\n```bibtex\r\n@article {10.7554/eLife.86365,\r\n    article_type = {journal},\r\n    title = {BrainPy, a flexible, integrative, efficient, and extensible framework for general-purpose brain dynamics programming},\r\n    author = {Wang, Chaoming and Zhang, Tianqiu and Chen, Xiaoyu and He, Sichao and Li, Shangyang and Wu, Si},\r\n    editor = {Stimberg, Marcel},\r\n    volume = 12,\r\n    year = 2023,\r\n    month = {dec},\r\n    pub_date = {2023-12-22},\r\n    pages = {e86365},\r\n    citation = {eLife 2023;12:e86365},\r\n    doi = {10.7554/eLife.86365},\r\n    url = {https://doi.org/10.7554/eLife.86365},\r\n    abstract = {Elucidating the intricate neural mechanisms underlying brain functions requires integrative brain dynamics modeling. To facilitate this process, it is crucial to develop a general-purpose programming framework that allows users to freely define neural models across multiple scales, efficiently simulate, train, and analyze model dynamics, and conveniently incorporate new modeling approaches. In response to this need, we present BrainPy. BrainPy leverages the advanced just-in-time (JIT) compilation capabilities of JAX and XLA to provide a powerful infrastructure tailored for brain dynamics programming. It offers an integrated platform for building, simulating, training, and analyzing brain dynamics models. Models defined in BrainPy can be JIT compiled into binary instructions for various devices, including Central Processing Unit (CPU), Graphics Processing Unit (GPU), and Tensor Processing Unit (TPU), which ensures high running performance comparable to native C or CUDA. Additionally, BrainPy features an extensible architecture that allows for easy expansion of new infrastructure, utilities, and machine-learning approaches. This flexibility enables researchers to incorporate cutting-edge techniques and adapt the framework to their specific needs},\r\n    journal = {eLife},\r\n    issn = {2050-084X},\r\n    publisher = {eLife Sciences Publications, Ltd},\r\n}\r\n```\r\n\r\n\r\nIf you want to cite ``brainpy 1.0``, please consider using the corresponding paper:\r\n\r\n```bibtex\r\n@inproceedings{wang2021just,\r\n    title={A Just-In-Time Compilation Approach for Neural Dynamics Simulation},\r\n    author={Wang, Chaoming and Jiang, Yingqian and Liu, Xinyu and Lin, Xiaohan and Zou, Xiaolong and Ji, Zilong and Wu, Si},\r\n    booktitle={International Conference on Neural Information Processing},\r\n    pages={15--26},\r\n    year={2021},\r\n    organization={Springer}\r\n}\r\n```\r\n\r\n\r\n",
    "bugtrack_url": null,
    "license": "GPL-3.0 license",
    "summary": "BrainPy: Brain Dynamics Programming in Python",
    "version": "2.7.2",
    "project_urls": {
        "Bug Tracker": "https://github.com/brainpy/BrainPy/issues",
        "Documentation": "https://brainpy.readthedocs.io/",
        "Source Code": "https://github.com/brainpy/BrainPy"
    },
    "split_keywords": [
        "computational neuroscience",
        " brain-inspired computation",
        " brain modeling",
        " brain dynamics modeling",
        " brain dynamics programming"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "da933a3fb6fc0538053c2feccd100d63b55baa1110de3286ebdbe8facf0f36fa",
                "md5": "75fdce4bf5680a8405cea5ed8c44a888",
                "sha256": "668b533ac40b1e13e0cafabae235c82023c77b54463c6e09bcb2572404ee95c9"
            },
            "downloads": -1,
            "filename": "brainpy-2.7.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "75fdce4bf5680a8405cea5ed8c44a888",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 953425,
            "upload_time": "2025-10-16T12:35:26",
            "upload_time_iso_8601": "2025-10-16T12:35:26.686065Z",
            "url": "https://files.pythonhosted.org/packages/da/93/3a3fb6fc0538053c2feccd100d63b55baa1110de3286ebdbe8facf0f36fa/brainpy-2.7.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "51a69a0582521e0aff8df55c431cfa9256505968adb11ad3292f9c1cfb80e07b",
                "md5": "25c89a13f5920cf11c31f832ab79007d",
                "sha256": "3c4e7a3a6c7c5827170bac8ed17c6589143abe8feff02876b3b2c03a038ad252"
            },
            "downloads": -1,
            "filename": "brainpy-2.7.2.tar.gz",
            "has_sig": false,
            "md5_digest": "25c89a13f5920cf11c31f832ab79007d",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 672312,
            "upload_time": "2025-10-16T12:35:28",
            "upload_time_iso_8601": "2025-10-16T12:35:28.789944Z",
            "url": "https://files.pythonhosted.org/packages/51/a6/9a0582521e0aff8df55c431cfa9256505968adb11ad3292f9c1cfb80e07b/brainpy-2.7.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-10-16 12:35:28",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "brainpy",
    "github_project": "BrainPy",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "numpy",
            "specs": []
        },
        {
            "name": "brainstate",
            "specs": [
                [
                    ">=",
                    "0.2.0"
                ]
            ]
        },
        {
            "name": "brainunit",
            "specs": []
        },
        {
            "name": "brainevent",
            "specs": [
                [
                    ">=",
                    "0.0.4"
                ]
            ]
        },
        {
            "name": "braintools",
            "specs": [
                [
                    ">=",
                    "0.1.0"
                ]
            ]
        },
        {
            "name": "jax",
            "specs": []
        },
        {
            "name": "tqdm",
            "specs": []
        }
    ],
    "lcname": "brainpy"
}
        
Elapsed time: 4.15093s