Socket
Socket
Sign inDemoInstall

qlient

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

qlient

A fast and modern graphql client designed with simplicity in mind.


Maintainers
1

Qlient: Python GraphQL Client

DeepSource DeepSource pypi versions license codestyle

A fast and modern graphql client designed with simplicity in mind.

Key Features

Help

See documentation for more details.

If you want more information about the internals, I kindly refer you to the qlient-core documentation.

If you are looking for an asynchronous implementation, I kindly refer you to the qlient-aiohttp sister project.

Installation

pip install qlient

Quick Start

from qlient.http import HTTPClient, GraphQLResponse

client = HTTPClient("https://swapi-graphql.netlify.app/.netlify/functions/index")

res: GraphQLResponse = client.query.film(
    # swapi graphql input fields
    id="ZmlsbXM6MQ==",

    # qlient specific
    _fields=["id", "title", "episodeID"]
)

print(res.request.query)  # query film($id: ID) { film(id: $id) { id title episodeID } }
print(res.request.variables)  # {'id': 'ZmlsbXM6MQ=='}
print(res.data)  # {'film': {'id': 'ZmlsbXM6MQ==', 'title': 'A New Hope', 'episodeID': 4}}

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc