OpenFGA DSL Parser (Python)
The OpenFGA DSL Parser provides utilities for parsing DSL file string inputs into an AST representation, as well as transforming them into a JSON representation.
This library is meant to be a utility for services using OpenFGA for their authorization solution, but need a way to translate from their DSL to the JSON format the HTTP API expects.
Usage
from openfga_dsl_parser import dsl_to_json
input = """type group
relations
define member as self
type resource
relations
define writer as self
define reader as self but not writer"""
json = dsl_to_json(input)
print(json)
Development
Setup Python environment & install Maturin:
python -m venv .nenvsource .venv/bin/activatepip install maturin
Install & build package using Maturin for local testing:
maturin develop
Metadata
Release files for openfga-dsl-parser-python 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| openfga_dsl_parser_python-0.1.0.tar.gz | 6.6 kB | Details |
Built distributions (wheels)
Total release size: 8.8 MB
Release files / openfga_dsl_parser_python-0.1.0.tar.gz
| Download URL | openfga_dsl_parser_python-0.1.0.tar.gz |
|---|---|
| Size | 6.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
64331ba0591354b315036691eb0e2e5c359abe52e4ed56c407117267ba9b31ba
|
|
BLAKE2b-256 checksum How to use checksums |
d813e5d684fb869065d35a57fab3e04a563ed60ab0f69c86b999a08a7003e5a1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/0.13.1
|
Release files / openfga_dsl_parser_python-0.1.0-pp38-pypy38_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.whl
| Download URL | openfga_dsl_parser_python-0.1.0-pp38-pypy38_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.whl |
|---|---|
| Size | 1.0 MB |
| Tags | Linux glibc 2.5+ x86-64 PyPy 3.8 PyPy 3.8 7.3 |
|
SHA-256 checksum How to use checksums |
16d06ebbe7440ecd8bfeb74c8321913c9fb66cefe17a66078dd675b680c01120
|
|
BLAKE2b-256 checksum How to use checksums |
d77facee673e9dc21d1294b6b0308968806676882dd2f0b8d45e2a3d3580ab15
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/0.13.1
|
Release files / openfga_dsl_parser_python-0.1.0-pp37-pypy37_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.whl
| Download URL | openfga_dsl_parser_python-0.1.0-pp37-pypy37_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.whl |
|---|---|
| Size | 1.0 MB |
| Tags | Linux glibc 2.5+ x86-64 PyPy 3.7 PyPy 3.7 7.3 |
|
SHA-256 checksum How to use checksums |
be24aa8715f7ef779e569329260e5bff6693026ff3b64ecf5415a4424f7f464c
|
|
BLAKE2b-256 checksum How to use checksums |
3ab18725ab0e3650d4bbda958a03d26df8a7c99b3ec58aa51cbdf639a264bf87
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/0.13.1
|
Release files / openfga_dsl_parser_python-0.1.0-cp310-none-win_amd64.whl
| Download URL | openfga_dsl_parser_python-0.1.0-cp310-none-win_amd64.whl |
|---|---|
| Size | 152.8 kB |
| Tags | CPython 3.10 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
55eeeca55d5cb2805575717ec06d0e16b3a26fc11c965bfeb09ebfb57d824d60
|
|
BLAKE2b-256 checksum How to use checksums |
4f9183f48d6e1828c8b2ee006bacf117c9ec91f5476311cfae7316a6cd06e333
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/0.13.1
|
Release files / openfga_dsl_parser_python-0.1.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.whl
| Download URL | openfga_dsl_parser_python-0.1.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.whl |
|---|---|
| Size | 1.0 MB |
| Tags | CPython 3.10 Linux glibc 2.5+ x86-64 |
|
SHA-256 checksum How to use checksums |
62ff0d770e7511919f4bd9ef2e785a65f89fb4ab4fe5a0cc97745aa90e7c88c5
|
|
BLAKE2b-256 checksum How to use checksums |
5c004e4029a11469c30d1d6d20cfd8f8062b6c752e5ca46466b9a1c8e0bf248a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/0.13.1
|
Release files / openfga_dsl_parser_python-0.1.0-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
| Download URL | openfga_dsl_parser_python-0.1.0-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl |
|---|---|
| Size | 505.4 kB |
| Tags | CPython 3.10 macOS 10.9+ universal2 (ARM64, x86-64) macOS 10.9+ x86-64 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
997b2ea65e99c416cdc4b90a7f4cdeb49c5e02add36df2f6f718a041d864f76f
|
|
BLAKE2b-256 checksum How to use checksums |
34d64d8c95723e7491eb59ffaa3dba0b8f749fb7ac7f2b4a152f106ee927852f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/0.13.1
|
Release files / openfga_dsl_parser_python-0.1.0-cp39-none-win_amd64.whl
| Download URL | openfga_dsl_parser_python-0.1.0-cp39-none-win_amd64.whl |
|---|---|
| Size | 152.8 kB |
| Tags | CPython 3.9 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
5984d2d4309945ca0d7bfd62f637851847edd39a0089d7737749b7c1aaa6ac6a
|
|
BLAKE2b-256 checksum How to use checksums |
38c776ca1827b07ffe1bae12529d12b75d1f12a52ad57cf238a6761119257c27
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/0.13.1
|
Release files / openfga_dsl_parser_python-0.1.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl
| Download URL | openfga_dsl_parser_python-0.1.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl |
|---|---|
| Size | 1.0 MB |
| Tags | CPython 3.9 Linux glibc 2.5+ x86-64 |
|
SHA-256 checksum How to use checksums |
c9db2b486a05b06563671d86afccbc3761e6d016c7aec0d4e0082526b249d1a6
|
|
BLAKE2b-256 checksum How to use checksums |
f9c52e64ad18535e2f29c392ca932ac51f12e0e2cf7cb04e01c7f3fb9cde6c50
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/0.13.1
|
Release files / openfga_dsl_parser_python-0.1.0-cp39-cp39-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
| Download URL | openfga_dsl_parser_python-0.1.0-cp39-cp39-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl |
|---|---|
| Size | 505.2 kB |
| Tags | CPython 3.9 macOS 10.9+ universal2 (ARM64, x86-64) macOS 10.9+ x86-64 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
0b6969c535f86124bc3562e8c0190ddc0374a097e5b97da353897df927e47e79
|
|
BLAKE2b-256 checksum How to use checksums |
c082db47d1849db2890258ad0d44106e24262879b2cf49dfba2d3fd1d4a86dff
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/0.13.1
|
Release files / openfga_dsl_parser_python-0.1.0-cp38-none-win_amd64.whl
| Download URL | openfga_dsl_parser_python-0.1.0-cp38-none-win_amd64.whl |
|---|---|
| Size | 152.6 kB |
| Tags | CPython 3.8 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
a4c0fe664a110501ada6d79971a2ea56132ab581bc58edf974f77e8ec90c9345
|
|
BLAKE2b-256 checksum How to use checksums |
8b21d62d0e27b4a87a204f877fbf035a70171701983e048796be6cac817edc16
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/0.13.1
|
Release files / openfga_dsl_parser_python-0.1.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl
| Download URL | openfga_dsl_parser_python-0.1.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl |
|---|---|
| Size | 1.0 MB |
| Tags | CPython 3.8 Linux glibc 2.5+ x86-64 |
|
SHA-256 checksum How to use checksums |
ccac17216fbec42e0c6a60ce792843e511f98ddf558e8ed2c77dde48603bf55a
|
|
BLAKE2b-256 checksum How to use checksums |
e99fcdc81e9e529e7a97d1cda6adf6ad9dc615c2a7ea4e58f00642b760204e21
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/0.13.1
|
Release files / openfga_dsl_parser_python-0.1.0-cp38-cp38-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
| Download URL | openfga_dsl_parser_python-0.1.0-cp38-cp38-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl |
|---|---|
| Size | 505.6 kB |
| Tags | CPython 3.8 macOS 10.9+ universal2 (ARM64, x86-64) macOS 10.9+ x86-64 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
a0c98364b516f3e87fb94e3f0c6a04a12ae1c4b8445ef54801a47af79b47a35e
|
|
BLAKE2b-256 checksum How to use checksums |
3155704c7eb564807ff236c1e21bddc6937f0ce9be1eb0931d59aedb9c609925
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/0.13.1
|
Release files / openfga_dsl_parser_python-0.1.0-cp37-none-win_amd64.whl
| Download URL | openfga_dsl_parser_python-0.1.0-cp37-none-win_amd64.whl |
|---|---|
| Size | 152.6 kB |
| Tags | CPython 3.7 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
b72158b7ce3698a37244e1ecee1ae66371dd08a6f05da214c2685d988cc9d522
|
|
BLAKE2b-256 checksum How to use checksums |
26d9ebc5d8e55a54c6f30b7ed122b8164a1ede81da6033fecc652e55b8845538
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/0.13.1
|
Release files / openfga_dsl_parser_python-0.1.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl
| Download URL | openfga_dsl_parser_python-0.1.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl |
|---|---|
| Size | 1.0 MB |
| Tags | CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.5+ x86-64 |
|
SHA-256 checksum How to use checksums |
8189e24e443d94a3eddd28852c90df09be84e6f1b43c400d2edd0a4d69364ab8
|
|
BLAKE2b-256 checksum How to use checksums |
db0e86be309a9007990c7909406e1b82ad957e21a0652be673e1da61a7a8ba1c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/0.13.1
|
Release files / openfga_dsl_parser_python-0.1.0-cp37-cp37m-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
| Download URL | openfga_dsl_parser_python-0.1.0-cp37-cp37m-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl |
|---|---|
| Size | 505.7 kB |
| Tags | CPython 3.7 CPython 3.7 pymalloc macOS 10.9+ universal2 (ARM64, x86-64) macOS 10.9+ x86-64 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
5960e011a49e1137df11ed63a69f7ff74b3e4d8e55496c7a0174ba1dd04ffe72
|
|
BLAKE2b-256 checksum How to use checksums |
61d5b8de23537bac52364b8b41b15737bb5ef88ca853c14a2e7ec9f288c9d5fb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/0.13.1
|