https://github.com/sheldonkwoodward/marknote
A simple note taking API for Django that supports creating notes and a folder structure. Built for the purpose of learning how to use the Django REST Framework to build a CRUD API.
https://github.com/sheldonkwoodward/marknote
django-app note-taking
Last synced: 4 months ago
JSON representation
A simple note taking API for Django that supports creating notes and a folder structure. Built for the purpose of learning how to use the Django REST Framework to build a CRUD API.
- Host: GitHub
- URL: https://github.com/sheldonkwoodward/marknote
- Owner: sheldonkwoodward
- License: mit
- Created: 2018-08-10T14:43:10.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2022-12-08T02:52:11.000Z (about 3 years ago)
- Last Synced: 2024-12-17T01:24:34.044Z (about 1 year ago)
- Topics: django-app, note-taking
- Language: Python
- Homepage:
- Size: 191 KB
- Stars: 6
- Watchers: 2
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.rst
- License: LICENSE.txt
Awesome Lists containing this project
README
MarkNote
--------
|PyPI Version|
|Python Versions|
|Django Versions|
|License|
|Build Status|
|Codacy Quality Badge|
|Codacy Coverage Badge|
A simple note taking API for Django that supports creating notes and a folder structure. Built for the purpose of
learning how to use the Django REST Framework to build a CRUD API.
Features
--------
- Notes and folder structure
- Per item owners
- Integrated Django permissions
**Planned Features**
- Revision history
- Bearer token support
- Note sharing
- Ownership transfer
Installation
------------
1. Install with pip.
::
$ pip install marknote
2. Modify your ``INSTALLED_APPS`` in settings.py.
::
INSTALLED_APPS = [
'rest_framework',
'rest_framework.authtoken',
'marknote',
]
3. Modify you ``urlpatterns`` in urls.py.
::
from django.urls import include, re_path
urlpatterns = [
re_path(r'^marknote/', include(('marknote.urls', 'marknote'), namespace='marknote'))
]
4. Run migrations.
::
$ python manage.py migrate
5. In the Django admin panel, generate a new token for the desired user. If they are not a superuser then they will
need the MarkNote permissions added to their user.
The request expects an ``Authorization`` header with the value of ``Token xxx`` where ``xxx`` is your token. This
will be changed in the future to add Bearer token support.
Endpoints
---------
Documentation can be found `here `_. Refer to the
``docs`` folder for the OpenAPI specification file.
There are four different endpoints for the API. The ``marknote`` portion of the URI can be mapped using the Django
urls.py file. It is setup as shown in the sample project.
/marknote/note
The create and list endpoint used to create and list all notes.
/marknote/note/{id}
The retrieve, update, and destroy endpoint used to access individual notes.
/marknote/folder
The create and list endpoint used to create and list all folders.
/marknote/folder/{id}
The retrieve, update, and destroy endpoint used to access individual folders.
Tests
-----
To run the unit tests, simply use the Django test command with Pipenv.
::
$ pipenv install
$ pipenv run python manage.py test
.. |PyPI Version| image:: https://img.shields.io/pypi/v/marknote.svg
:target: https://pypi.org/project/marknote/
.. |Python Versions| image:: https://img.shields.io/pypi/pyversions/marknote.svg
.. |Django Versions| image:: https://img.shields.io/pypi/djversions/marknote.svg
.. |License| image:: https://img.shields.io/github/license/sheldonkwoodward/marknote.svg
:target: https://github.com/sheldonkwoodward/marknote/LICENSE.txt
.. |Build Status| image:: https://travis-ci.org/sheldonkwoodward/marknote.svg?branch-master
:target: https://travis-ci.org/sheldonkwoodward/marknote
.. |Codacy Quality Badge| image:: https://api.codacy.com/project/badge/Grade/171d5b34125f45e6970a10806dc0ea02
:target: https://www.codacy.com/app/sheldonkwoodward/marknote?utm_source-github.com&utm_medium-referral&utm_content-sheldonkwoodward/marknote&utm_campaign-Badge_Grade
.. |Codacy Coverage Badge| image:: https://api.codacy.com/project/badge/Coverage/171d5b34125f45e6970a10806dc0ea02
:target: https://www.codacy.com/app/sheldonkwoodward/marknote?utm_source-github.com&utm_medium-referral&utm_content-sheldonkwoodward/marknote&utm_campaign-Badge_Coverage