Skip to main content

Python wrapper around invoking the OpenFGA CLI (https://github.com/openfga/cli)

Project description

openfga-cli-py

A Python wrapper to provide a pip-installable OpenFGA CLI (fga) binary.

CI PyPI

Installation

pip install openfga-cli-py

Or install a platform wheel directly from a GitHub Release (for air-gapped/offline use):

pip install https://github.com/neeve-ai/openfga-cli-py/releases/download/v0.7.19.0/openfga_cli_py-0.7.19.0-py2.py3-none-linux_x86_64.whl

Usage

After installation, the fga binary is available in your environment:

fga version
fga store list

Or invoke it from Python:

import subprocess
subprocess.run(["fga", "version"], check=True)

Supported Platforms

Platform Architecture
Linux x86_64, arm64, i686
macOS x86_64 (Intel), arm64 (Apple Silicon)
Windows AMD64, ARM64, x86

Note: If your platform is not listed above, installation will fail with an error from setuptools-download. Use a supported platform or build from source.

Note: In air-gapped environments, download the pre-built wheel for your platform from the GitHub Releases page and install it directly with pip install <wheel-file>.

As a pre-commit hook

Add to your .pre-commit-config.yaml:

- repo: https://github.com/neeve-ai/openfga-cli-py
  rev: v0.7.19.0
  hooks:
    - id: fga
      args: [model, validate, --file, openfga.json]

The hook invokes fga directly. Pass any fga subcommands and flags via args.

Updating to a new OpenFGA CLI version

Use the provided script to regenerate setup.cfg for a new upstream release:

chmod +x update_version.sh
./update_version.sh 0.7.20

This downloads the official checksums.txt for the new version and rewrites setup.cfg with updated URLs and SHA-256 hashes for all 8 platforms.

Development

make install   # installs the package and dependencies
make quality   # runs: fga version && fga help, pytest, and builds platform wheel

License

Apache-2.0 — see LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

openfga_cli_py-0.7.19.0-py2.py3-none-win_arm64.whl (9.4 MB view details)

Uploaded Python 2Python 3Windows ARM64

openfga_cli_py-0.7.19.0-py2.py3-none-win_amd64.whl (10.7 MB view details)

Uploaded Python 2Python 3Windows x86-64

openfga_cli_py-0.7.19.0-py2.py3-none-win32.whl (10.7 MB view details)

Uploaded Python 2Python 3Windows x86

openfga_cli_py-0.7.19.0-py2.py3-none-manylinux_2_17_x86_64.whl (10.4 MB view details)

Uploaded Python 2Python 3manylinux: glibc 2.17+ x86-64

openfga_cli_py-0.7.19.0-py2.py3-none-manylinux_2_17_aarch64.whl (9.3 MB view details)

Uploaded Python 2Python 3manylinux: glibc 2.17+ ARM64

openfga_cli_py-0.7.19.0-py2.py3-none-macosx_11_0_arm64.whl (9.8 MB view details)

Uploaded Python 2Python 3macOS 11.0+ ARM64

openfga_cli_py-0.7.19.0-py2.py3-none-macosx_10_9_x86_64.whl (10.7 MB view details)

Uploaded Python 2Python 3macOS 10.9+ x86-64

File details

Details for the file openfga_cli_py-0.7.19.0-py2.py3-none-win_arm64.whl.

File metadata

File hashes

Hashes for openfga_cli_py-0.7.19.0-py2.py3-none-win_arm64.whl
Algorithm Hash digest
SHA256 1b7e332e888ea1453b59a2ef657666c90c45850481de5da77f63496d6b2c1c4f
MD5 ca0eb79b5285b72bfcccc56a07c9762a
BLAKE2b-256 a8595c22bbf26ae4acec65c68ae3666e9bab3d5a67f91e4fbb512d10d13d77e5

See more details on using hashes here.

File details

Details for the file openfga_cli_py-0.7.19.0-py2.py3-none-win_amd64.whl.

File metadata

File hashes

Hashes for openfga_cli_py-0.7.19.0-py2.py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 d994522aca416d7c97591057aa24204f36db20af08c05908da2cd0607193bae3
MD5 e890a4e4b9195d9dce2c1562e40fea48
BLAKE2b-256 ff119184b5e5b7c47cd2096b89f09e74abbc2136ffcd3137aaa58caee75f4793

See more details on using hashes here.

File details

Details for the file openfga_cli_py-0.7.19.0-py2.py3-none-win32.whl.

File metadata

File hashes

Hashes for openfga_cli_py-0.7.19.0-py2.py3-none-win32.whl
Algorithm Hash digest
SHA256 cc67d8ff238d67ac1633dd17e9e267dd7b0479ebdf6f2237a8812a824c2d5a90
MD5 f187c9ef5ac56f27e6f182857de2f698
BLAKE2b-256 9679634eb51ccd387b45ebbba82e8217cb60debebc0c19fbd76f70e28f2d9874

See more details on using hashes here.

File details

Details for the file openfga_cli_py-0.7.19.0-py2.py3-none-manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for openfga_cli_py-0.7.19.0-py2.py3-none-manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 821735775ad46ee27f5cf1e3887719b2ed8efdd1f86f18d84d9d9a07c4fddf2e
MD5 3ebb86ade193dca475d4a293fe52eae4
BLAKE2b-256 120f9b5678a40601817ae5dc77ef83f3ea9a7c394157ce205ebdc7a04e5cd4a7

See more details on using hashes here.

File details

Details for the file openfga_cli_py-0.7.19.0-py2.py3-none-manylinux_2_17_aarch64.whl.

File metadata

File hashes

Hashes for openfga_cli_py-0.7.19.0-py2.py3-none-manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 203e31e4e4e5c1a67e26fe9779d0a0b9a0394be691938503a9d9fd5088efa9ef
MD5 768d597d843a5f34fad8be0e1f2894ea
BLAKE2b-256 b94b7f21bbc1ea087d5acd65dfed014857ccc51e74d28c83facb04a829104b62

See more details on using hashes here.

File details

Details for the file openfga_cli_py-0.7.19.0-py2.py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for openfga_cli_py-0.7.19.0-py2.py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 3bcecda43510edacda2955defe5526f707806e309ff5386d923605db7b59b1d7
MD5 e138d5c4a6a2d9538f1828bd9e02d2c9
BLAKE2b-256 bc4abe73d79fb3ca4634b5e1e37d56c45813a4b6fd3d6c37b95e70fb333081a1

See more details on using hashes here.

File details

Details for the file openfga_cli_py-0.7.19.0-py2.py3-none-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for openfga_cli_py-0.7.19.0-py2.py3-none-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 4e922c8cff9ac343e7019aea7aed37afe817eb1fd99ed4a57bf9fa0772e7c43b
MD5 8f2df329520f63990bbf12810ed68890
BLAKE2b-256 c86808725a4b1359bffd7c627ac061d64600144b49441a1ee4a083c91f86a04f

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