Skip to main content

gql-query-utils

Python package with graphql queries utilities.

Install

Install with pip:

pip install gql-query-utils

Utilities

Convert graphql query string into dictionary

from gql_query_utils.utils import query_to_dict 

query_dict = query_to_dict("""
query GetThisStuff {
    viewer {
        personal(criteria: {
            name: "PETER",
            lastName: "SCHMIDT"
        }) {
            name
            address
        }
    }
}""")

print(query_dict)

Output:

{
  "query": {
    "viewer": {
      "personal": {
        "__args": {
          "criteria": {
            "name": "PETER",
            "lastName": "SCHMIDT"
          }
        },
        "name": true,
        "address": true
      }
    }
  }
}

Usage

from gql_query_utils.utils import query_to_dict 

query_to_dict(""" ${GQL_QUERY} """)

License

MIT

Metadata

Release files for gql-query-utils 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gql-query-utils 1.0.1
File Size Uploaded
gql_query_utils-1.0.1.tar.gz 6.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for gql-query-utils 1.0.1
File Interpreter ABI Platform
gql_query_utils-1.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 9.4 kB

Release files / gql_query_utils-1.0.1.tar.gz

Download URL gql_query_utils-1.0.1.tar.gz
Size 6.1 kB
Tags Source
SHA-256 checksum
How to use checksums
d5a69513811930f48e698965c97bb69d967fcbe6cc30838666877dd611fece4a
BLAKE2b-256 checksum
How to use checksums
3a1aa517b3b28301e18f87030797d20c21f2da086d619d5f62d40311bc2d1822
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.7.15

Release files / gql_query_utils-1.0.1-py3-none-any.whl

Download URL gql_query_utils-1.0.1-py3-none-any.whl
Size 3.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
11453857551afc9617ea26d33bb8fbdd995fa732652b5cddefc2a8398cc4ad96
BLAKE2b-256 checksum
How to use checksums
68fb0f3c35ea8b852fd8f7bbb708722c75f81179e67cdfb6ada48091065e2260
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.7.15

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page