Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Please read UPGRADE-v2.0.md to learn how to upgrade to Graphene 2.0.


Graphene Logo Graphene Build Status PyPI version Coverage Status

Graphene is a Python library for building GraphQL schemas/types fast and easily.

  • Easy to use: Graphene helps you use GraphQL in Python without effort.

  • Relay: Graphene has builtin support for Relay.

  • Data agnostic: Graphene supports any kind of data source: SQL (Django, SQLAlchemy), NoSQL, custom Python objects, etc. We believe that by providing a complete API you could plug Graphene anywhere your data lives and make your data available through GraphQL.

Integrations

Graphene has multiple integrations with different frameworks:

integration

Package

Django

graphene-django

SQLAlchemy

graphene-sqlalchemy

Google App Engine

graphene-gae

Peewee

In progress (Tracking Issue)

Also, Graphene is fully compatible with the GraphQL spec, working seamlessly with all GraphQL clients, such as Relay, Apollo and gql.

Installation

For instaling graphene, just run this command in your shell

pip install "graphene>=2.0"

2.0 Upgrade Guide

Please read UPGRADE-v2.0.md to learn how to upgrade.

Examples

Here is one example for you to get started:

class Query(graphene.ObjectType):
    hello = graphene.String(description='A typical hello world')

    def resolve_hello(self):
        return 'World'

schema = graphene.Schema(query=Query)

Then Querying graphene.Schema is as simple as:

query = '''
    query SayHello {
      hello
    }
'''
result = schema.execute(query)

If you want to learn even more, you can also check the following examples:

Contributing

After cloning this repo, ensure dependencies are installed by running:

pip install -e ".[test]"

After developing, the full test suite can be evaluated by running:

py.test graphene --cov=graphene --benchmark-skip # Use -v -s for verbose mode

You can also run the benchmarks with:

py.test graphene --benchmark-only

Documentation

The documentation is generated using the excellent Sphinx and a custom theme.

The documentation dependencies are installed by running:

cd docs
pip install -r requirements.txt

Then to produce a HTML version of the documentation:

make html

Release files for graphene 2.0.dev20170725061556

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

Source distribution (sdist)

Source distribution for graphene 2.0.dev20170725061556
File Size Uploaded
graphene-2.0.dev20170725061556.tar.gz 40.5 kB Details

Release files / graphene-2.0.dev20170725061556.tar.gz

Download URL graphene-2.0.dev20170725061556.tar.gz
Size 40.5 kB
Tags Source
SHA-256 checksum
How to use checksums
20b0be026bcaa5882e527fee5cfaa618c7f6901a66abf0823ee336b9a4a82c0a
BLAKE2b-256 checksum
How to use checksums
2e7c0235a8c02093e28d3c42686d1e0426a797ef5c5a2e5ae636098c9c68dcd1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

3.4.3

2 release files

3.4.2

2 release files

3.4.1

2 release files

3.4

2 release files

3.3

2 release files

3.2.2

2 release files

3.2.1

2 release files

3.2

2 release files

3.1.1

2 release files

3.1

2 release files

3.0

2 release files

2.1.9

2 release files

2.1.8

2 release files

2.1.7

2 release files

2.1.6

2 release files

2.1.5

2 release files

2.1.3

2 release files

2.1.2

2 release files

2.1.1

2 release files

2.1

2 release files

2.0.1

2 release files

2.0

2 release files

This release

1.4.2

1 release file

1.4.1

1 release file

1.4

1 release file

1.3

1 release file

1.2

1 release file

1.1.3

1 release file

1.1.2

1 release file

1.1.1

1 release file

1.1

1 release file

1.0.2

1 release file

1.0.1

1 release file

1.0

1 release file

0.10.2

1 release file

0.10.1

1 release file

0.10.0

1 release file

0.9.1

1 release file

0.9

1 release file

0.8.1

1 release file

0.8.0

1 release file

0.7.3

1 release file

0.7.2

1 release file

0.7.1

1 release file

0.7.0

1 release file

0.6.1

1 release file

0.6.0

1 release file

0.5.0

1 release file

0.4.3

1 release file

0.4.2

1 release file

0.4.1.1

1 release file

0.4.1

1 release file

0.4.0.1

1 release file

0.4.0

1 release file

0.3.0

1 release file

0.1.6.1

1 release file

0.1.6.0

1 release file

0.1.6

0.1.5.3

1 release file

0.1.5.2

1 release file

0.1.5.1

1 release file

0.1.5

1 release file

0.1.4

1 release file

0.1.3

1 release file

0.1.2

1 release file

0.1.1

1 release file

0.1.0

1 release file

0.0.1

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