Skip to content

forestvpn/ory-keto-client-python

Repository files navigation

forestvpn-ory-keto-client

Documentation for all of Ory Keto's REST APIs. gRPC is documented separately.

This Python package is automatically generated by the OpenAPI Generator project:

  • API version: v0.9.0-alpha.0
  • Package version: v0.9.0-alpha.0
  • Build package: org.openapitools.codegen.languages.PythonClientCodegen

Requirements.

Python >=3.6

Installation & Usage

pip install

If the python package is hosted on a repository, you can install directly using:

pip install git+https://github.com/forestvpn/ory-keto-client-python.git

(you may need to run pip with root permission: sudo pip install git+https://github.com/forestvpn/ory-keto-client-python.git)

Then import the package:

import ory_keto_client

Setuptools

Install via Setuptools.

python setup.py install --user

(or sudo python setup.py install to install the package for all users)

Then import the package:

import ory_keto_client

Getting Started

Please follow the installation procedure and then run the following:

import time
import ory_keto_client
from pprint import pprint
from ory_keto_client.api import metadata_api
from ory_keto_client.model.generic_error import GenericError
from ory_keto_client.model.get_version200_response import GetVersion200Response
from ory_keto_client.model.is_alive200_response import IsAlive200Response
from ory_keto_client.model.is_ready503_response import IsReady503Response
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = ory_keto_client.Configuration(
    host = "http://localhost"
)



# Enter a context with an instance of the API client
with ory_keto_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = metadata_api.MetadataApi(api_client)

    try:
        # Return Running Software Version.
        api_response = api_instance.get_version()
        pprint(api_response)
    except ory_keto_client.ApiException as e:
        print("Exception when calling MetadataApi->get_version: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to http://localhost

Class Method HTTP request Description
MetadataApi get_version GET /version Return Running Software Version.
MetadataApi is_alive GET /health/alive Check HTTP Server Status
MetadataApi is_ready GET /health/ready Check HTTP Server and Database Status
ReadApi get_check GET /relation-tuples/check/openapi Check a relation tuple
ReadApi get_check_mirror_status GET /relation-tuples/check Check a relation tuple
ReadApi get_expand GET /relation-tuples/expand Expand a Relation Tuple
ReadApi get_relation_tuples GET /relation-tuples Query relation tuples
ReadApi post_check POST /relation-tuples/check/openapi Check a relation tuple
ReadApi post_check_mirror_status POST /relation-tuples/check Check a relation tuple
WriteApi create_relation_tuple PUT /admin/relation-tuples Create a Relation Tuple
WriteApi delete_relation_tuples DELETE /admin/relation-tuples Delete Relation Tuples
WriteApi patch_relation_tuples PATCH /admin/relation-tuples Patch Multiple Relation Tuples

Documentation For Models

Documentation For Authorization

All endpoints do not require authorization.

Author

[email protected]

Notes for Large OpenAPI documents

If the OpenAPI document is large, imports in ory_keto_client.apis and ory_keto_client.models may fail with a RecursionError indicating the maximum recursion limit has been exceeded. In that case, there are a couple of solutions:

Solution 1: Use specific imports for apis and models like:

  • from ory_keto_client.api.default_api import DefaultApi
  • from ory_keto_client.model.pet import Pet

Solution 2: Before importing the package, adjust the maximum recursion limit as shown below:

import sys
sys.setrecursionlimit(1500)
import ory_keto_client
from ory_keto_client.apis import *
from ory_keto_client.models import *

About

Ory Keto Client for Python

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages