A Django-based registry for the neurobank system
Project description
django-neurobank
This is a Django application that provides name resolution services to neurobank* using an HTTP API.
The data management strategy behind neurobank is simple: every resource gets a unique identifier. As long as you use the correct identifier, you can unambiguously locate the resource. Resources include sources, which are used to control an experiment, and data, which result from running the experiment. Identifiers can be pretty much anything that's encodable in a URL and isn't too long. You can use manually-assigned identifiers like st32_1_2_1
or let the API generate short, memorable codes like heengei8
To use this strategy, you need to be able to do two things: register each resource you create somewhere, and then resolve resource names to locations so that you can access your data. Being able to attach searchable metadata to your resources is pretty handy, too. This software provides a backend for these tasks. You'll also need neurobank or some other client software to take care of storing your files.
This software is licensed for you to use under the BSD License. See COPYING for details
Quick start
-
Requires Python 3.8+ and Django 4.0+
-
Install the package:
pip install django-neurobank
-
Add
neurobank
to your INSTALLED_APPS setting like this:
INSTALLED_APPS = (
...
'nbank_registry',
)
You'll also need to add rest_framework
and django_filters
.
Since neurobank
uses django-sendfile2
to efficiently serve large files, you will need to set settings.SENDFILE_BACKEND
and possibly other keys, depending on which reverse proxy you are using. Consult the documentation for django-sendfile2 for details.
- Include the neurobank URLconf in your project urls.py like this::
url(r'^neurobank/', include(nbank_registry.urls')),
-
Run
python manage.py migrate
to create the database tables. -
Start the development server and point your browser to http://127.0.0.1:8000/neurobank/ to view records and inspect the API.
Using the registry
Documentation is still in progress. We need a list of endpoints and supported verbs. However, the interface can be accessed through a browser.
Deleting is not supported in the HTTP API. A fundamental concept behind a registry is that resources have unique identifiers, which are never re-used or changed. You can edit locations, metadata, and other attributes using PUT. If you desperately need to change a name or delete an identifier, you'll have to use the Django database admin or directly access the backing database.
This application is still under development, and you should probably only allow access from trusted networks. Authentication is required to modify or add resources, archives, or data types. Authentication uses the django user app, and credentials are sent in plain text. Your site should only be deployed as a reverse proxy behind an encrpyting https-enabled web server like nginx.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file django-neurobank-0.10.8.tar.gz
.
File metadata
- Download URL: django-neurobank-0.10.8.tar.gz
- Upload date:
- Size: 15.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 68f5ca0e1faa798cd6272875becff854c83652a271e8c27572e953f8ef10a75a |
|
MD5 | 95b22924d086c59e28eb1de0d59bde4c |
|
BLAKE2b-256 | bbcbfda282f0f814e679713de145fdaa8222b3f285d61006893f23dc16968b19 |
File details
Details for the file django_neurobank-0.10.8-py3-none-any.whl
.
File metadata
- Download URL: django_neurobank-0.10.8-py3-none-any.whl
- Upload date:
- Size: 20.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1098df3c0025e94b2ec856e931adeeb1b8a4623ff396a4a808200112d4378152 |
|
MD5 | 720c601a100656031bea794344fb0a16 |
|
BLAKE2b-256 | 24794eed191b6720222c4e1df8cbf3566f1272af518ebde0bfd34d36d8ab0a42 |