A Django webserver to handle SciDataConatiner.
Project description
SciDataContainer Django Server
This is the django based implementation of the server to manage SciDataContainer objects.
Documentation
The documentation is hosted on Read the Docs.
Installation
Install using pip:
pip install django-scidatacontainer
Then add 'scidatacontainer_db' and all third party libraries to your INSTALLED_APPS.
INSTALLED_APPS = [
...,
'scidatacontainer_db',
'guardian',
'rest_framework',
'knox',
'django_filters',
]
Finally, configure it in your settings.py.
- Define
MEDIA_ROOT. It is the location where the dataset files are stored. - Define
LOGIN_URLandLOGOUT_REDIRECT_URL. This packages provides a login page that can be used. - Configure the required third party packages.
A good starting point might be the following configuration:
AUTHENTICATION_BACKENDS = (
'django.contrib.auth.backends.ModelBackend',
'guardian.backends.ObjectPermissionBackend',
)
REST_FRAMEWORK = {
'DEFAULT_AUTHENTICATION_CLASSES': [
'knox.auth.TokenAuthentication',
# remove the following if you only want to allow token authentification (no web browser)
'rest_framework.authentication.BasicAuthentication',
'rest_framework.authentication.SessionAuthentication',
],
'DEFAULT_PERMISSION_CLASSES': [
'rest_framework.permissions.IsAuthenticated', # only registered user have access.
# 'rest_framework.permissions.AllowAny', # everyone can access the api.
],
# Make sure datetime is imported!!
# API key settings: valid for 2 weeks, but the expiration date is extended by 2 weeks every time it's used.
'TOKEN_TTL' : datetime.timedelta(weeks=2),
'AUTO_REFRESH' : True,
}
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file django-scidatacontainer-0.2.1.tar.gz.
File metadata
- Download URL: django-scidatacontainer-0.2.1.tar.gz
- Upload date:
- Size: 13.1 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ad74cfe265dac4f1a99b2ddf0dec9666a276ab63775672a1f8ee4134b2bee460
|
|
| MD5 |
c10ee3c857135474c691946dc31f7929
|
|
| BLAKE2b-256 |
75efa8ce1a589b9bb8f9196915d31f1e811c11e07662f3f0922392d1ab8d8edb
|
File details
Details for the file django_scidatacontainer-0.2.1-py3-none-any.whl.
File metadata
- Download URL: django_scidatacontainer-0.2.1-py3-none-any.whl
- Upload date:
- Size: 13.1 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
849edba2037e64a0a054b0ff218bccd1a8d90f490363584aa7eb0ca4c4950c84
|
|
| MD5 |
a8aebf74a24aa7fac8bd009f3d883e2c
|
|
| BLAKE2b-256 |
b066f7ea5fa62da2d1653e5ba7b2e478e96926a77f8103f67be2d1e97cf2a1a6
|