{ "info": { "author": "Jos\u00e9 Carlos Calvo Tudela", "author_email": "jcctudela@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Framework :: Django" ], "description": "# Pynot\n\n[![pypi-version]][pypi]\n\n**Awesome Django configurable email notification system based on events,\nand exporting an API REST to configure and read notifications.**\n\n---\n\n# Intelligenia\n\nPynot is developed by Intelligenia, a software development company\nfocused in Python&Django + Angular SPA. More info about us in [our web page][intelligenia-web]\n\n# Overview\n\nPynot is a Django library that helps with the email or web notifications. It is event oriented,\nso you will define events, then you will define notifications that should be sent for each event,\nand finally you can fire the events inside your application code\n\nPynot provides 3 main characteristics:\n\n* Events declaration\n* Definition of the notifications of each event\n* Event fire system\n* User notification access\n\n**Event definition system:** Using the project settings it is possible to declare\nthe events that will be fired in you application. Each event should declare the type of the input\nparameters it will recibe on fire, thus, each notification of this event, will use these\nparameters. A parameter is a DRF Serializer, so it is not just a primitive variable,\nbut it will be a complex object with nested objects.\n\n**Definition of the notifications of each event:** Pynot implement an API REST using DRF.\nUsing this API you could implement a front end component in your application admin area, thus\nthe admin user, could see the events declared in your application, and create as many notification\ntypes in an event as required. Using the API REST it is possible to get the allowed parameters\nand help the user to configure the notifications using these parameters. So, **YES**, you just\nhave to declare the events, and the admin will create, delete, write or change the body notifications\nusing a web application, increasing the happyness of both: the developer and the product owner :)\n\n**Event fire system:** Along your application code you will fire the events declared on Pynot,\nthis is the best part, because **it is just one line of code** where you fire an event,\nand pass it the defined parameters, and Pynot will do the magic: going throw each notification type\nof the event, instantiating the variables based on the parameters passed to it, and creating the\nfinal user notifications, sending emails and creating the web notifications.\n\n**User notification access:** Pynot could send emails and in-app notifications. In the case of in-app\nnotifications, Pynot implements an API REST that gives access to the notifications of the logged user.\nTherefore, your application could implement a front end area to see notification, mark them as readed,\nmark them as important, and many more, it is like an email inbox. The API REST is done, you just\nneed to implement the front end in your application.\n\n# Requirements\n\n* Python (3.5, 3.6, 3.7)\n* Django (2.0, 2.1)\n\n# Installation\n\nInstall using `pip`...\n\n pip install pynot\n\nAdd `'pynot'` to your `INSTALLED_APPS` setting.\n\n INSTALLED_APPS = (\n ...\n 'pynot',\n )\n\nPynot needs to create some database models, so you have to execute the migrations\n\n ./manage.py migrate\n\nIn your urls.py it is necessary to give an access point to Pynot. In this example the access\npoint is named `'api/pynot/'` but it is up to you.\n\n urlpatterns = [\n ...\n url(r'api/pynot/', include('pynot.urls')),\n ...\n ]\n\nAnd thats all, Pynot is working properly, but... you don't have any defined event yet.\n\n# Example\n\nWe are going to configure 2 events, like `'registration'` event, and a `'new_offer`' event.\nTo do that, we need to declare the serializers, in this case, we have the next serializers:\n\n myapp.serializers.UserSerializer\n myapp.serializers.OfferSerializer\n\nTherefore we can define the events in our `'settings.py'`, taking into account that the\n`'registration'` event will receive the registered user as parameter, and a `'new_offer`' event\nwill receive the offer and a list of users. Todo that, we have to put the next in our settings\n\n PYNOT_SETTINGS = {\n 'my_events_category': {\n 'name': _('My Events Category Name'),\n 'events': {\n 'registration': {\n 'name': _(\"New registration\"),\n 'description': _(\"Event fired when new registration happens\"),\n 'parameters': {\n 'user': {'human_name': _(\"User\"), 'serializer': 'myapp.serializers.UserSerializer'}\n }\n },\n 'new_offer': {\n 'name': _(\"New offer\"),\n 'description': _(\"Event fired when new offers are published\"),\n 'parameters': {\n 'offer': {'human_name': _(\"Offer\"), 'serializer': 'myapp.serializers.OfferSerializer'}\n 'users': {'human_name': _(\"Users\"), 'serializer': 'myapp.serializers.UserSerializer'}\n }\n }\n }\n }\n }\n\nWith that deffinition is enough to have an API REST allowing the product owner to define the\nrequired notifications, like the next:\n\n* When a new registration occurs, 2 emails have to be sended, one to the user, and another one to\nthe company\n* When a new offer is published, each user will receive an email and an in-app notification\nwith the offer\n\n\n[pypi-version]: https://img.shields.io/pypi/v/pynot.svg\n[pypi]: https://pypi.org/project/pynot/\n[intelligenia-web]: https://www.intelligenia.us", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/intelligenia/pynot", "keywords": "emails,notifications,notification manager,REST notification config", "license": "Apache 2.0", "maintainer": "", "maintainer_email": "", "name": "pynot", "package_url": "https://pypi.org/project/pynot/", "platform": "", "project_url": "https://pypi.org/project/pynot/", "project_urls": { "Homepage": "https://github.com/intelligenia/pynot" }, "release_url": "https://pypi.org/project/pynot/1.1.1/", "requires_dist": null, "requires_python": ">=3.5.0", "summary": "Django library to manage notifications emitted by an application", "version": "1.1.1" }, "last_serial": 4274561, "releases": { "1.1.1": [ { "comment_text": "", "digests": { "md5": "98dbf3309d146b2231c6ec118e6d7514", "sha256": "7bbf2d84b22f6aafb211f9a57aad04d7e61d7569e58c93d5bfacf066ccc180b8" }, "downloads": -1, "filename": "pynot-1.1.1.tar.gz", "has_sig": false, "md5_digest": "98dbf3309d146b2231c6ec118e6d7514", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5.0", "size": 17383, "upload_time": "2018-09-15T07:44:58", "url": "https://files.pythonhosted.org/packages/2e/ec/be75f03ca712d5121e0472a12b5ac3ef5d66a872d1de11092727eebe0d5a/pynot-1.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "98dbf3309d146b2231c6ec118e6d7514", "sha256": "7bbf2d84b22f6aafb211f9a57aad04d7e61d7569e58c93d5bfacf066ccc180b8" }, "downloads": -1, "filename": "pynot-1.1.1.tar.gz", "has_sig": false, "md5_digest": "98dbf3309d146b2231c6ec118e6d7514", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5.0", "size": 17383, "upload_time": "2018-09-15T07:44:58", "url": "https://files.pythonhosted.org/packages/2e/ec/be75f03ca712d5121e0472a12b5ac3ef5d66a872d1de11092727eebe0d5a/pynot-1.1.1.tar.gz" } ] }