Skip to main content

Make creating rest APIs in Django simple.

Project description

Rested

Make creating rest APIs in Django simple.

Rested is a simple batteries included tool to make building rest API's using Django fast and easy.

Usage

Quick Start

Command Line

The command line interface has commands to start a dev server, run development shell, run tests, run Django management commands, create an empty example project, and run a Celery background task worker.

Validation

To validate a field you must start with a root validator: to, am, accepts, or optional. All root validators check that a field is defined before proceeding with the exception of optional which will immediately accept if the field is undefined on the json object.

Contributing

Lauching Dev Stack

Use docker compose to launch development stack.

Running Tests

To run tests:
pytest

To run a specific test suite:
pytest -s -k test_rested

To run a specific test in a suite:
pytest -s -k "test_validate and test_check"

To run tests with auto reload:
env PYTHONPATH="/rested/tests" ptw

To run tests with auto reload and specific test:
env PYTHONPATH="/rested/tests" ptw --runner "pytest -s -k test_rested"

To see print statements of passing tests use the -s flag

Note: Errors like this might have a root exception with more detail and may mean you are missing migrations: psycopg2.errors.InvalidCursorName

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-rested-0.0.15.tar.gz (20.8 kB view details)

Uploaded Source

File details

Details for the file django-rested-0.0.15.tar.gz.

File metadata

  • Download URL: django-rested-0.0.15.tar.gz
  • Upload date:
  • Size: 20.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.2

File hashes

Hashes for django-rested-0.0.15.tar.gz
Algorithm Hash digest
SHA256 d6e1a7d829062413e0c34c19ca6669fc49879e9561b23c38aa887fad382e5a35
MD5 b1f77fedf9ba04178ea4d05244bf10d3
BLAKE2b-256 118feb23e9c57f9d53c1736d68d2ddf56bd15da4ff357ac005d75ee10507254c

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