Skip to main content

Add your description here

Project description

IntelliOpsOpenFgaSDK-Python

An efficient, asynchronous Python SDK for communicating with the IntelliOps FGA API.

Features

  • Async API calls using aiohttp
  • Fast and efficient client
  • Easy integration with asyncio-based applications
  • Example methods for permission checking and listing

Installation

Install from local directory:

pip install .

Or install dependencies for development:

pip install -r requirements.txt

Usage Examples

1. Initialize FGA Data Source

from intelliopsopenfgasdk_python.intelliops_openfga_sdk import IntelliOpsOpenFgaSDK
from intelliopsopenfgasdk_python.models import CreateDataSourceModel

sdk = IntelliOpsOpenFgaSDK()
datasource_model = CreateDataSourceModel(
    orgId="your-org-id",
    connectorType="Confluence",
    fgaStoreId="your-fga-store-id",
    tenantId="your-tenant-id"
)
sdk.init_datasource(datasource_model)

2. Initialize FGA

from intelliopsopenfgasdk_python.intelliops_openfga_sdk import IntelliOpsOpenFgaSDK
from intelliopsopenfgasdk_python.models import CreateFgaModel

sdk = IntelliOpsOpenFgaSDK()
fga_model = CreateFgaModel(
    token="your-token",
    tenantId="your-tenant-id",
    connectorType="Confluence",
    orgId="your-org-id",
    fgaStoreId="your-fga-store-id"
)
sdk.init_fga(fga_model)

3. Check Access

from intelliopsopenfgasdk_python.intelliops_openfga_sdk import IntelliOpsOpenFgaSDK

sdk = IntelliOpsOpenFgaSDK()
user_id = "user-id"
l2_object_id = "object-id"
has_access = sdk.check_access(user_id, l2_object_id)
print("User has access?", has_access)

Testing

Run tests using pytest:

pytest

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

intelliopsopenfgasdk_python-0.1.1.tar.gz (40.7 kB view details)

Uploaded Source

Built Distribution

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

intelliopsopenfgasdk_python-0.1.1-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

Details for the file intelliopsopenfgasdk_python-0.1.1.tar.gz.

File metadata

File hashes

Hashes for intelliopsopenfgasdk_python-0.1.1.tar.gz
Algorithm Hash digest
SHA256 e021987541fd5d395ed29269458b3eda2609f5a806dca46a1831fec191349210
MD5 4100d3a555dd4d76e6ece73ba0c15a1c
BLAKE2b-256 3f30b8e740d1e5db16605134b59d4997d40b70232f7f73a6e1891a6e55826e43

See more details on using hashes here.

File details

Details for the file intelliopsopenfgasdk_python-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for intelliopsopenfgasdk_python-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 02e22843d1af941f7f23ed69ce0e5727787a2f44548446391521260243d49535
MD5 4ad12849ddd21c1054bdc4ca47f035f5
BLAKE2b-256 3dba3f035722158b29945e88a47121e60dc8371fa1ce598e2991e52a940e9625

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