Skip to main content

A simple Python client to a GraphQL Knowledge Graph

Project description

Overview

This package is a very simple client for accessing a GraphQL knowledge graph as a HTTP GET request wrapper.

Usage

Create a client:

from pykg import KGClient
kg = KGClient(
  host = 'localhost',
  port = 6543,
  user = 'user',
  password = 'password',
  domain = 'my_kg')

Perform a string based query:

kg.query("{ assets { name } }")

Perform a query, but suppress output:

result = kg.query("{ assets { name } }", pretty_print=False)
print(len(result['assets']))

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

knowledge-graph-client-0.0.4.tar.gz (2.8 kB view hashes)

Uploaded Source

Built Distribution

knowledge_graph_client-0.0.4-py3-none-any.whl (3.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page