Skip to main content

A functional resource-oriented Web framework

Project description

RESTrict Framework

Please see https://restrictframework.io for the most up-to-date documentation.

TODO

  • TODO: Change Ref -> Self visitor to skip data section
  • TODO: Write visitor to check Self in data section
  • TODO: Allow stars in security sections
  • TODO: Update visitors.MatchRelDeclared...#visit_rel to search mods, too, for built-in resources
  • TODO: Update visitors.MatchOverridenResource...#visit_resource to search mods, too, for built-in resources
  • TODO: Consider allowing modification of restrict resources in ResolveModifyTypeVisitor

NOTES

Compiler pipeline steps:

  1. Check for duplicate field and resource names
  2. Replace refs with func params
  3. Replace refs with selfs
  4. Resolve declared types
    1. Resolve data constrained field type (res: type)
    2. Resolve rel type (res: bridge, restrict resource, or collection)
    3. Resolve create type (res: bridge or restrict resource)
    4. Resolve base resource type (base: bridge)
  5. Resolve inherited fields
  6. Resolve inherited rels
  7. Resolve inherited effects
  8. Resolve inherited security
  9. Resolve inherited workflows
  10. Resolve used resources
  11. Resolve global names
  12. Resolve func referenced function (res: function)
  13. Resolve computed types of expressions
    1. Resolve effect field type (res: type or bridge)
    2. Resolve value type (res: type)
    3. Resolve selves type (res: bridge)
    4. Resolve self types (path_res: [bridge, ..., type])
    5. Resolve literal types (res: type)
    6. Resolve tagged literal types (res: type)
    7. Resolve modify type (res: bridge)
    8. Resolve ref type from globals (path_res: type: bridge, ..., type)
  14. Check for cycles
  15. Resolve data computed field type (func_res: type)
  16. Resolve remaining self values
  17. Resolve func return type and make sure it matches expected type
    1. Check data constraint (bool)
    2. Check security rule (bool)
    3. Check effect (func_res matches res for referenced field)
  18. Compile funcs (compiled)
  19. Compile resources

Expresison types

  • Data constraints can include literals, functions, self, selves, tagged literals, and value
  • Data computed fields can include literals, functions, refs, self, selves, and tagged literals
  • Effects can include all create, literals, functions, modify, refs, self, selves, and tagged literals
  • Security can include literals, functions, refs, self, and tagged literals
  • Workflows can include literals, refs, self, selves, and tagged literals

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

restrict_framework-0.2.1a0.tar.gz (75.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

restrict_framework-0.2.1a0-py3-none-any.whl (84.9 kB view details)

Uploaded Python 3

File details

Details for the file restrict_framework-0.2.1a0.tar.gz.

File metadata

  • Download URL: restrict_framework-0.2.1a0.tar.gz
  • Upload date:
  • Size: 75.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: poetry/2.1.1 CPython/3.12.9 Linux/5.15.154+

File hashes

Hashes for restrict_framework-0.2.1a0.tar.gz
Algorithm Hash digest
SHA256 3d7afdae890e74e00896d5cc49bc727d71b5ea7a5db5780a7e864b6466413947
MD5 44dfcec50929e5661d9f595992e448a7
BLAKE2b-256 02cbee020c045f7b1ace37fbf32cd42c31ee3441753737a47591999130820b01

See more details on using hashes here.

File details

Details for the file restrict_framework-0.2.1a0-py3-none-any.whl.

File metadata

File hashes

Hashes for restrict_framework-0.2.1a0-py3-none-any.whl
Algorithm Hash digest
SHA256 1ad48e4f8ca3307b09874998e6cc8e3d9a20260f71ee903f4f6fd5fce8b7772c
MD5 1bdfa9d22601cc6c36c38b16b22e7b79
BLAKE2b-256 3dc8a6d218865a978c0c567310339ac07e669d57ababb64d02b682dada99a9e7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page