Skip to main content

Django query evaluator, is built on top of XFormula language front-end.

Project description

django-xformula

Django query evaluator, is built on top of XFormula language front-end.


This project is still in development.

If you're interested, you may check the note in XFormula repository.


Features:

  • Bidirectional operators
    • Same syntax for both Python and Django query evaluation
    • Operations contain at least one QuerySet, will be evaluated as QuerySet
    • Operations contain at least one Q, will be evaluated as Q
    • Operations contain at least one Combinable, will be evaluated as Combinable
    • Operations contain at least one Field, will be evaluated as Combinable
    • Operations contain at least one Model instance, will be evaluated as Value which contains the model instance's primary key
    • Other operations work like how Python does
  • Zero built-in variable by defaults
    • When a variable name is used but does not exist in the specified built-ins, it will be evaluated as F object
  • Customizable attribute getter; manage which attributes can be used in formulas (Getting an attribute of an object is forbidden by default, and raises ForbiddenAttribute error which inherits Django's PermissionDenied class)
  • Customizable caller; manage which functions can be called in formulas (Calling a callable is forbidden by default, and raises ForbiddenCall error which inherits Django's PermissionDenied class)

License

MIT

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_xformula-0.1.3.tar.gz (9.0 kB view details)

Uploaded Source

Built Distribution

django_xformula-0.1.3-py3-none-any.whl (13.2 kB view details)

Uploaded Python 3

File details

Details for the file django_xformula-0.1.3.tar.gz.

File metadata

  • Download URL: django_xformula-0.1.3.tar.gz
  • Upload date:
  • Size: 9.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.4

File hashes

Hashes for django_xformula-0.1.3.tar.gz
Algorithm Hash digest
SHA256 1eb6c5e8b9bbfbae3b3976ef08e4904acc1d60eef391f03401f17a72e994e7c7
MD5 253a4cfd7d8d9328cdc6a3c137d75fce
BLAKE2b-256 6adb68feb40e576443f997b0568130e2083ef08c5506febdf984a94d3a9daee1

See more details on using hashes here.

File details

Details for the file django_xformula-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for django_xformula-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 b71d16329eea620ff6fa938a7c45ab136f0f1642052d93700fc878b45cbb7817
MD5 dcf5b71ab6d10e5706463fb959a80f5e
BLAKE2b-256 7114b3d8e0311dcd16d1e6d6950a31a982df3c991f2f529a4f8ffa9bff810d04

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