{"id":19722001,"url":"https://github.com/datajoint/dj-python-101","last_synced_at":"2026-01-03T15:03:05.167Z","repository":{"id":94416984,"uuid":"210440888","full_name":"datajoint/dj-python-101","owner":"datajoint","description":"Reference tutorial notebooks for DataJoint (under active development - October 2019)","archived":false,"fork":false,"pushed_at":"2021-03-13T17:35:16.000Z","size":702,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-01-10T16:23:16.015Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/datajoint.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-09-23T19:56:47.000Z","updated_at":"2023-06-30T16:33:34.000Z","dependencies_parsed_at":"2023-05-17T22:30:23.402Z","dependency_job_id":null,"html_url":"https://github.com/datajoint/dj-python-101","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datajoint%2Fdj-python-101","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datajoint%2Fdj-python-101/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datajoint%2Fdj-python-101/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datajoint%2Fdj-python-101/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/datajoint","download_url":"https://codeload.github.com/datajoint/dj-python-101/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241044209,"owners_count":19899478,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-11T23:16:11.885Z","updated_at":"2026-01-03T15:03:05.085Z","avatar_url":"https://github.com/datajoint.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"(under active development - March 2021)\n\n# License \n**Copyright, DataJoint Contributors, 2019-2021**\n\nThe contents of this repository can be shared and adapted under the terms of the **Creative Commons Attribution-ShareAlike License Version 4.0** [CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/)\n\n# DataJoint-Python 101\n\nWelcome. These reference tutorial notebooks present all basic concepts for working with [DataJoint in Python](https://github.com/datajoint/datajoint-python)\n\nDataJoint is a tool for managing shared computational workflows with scientific data.\n\nThis tutorial assumes intermediate programming proficiency in Python.\n\n# Contents\n\n### 0. Setup \n|Link|Topic|Link|Topic|\n|:--|:--|:--|:--|\n| **Connect** | install datajoint, configure database connection, `dj.config`, authentication, change password, save configuration, secure connection | **Admin** | configure database server, create user accounts, user privileges\n\n### 1. Define a Table\n|Link|Topic|Link|Topic|\n|:--|:--|:--|:--|\n|[**Schema**](https://nbviewer.jupyter.org/github/datajoint/dj-python-101/blob/master/ch1/Schema.ipynb)| use `dj.schema` to create a new database schema or to connect to an existing one    | **Define** |  table class, simple attributes types, primary and secondary attributes, `describe` and `drop`.\n|**Insert**| `insert`, `insert1`, `delete`, and `delete_quick`|**Fetch**| `fetch`, `fetch1`, `head`, `tail`, `len`.\n\n### 2 Insert and Delete \n|Link|Topic|Link|Topic|\n|:--|:--|:--|:--|\n|**Update**| when to use `update`\n|**Restrict**| Query operators `\u0026` and `-`. Restricted `delete`. |[**Proj**](https://nbviewer.jupyter.org/github/datajoint/dj-python-101/blob/master/ch1/Projection.ipynb) | Query operator `proj`\n|[**UUIDs**](https://nbviewer.jupyter.org/github/datajoint/dj-python-101/blob/master/ch1/UUID.ipynb)| work with `UUID` attributes | **Blobs** | storing complex data\n|[**Attach**](https://nbviewer.jupyter.org/github/datajoint/dj-python-101/blob/master/ch1/Attach-Simple.ipynb) | storing entire files as attachments | **Lookup** | work with lookup tables |\n|**Stores**| storing blobs and attachments in external stores | [**Filepath**](https://nbviewer.jupyter.org/github/datajoint/dj-python-101/blob/master/ch1/Filepaths.ipynb) | tracking files in an external repository |\n|[**Adapters**](https://nbviewer.jupyter.org/github/datajoint/dj-python-101/blob/master/ch1/Adapted-Types.ipynb) | storing complex objects | [**Adapters-2**](https://nbviewer.jupyter.org/github/datajoint/dj-python-101/blob/master/ch1/Adapted-Types-2.ipynb) | storing complex objects with predefined schemas |\n|[**Alter**](https://nbviewer.jupyter.org/github/datajoint/dj-python-101/blob/master/ch1/Alter.ipynb) | Altering table definitions with `alter`\n|[**Indexes**](https://nbviewer.jupyter.org/github/datajoint/dj-python-101/blob/master/ch1/Indexes.ipynb)| speed up queries | **Transactions** | defining atomic transactions\n|**Log**| using `schema.log`\n\n### 2. Design a schema\n|Link|Topic|Link|Topic|\n|:--|:--|:--|:--|\n|**Modules**|  correspondence between schemas and modules | **Dependencies** |  primary and secondary dependencies, referential constraints, cascading deletes \n|**Existing**| find and connect to existing schemas: `dj.list_schemas`, `schema.spawn_missing_classes`, `dj.create_virtual_modules` | **Diagrams** | `dj.Diagram`, graph algebra, multi-schema databases |\n|**Join**| query operator `*`, restricting `\u0026` with a query, using `proj` to control join | **Aggregate**| query operator `.aggr`\n|**U**| Using universal sets `dj.U` in restrictions, aggregations, and joins. | **Union** query operator `+`.\n|**DerivedDependencies**| using the `proj` operator in dependencies | **UniqueDependencies** | unique and nullable dependencies\n\n### 3. Data modeling\n|Link|Topic|Link|Topic|\n|:--|:--|:--|:--|\n| **Hierarchy** | modeling hierarchical or nested data | **Dimensional** |  modeling dimensional relationships\n| **Master-Part** | modeling master-part relationships | **Specialization** | modeling specialization relationships |\n| **Association** | modeling associations between entities, including groups | **Cyclic** | modeling cyclic relationships | \n\n### 4. Computation\n|Link|Topic|Link|Topic|\n|:--|:--|:--|:--|\n| **Populate** | the `populate` method and the `make` callback in `dj.Imported` and `dj.Computed` tables | **Distributed** | using `populate` with `reserve_jobs=True` \n| **Jobs** | working with `schema.jobs` and `dj.kill` | **Compute-Parts** | computations in a master-part relationship\n| **Params** | computation parameters and computation versioning | **KeySource** | controlling the scope and granularity of computing jobs with `key_source`\n| **GitHash** | marking computations with a git tag\n| **Offline** | work with no database connection\n\n### 5. Data Sharing and Migration\n|Link|Topic|Link|Topic|\n|:--|:--|:--|:--|\n| **Export** | exporting data for dataset sharing\n\n### 6. Interfaces \u0026 Applications\n|Link|Topic|Link|Topic|\n|:--|:--|:--|:--|\n| **WebGUI** | web interfaces | **Slack** | Slack integration \n\n### 7. Questions and Examples\n|Link|Topic|Link|Topic|\n|:--|:--|:--|:--|\n|[**NWB-Adapter**](https://nbviewer.jupyter.org/github/datajoint/dj-python-101/blob/master/ch7/NWB-Adapter.ipynb) | Work with NWB Files\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatajoint%2Fdj-python-101","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdatajoint%2Fdj-python-101","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatajoint%2Fdj-python-101/lists"}