Skip to main content

A RESTful JSON API for django-fiction-outlines. Part of the broader maceoutliner project.

Project description

https://badge.fury.io/py/django-fiction-outlines-api.svg https://github.com/maceoutliner/django-fiction-outlines-api/actions/workflows/tests.yml/badge.svg?branch=master https://coveralls.io/repos/github/maceoutliner/django-fiction-outlines-api/badge.svg?branch=master Documenatation Status

A RESTful JSON API for django-fiction-outlines.

Documentation

The full documentation is at https://django-fiction-outlines-api.readthedocs.io. The source code can be found at https://github.com/maceoutliner/django-fiction-outlines-api/.

Quickstart

Install Django Fiction Outlines API:

pip install django-fiction-outlines-api

Add it and dependencies to your INSTALLED_APPS:

INSTALLED_APPS = (
    ...
    '
    'rest_framework',
    'taggit',
    'rules.apps.AutodiscoverRulesConfig',
    'rest_framework_rules',
    'fiction_outlines',
    'fiction_outlines_api',
    ...
)

If you have not already, add rules to you AUTHENTICATION_BACKENDS.

AUTHENTICATION_BACKENDS = (
    'rules.permissions.ObjectPermissionBackend',
    'django.contrib.auth.backends.ModelBackend',
)

Unless you like to live dangerously, it is STRONGLY recommend you configure whichever database you use for outlines to have ATOMIC_REQUESTS to True.

DATABASES = {
    "default": {
        "ENGINE": "django.db.backends.postgresql",
        "NAME": "outlines",
        "ATOMIC_REQUESTS": True,
    }}

Add Django Fiction Outlines API’s URL patterns:

from fiction_outlines_api import urls as fiction_outlines_api_urls


urlpatterns = [
    ...
    url(r'^', include(fiction_outlines_api_urls)),
    ...
]

If you haven’t already installed fiction_outlines you should run python manage.py migrate now.

Features

NOTE: As with fiction_outlines, this app makes use of the excellent object permissions library django-rules.

Running Tests

Does the code actually work?

source <YOURVIRTUALENV>/bin/activate
(myenv) $ pip install -r test_requirements.txt
(myenv) $ pytest
(myenv) $ flake8 setup.py fiction_outlines_api tests

Credits

Tools used in rendering this package:

History

0.3.0 (2022-03-17)

  • Support for django-fiction-outlines 0.4.0

  • Update for Python 3.9 & 3.10

  • Update for Django >= 3.2, < 4.1

0.2.1 (2018-10-16)

  • Support for both python 3.6 and 3.7

0.2.0 (2018-08-08)

  • Support for Django 2.1

0.1.3 (2018-06-21)

  • Move dependency back to official django-taggit-serializer package now that our pull request has been merged.

0.1.0 (2018-04-07)

  • First release on PyPI.

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

django-fiction-outlines-api-0.3.0.tar.gz (18.0 kB view details)

Uploaded Source

Built Distribution

django_fiction_outlines_api-0.3.0-py2.py3-none-any.whl (18.1 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file django-fiction-outlines-api-0.3.0.tar.gz.

File metadata

  • Download URL: django-fiction-outlines-api-0.3.0.tar.gz
  • Upload date:
  • Size: 18.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2

File hashes

Hashes for django-fiction-outlines-api-0.3.0.tar.gz
Algorithm Hash digest
SHA256 7aa34bad60a368b1e6700b17ea2ce44ceedbc68176ac2a86c3d8b4ee1a0c25bf
MD5 4b036a96d2dcbd6ba36526dd81c2dd23
BLAKE2b-256 2bc63bc10ea382ae2155073cc1952fcad3618eff18a13b29e8304c92e28ff847

See more details on using hashes here.

File details

Details for the file django_fiction_outlines_api-0.3.0-py2.py3-none-any.whl.

File metadata

  • Download URL: django_fiction_outlines_api-0.3.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 18.1 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2

File hashes

Hashes for django_fiction_outlines_api-0.3.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 ece3fc64f62ca1cef7b514220c2c26a2e5c7443c40ec01476caa309792ed121b
MD5 03be8e80e35b93e173c66289506a148e
BLAKE2b-256 fe3874a749f543a64544a53a27a742e9ba3a1ec7bce4a20d922a489c9624177f

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