31 lines
1.2 KiB
Markdown
31 lines
1.2 KiB
Markdown
# Getting started working with fishbook
|
|
|
|
Create a project folder and place the configuration file in it (see [configuration](./configuration.md) for more information). If the configuration file contains the user credentials, you will not be prompted to enter them manually with every import.
|
|
|
|
## Package contents
|
|
|
|
Fishbook has the following submodules:
|
|
|
|
1. frontend - classes for standard usage
|
|
* frontendclasses.py: classes reflect entries in the database such as *Dataset, Subject, Cell, RePro,* and *Stimulus*.
|
|
* relacsclasses.py: classes that reflect Relacs repro classes such as *BaselineRecording, FileStimulus, FIcurve*.
|
|
* util.py: util functions mainly for internal usage.
|
|
2. backend - classes for direct database interaction
|
|
* database.py: classes reflecting the database tables, These classes use the [datajoint](https://datajoint.io) definitions to define the database tables and relations. Usually not needed for most users but helpful for advanced database interactions.
|
|
|
|
## First steps
|
|
|
|
```python
|
|
import fishbook as fb
|
|
|
|
# the following command will find and load all (!) dataset entries in the database
|
|
datasets = fb.Dataset.find()
|
|
print(len(datasets))
|
|
|
|
# or use
|
|
print(fb.Dataset.datasetCount())
|
|
|
|
```
|
|
|
|
The Dataset is an entrypoint to the database
|