``django-notifications-rest`` Documentation
=======================================
[django-notifications-rest](https://github.com/yhdelgado/django-notifications-rest) provides rest endpoints for ``django-notifications-hq``.
Requirements
============
- Python 3.8 - 3.11
- Django 4.2 - 5.0
- django-notifications-hq latest version
- djangorestframework latest version
Installation
============
Installation using ``pip``. You need to manually install the required ``django-notifications-hq`` and ``djangorestframework`` packages.
$ pip install django-notifications-rest
or get it from source
$ git clone https://github.com/yhdelgado/django-notifications-rest.git
$ cd django-notifications-rest
$ python setup.py sdist
$ pip install dist/django-notifications-rest*
Then to add the Django Notifications Rest to your project add the app ``notifications_rest`` to your ``INSTALLED_APPS`` and urlconf.
The app should go somewhere after all the apps that are going to be generating notifications like ``django.contrib.auth``
INSTALLED_APPS = (
'django.contrib.auth',
'rest_framework',
'notifications'.
...
'notifications_rest',
...
)
Add the notifications urls to your urlconf::
urlpatterns = [
...
url('^notifications/', include('notifications_rest.urls')),
...
]
If the installed version of django>=3.1, then::
from django.urls import path, include
urlpatterns = [
...
path('^notifications/', include('notifications_rest.urls')),
...
]
To run schema migration, execute ``python manage.py migrate``.
-------------------
Additional options:
-------------------
There is also ``/add/`` API endpoint to add new notifications. Such endpoint might be considered security risk, as any user can add any notifications. For that reason, it must be manually enabled by setting ``NOTIFICATIONS_API_ALLOW_ADD=True``
Raw data
{
"_id": null,
"home_page": "https://github.com/yhdelgado/django-notifications-rest",
"name": "django-notifications-rest",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.5",
"maintainer_email": null,
"keywords": "django notifications github rest api",
"author": "Yusniel Hidalgo Delgado",
"author_email": "yhidalgo86@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/9a/fa/99661bd692c22c4a2eea2479a84960b5847e7abf0630565ee3148892d933/django_notifications_rest-1.0.1.tar.gz",
"platform": null,
"description": "``django-notifications-rest`` Documentation\n=======================================\n\n[django-notifications-rest](https://github.com/yhdelgado/django-notifications-rest) provides rest endpoints for ``django-notifications-hq``.\n\nRequirements\n============\n\n- Python 3.8 - 3.11\n- Django 4.2 - 5.0\n- django-notifications-hq latest version\n- djangorestframework latest version\n\nInstallation\n============\n\nInstallation using ``pip``. You need to manually install the required ``django-notifications-hq`` and ``djangorestframework`` packages.\n \n $ pip install django-notifications-rest\n\nor get it from source\n\n $ git clone https://github.com/yhdelgado/django-notifications-rest.git\n $ cd django-notifications-rest\n $ python setup.py sdist\n $ pip install dist/django-notifications-rest*\n\nThen to add the Django Notifications Rest to your project add the app ``notifications_rest`` to your ``INSTALLED_APPS`` and urlconf.\n\nThe app should go somewhere after all the apps that are going to be generating notifications like ``django.contrib.auth``\n\n INSTALLED_APPS = (\n 'django.contrib.auth',\n 'rest_framework',\n 'notifications'.\n ...\n 'notifications_rest',\n ...\n )\n\nAdd the notifications urls to your urlconf::\n\n urlpatterns = [\n ...\n url('^notifications/', include('notifications_rest.urls')),\n ...\n ]\nIf the installed version of django>=3.1, then::\n\n from django.urls import path, include\n urlpatterns = [\n ...\n path('^notifications/', include('notifications_rest.urls')),\n ...\n ]\n \nTo run schema migration, execute ``python manage.py migrate``.\n\n-------------------\nAdditional options:\n-------------------\n\nThere is also ``/add/`` API endpoint to add new notifications. Such endpoint might be considered security risk, as any user can add any notifications. For that reason, it must be manually enabled by setting ``NOTIFICATIONS_API_ALLOW_ADD=True``\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A django notifications package exposed through API Rest",
"version": "1.0.1",
"project_urls": {
"Homepage": "https://github.com/yhdelgado/django-notifications-rest"
},
"split_keywords": [
"django",
"notifications",
"github",
"rest",
"api"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "d883d0069f214d0f5a8f38ea3800819c73eb1ecf7388199273f6496a35b19683",
"md5": "6fe124c02a7d8352f1b4a0d06f70a600",
"sha256": "4dc0599ba88254e847cfee9e371085a3925ada4e57ea7c3f2e5c103cf451238c"
},
"downloads": -1,
"filename": "django_notifications_rest-1.0.1-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "6fe124c02a7d8352f1b4a0d06f70a600",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": ">=3.5",
"size": 8697,
"upload_time": "2024-08-09T09:45:46",
"upload_time_iso_8601": "2024-08-09T09:45:46.224957Z",
"url": "https://files.pythonhosted.org/packages/d8/83/d0069f214d0f5a8f38ea3800819c73eb1ecf7388199273f6496a35b19683/django_notifications_rest-1.0.1-py2.py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "9afa99661bd692c22c4a2eea2479a84960b5847e7abf0630565ee3148892d933",
"md5": "b65273f04e9ab1e05e1c1c851cde8e19",
"sha256": "ddc586e65ee94828b723ddaa27a9c697f3c3d94d730facdb89770ff2634e65a0"
},
"downloads": -1,
"filename": "django_notifications_rest-1.0.1.tar.gz",
"has_sig": false,
"md5_digest": "b65273f04e9ab1e05e1c1c851cde8e19",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.5",
"size": 7094,
"upload_time": "2024-08-09T09:45:47",
"upload_time_iso_8601": "2024-08-09T09:45:47.297316Z",
"url": "https://files.pythonhosted.org/packages/9a/fa/99661bd692c22c4a2eea2479a84960b5847e7abf0630565ee3148892d933/django_notifications_rest-1.0.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-08-09 09:45:47",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "yhdelgado",
"github_project": "django-notifications-rest",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [],
"lcname": "django-notifications-rest"
}