Skip to main content

django-neurobank

ProjectStatus Version BuildStatus License PythonVersions

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

  1. Requires Python 3.10+. Runs on Django 4.2 LTS and 5.1.

  2. Install the package: pip install django-neurobank

  3. Add neurobank to your INSTALLED_APPS setting like this:

INSTALLED_APPS = (
    ...
    'rest_framework',
    'django_filters',
    'nbank_registry',
)

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.

  1. Include the neurobank URLconf in your project urls.py like this:

url(r'^neurobank/', include(nbank_registry.urls')),
  1. Run python manage.py migrate to create the database tables.

  2. 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.

Development

Recommend using uv for development.

Run uv sync to create a virtual environment and install dependencies. uv sync --no-dev --frozen for deployment.

Testing: uv run pytest. Settings are in nbank_registry/tests/settings.py. By default tests run against an in-memory sqlite database. To test against postgres (as CI does), run uv sync --group postgres and set NBANK_TEST_DB=postgres (see settings.py for connection env vars).

Metadata

Release files for django-neurobank 0.10.14

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-neurobank 0.10.14
File Size Uploaded
django_neurobank-0.10.14.tar.gz 13.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for django-neurobank 0.10.14
File Interpreter ABI Platform
django_neurobank-0.10.14-py3-none-any.whl Python 3 none any Details

Total release size: 36.2 kB

Release files / django_neurobank-0.10.14.tar.gz

Download URL django_neurobank-0.10.14.tar.gz
Size 13.3 kB
Tags Source
SHA-256 checksum
How to use checksums
8bb5ed197c510acbcd2cdbaf9544a38f577c4b0450f19acf3164bb907cd2988c
BLAKE2b-256 checksum
How to use checksums
9e469b1f6914d2d172030baeee4d0d3a329dca7333394b77d8349cacc60fc4f1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 24, 2026.

Transparency log

Release files / django_neurobank-0.10.14-py3-none-any.whl

Download URL django_neurobank-0.10.14-py3-none-any.whl
Size 22.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
225cef0cb06017a70db81af1f2e995e0e084384eb58a1fb1252c5dd448a19fbd
BLAKE2b-256 checksum
How to use checksums
43250dd5745234277b05ce7e1c6678c795961c0524b0e533384e50ffa50ec70a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 24, 2026.

Transparency log

Release history Release notifications | RSS feed

0.11.0

2 release files

This release

0.10.14 This release

2 release files

0.10.9

2 release files

0.10.8

2 release files

0.10.7

2 release files

0.10.6

2 release files

0.10.5

2 release files

0.10.4

2 release files

0.10.3

2 release files

0.10.2

1 release file

0.10.1

1 release file

0.10.0

1 release file

0.9.1

1 release file

0.9.0

1 release file

0.8.5

1 release file

0.8.4

1 release file

0.8.2

1 release file

0.8.1

2 release files

0.8.0

2 release files

0.7.7

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page