Skip to main content

Rag

Make creating rest APIs in Django simple.

Rag 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.

Dev Setup

To install development requirements. poetry install

Running Dev Tests

To run tests:
poetry run poe test

To run a specific test or test file:
poetry run poe test -k test_rag.py

To run a specific test in a suite:
poetry run poe test -k "test_validate.py and test_check"

To see all print statements of passing tests use the -s flag poetry run poe test -s

To run tests with auto reload:
poetry run poe test-watch

To run tests with auto reload and specific test:
poetry run poe test-watch -k test_name

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

Running Template Integration Tests

From project root folder enter poetry shell poetry shell Enter template folder cd ./rag/templates/large Run tests rag test

Running All Tests

To run all unit and integration tests:

poetry run ./scripts/test_all.py

Metadata

Release files for rag 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rag 0.1.0
File Size Uploaded
rag-0.1.0.tar.gz 34.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for rag 0.1.0
File Interpreter ABI Platform
rag-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 95.1 kB

Release files / rag-0.1.0.tar.gz

Download URL rag-0.1.0.tar.gz
Size 34.5 kB
Tags Source
SHA-256 checksum
How to use checksums
35a7392d5c467410b33c099347d656e2432def4f44afefe6e1bfc0bcdba61d2d
BLAKE2b-256 checksum
How to use checksums
3fd03dafd78d4ddf01be93adfcdda8f52fd4f6a0d876acd3101841f9996c4e66
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.14 CPython/3.10.6 Linux/5.15.0-53-generic

Release files / rag-0.1.0-py3-none-any.whl

Download URL rag-0.1.0-py3-none-any.whl
Size 60.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4108edd357c0faecbb9844ff894ffb0ad14c7b8003ce46d95f60b698cbd29f0c
BLAKE2b-256 checksum
How to use checksums
e74b6e96202820a7e2183d32a2bdadd41fe19e37f1443dca4a01816b14811b84
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.14 CPython/3.10.6 Linux/5.15.0-53-generic

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

0.0.21

2 release files

0.0.20

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page