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.
Features
Notes and folder structure
Per item owners
Integrated Django permissions
Planned Features
Revision history
Bearer token support
Note sharing
Ownership transfer
Installation
Install with pip.
$ pip install marknote
Modify your INSTALLED_APPS in settings.py.
INSTALLED_APPS = [
'rest_framework',
'rest_framework.authtoken',
'marknote',
]
Modify you urlpatterns in urls.py.
from django.urls import include, re_path
urlpatterns = [
re_path(r'^marknote/', include(('marknote.urls', 'marknote'), namespace='marknote'))
]
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
Release files for marknote 1.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| marknote-1.0.2.tar.gz | 9.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| marknote-1.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 21.2 kB
Release files / marknote-1.0.2.tar.gz
| Download URL | marknote-1.0.2.tar.gz |
|---|---|
| Size | 9.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
41f6e29aa7b25cec35240be0056c94df10c14d1491803ca415bbf9dcd3d191c6
|
|
BLAKE2b-256 checksum How to use checksums |
faeda5afbf88eea380f3e9ed7920aa6f121340c6b3f7707a0c8ee88e444fcee3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.7.0
|
Release files / marknote-1.0.2-py3-none-any.whl
| Download URL | marknote-1.0.2-py3-none-any.whl |
|---|---|
| Size | 11.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7fb0a70b106494d7e9e2ef0874151b5d13d8b9331cafb060a5d1ea76814b5fc5
|
|
BLAKE2b-256 checksum How to use checksums |
03787996f3a616c281b1446f7d67ae9b00348b9fe8fa7e68881a43640e7ccd6f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.7.0
|