Skip to main content

aiohttp powered apollo like graphql client

Project description

rath

codecov PyPI version Maintenance Maintainer PyPI pyversions PyPI status PyPI download month

DEVELOPMENT

Inspiration

Rath is an Apollo (that typescript thing) like library for python, it supports a link like structure to facilitate and multiple links

Features

  • includes modular links to support specificatiosn for

    • Subscriptions (via websockets)
    • File Uploads (multipart specifications)
  • Works well with turms created queries

Installation

pip install rath

Usage Query

from rath.links.auth import AuthTokenLink
from rath.links.aiohttp import AioHttpLink
from rath.gql import gql

auth = AuthTokenLink(token_loader=aload_token)
link = AioHttpLink(url="http://localhost:3000/graphql")


rath = Rath(links=[auth,link])

rath.connect()

query = qgl("query space ex")

result = rath.execute(query)

Generate beautifully typed Operations, Enums,...

Why Rath

Well "apollo" is already taken as a name, and rath (according to wikipedia) is an etruscan deity identified with Apollo.

Examples

This github repository also contains an example client with a turms generated query with the public SpaceX api, as well as a sample of the generated api.

CLI

rath run

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

rath-0.1.2.tar.gz (2.2 kB view hashes)

Uploaded Source

Built Distribution

rath-0.1.2-py3-none-any.whl (2.0 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