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

Build & Publish

See build.md for detailed build and publishing instructions.

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.2.tar.gz (41.4 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.2-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for intelliopsopenfgasdk_python-0.1.2.tar.gz
Algorithm Hash digest
SHA256 5b23a1d823d9503a9e45dd614d60c8e9ad798cc2984612db838ff82b56deadff
MD5 dd1147176f1bb2415b539726432ea28c
BLAKE2b-256 591fe9a82bcdba1d8a276dfaac1a429e17ca64aab001064946f161ec435f6a75

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for intelliopsopenfgasdk_python-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c97cc4719b810b6ab231d2841c7acd35a40be9a61935e34b8f39fedcd04f965f
MD5 81b208fab99fbb326338187d70054459
BLAKE2b-256 70f1711b320d31abfebff161f4dc3b3923c6651dbd7d767cda0b2e2ff7217a6e

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