Skip to main content

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.

Project description

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
  1. Modify your INSTALLED_APPS in settings.py.

INSTALLED_APPS = [
    'rest_framework',
    'rest_framework.authtoken',
    'marknote',
]
  1. Modify you urlpatterns in urls.py.

from django.urls import include, re_path

urlpatterns = [
    re_path(r'^marknote/', include(('marknote.urls', 'marknote'), namespace='marknote'))
]
  1. 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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

marknote-1.0.2.tar.gz (9.9 kB view details)

Uploaded Source

Built Distribution

marknote-1.0.2-py3-none-any.whl (11.3 kB view details)

Uploaded Python 3

File details

Details for the file marknote-1.0.2.tar.gz.

File metadata

  • Download URL: marknote-1.0.2.tar.gz
  • Upload date:
  • Size: 9.9 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for marknote-1.0.2.tar.gz
Algorithm Hash digest
SHA256 41f6e29aa7b25cec35240be0056c94df10c14d1491803ca415bbf9dcd3d191c6
MD5 7bd423f2f759cf9bee501f3e8dd304ba
BLAKE2b-256 faeda5afbf88eea380f3e9ed7920aa6f121340c6b3f7707a0c8ee88e444fcee3

See more details on using hashes here.

File details

Details for the file marknote-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: marknote-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 11.3 kB
  • Tags: Python 3
  • Uploaded using 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

File hashes

Hashes for marknote-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 7fb0a70b106494d7e9e2ef0874151b5d13d8b9331cafb060a5d1ea76814b5fc5
MD5 7f54df277ebdb051e35c703712651040
BLAKE2b-256 03787996f3a616c281b1446f7d67ae9b00348b9fe8fa7e68881a43640e7ccd6f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page