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 hashes)

Uploaded Source

Built Distribution

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

Uploaded Python 3

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