ONE installation and setup

1. Installation

ONE can be installed as a standalone package with python 3.7 or later by running,

pip install ONE-api


Note

If you have installed the unified IBL environment, ONE will already have been automatically installed, so you can skip this step!

2. Setup

To start using ONE, we must first configure some settings that tell ONE whether it should connect to a database or use a local file system

Connect to IBL Public database

By default ONE is configured to connect to the public IBL database, this can be setup by typing the following

from one.api import ONE
one = ONE(silent=True)


Using local folder structure

ONE can also be used independently of a database by using a local cache directory. This can be setup in the following way

from one.api import One
one = One(cache_dir='/home/user/downlaods/ONE/behavior_paper')


Connecting to specific database (relevant for IBL users)

To connect to a specific database, for example the internal IBL Alyx database, a base-url argument must be given

from one.api import ONE
one = ONE(base_url='https://alyx.internationalbrainlab.org')


Note

When connecting to the IBL internal database you will be prompted to enter credentials. See the IBL Welcome Guide for more information.

Warning

The internal IBL database is only open to IBL members, please connect to our public database to access our publically available datasets

3. Post setup

Once you’ve setup the server you can initialise ONE in the following way and it will automatically connect to the default database configured in your settings,

from one.api import ONE
one = ONE()


To change your default database, or re-run the setup for a given database, you can use the following

one = ONE().setup(base_url='https://test.alyx.internationalbrainlab.org', make_default=True)