This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

A Google AppEngine integration library for Graphene

Upgrade Notes

If you’re upgrading from an older version (pre 1.0 version) please check out the Graphene Upgrade Guide <https://github.com/graphql-python/graphene/blob/master/UPGRADE-v1.0.md>

Installation

To install Graphene-GAE on your AppEngine project, go to your project folder and runthis command in your shell:

pip install graphene-gae -t ./libs

This will install the library and its dependencies to the libs folder under your projects root - so the dependencies get uploaded withyour GAE project when you publish your app.

Make sure the libs folder is in your python path by adding the following to your appengine_config.py:

import sys

for path in ['libs']:
    if path not in sys.path:
        sys.path[0:0] = [path]

Examples

Here’s a simple GAE model:

class Article(ndb.Model):
    headline = ndb.StringProperty()
    summary = ndb.TextProperty()
    text = ndb.TextProperty()

    author_key = ndb.KeyProperty(kind='Author')

    created_at = ndb.DateTimeProperty(auto_now_add=True)
    updated_at = ndb.DateTimeProperty(auto_now=True)

To create a GraphQL schema for it you simply have to write the following:

import graphene
from graphene_gae import NdbObjectType

class ArticleType(NdbObjectType):
    class Meta:
        model = Article

class Query(graphene.ObjectType):
    articles = graphene.List(ArticleType)

    @graphene.resolve_only_args
    def resolve_articles(self):
        return Article.query()

schema = graphene.Schema(query=QueryRoot)

Then you can simply query the schema:

To learn more check out the following examples:

Contributing

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

make deps
make install

Make sure tests and lint are running:

make test
make lint

History

1.0.6 (2016-12-06)

  • Fixed DeadlineExceededError import swo connections properly handle timeouts

1.0.5 (2016-11-23)

1.0.3 (2016-11-22)

1.0.2 (2016-10-20)

  • Added _handle_graphql_errors hook to GraphQLHandler

1.0.1 (2016-09-28)

  • Added missing support for StructuredProperty

1.0 (2016-09-26)

  • Upgraded to Graphene 1.0

0.1.9 (2016-08-17)

  • Each NdbObject now exposes an ndbId String field that maps to the entity’s key.id()
  • Added ndb boolean argument to NdbKeyStringField so now when looking at KeyProperty we can fetch either global GraphQL id or the NDB internal id.

0.1.8 (2016-08-16)

  • Made connection_from_ndb_query resilient to random ndb timeouts

0.1.7 (2016-06-14)

0.1.6 (2016-06-10)

0.1.5 (2016-06-08)

0.1.4 (2016-06-02)

  • NdbConnectionField added arguments that can be used in quert:
    • keys_only - to execute a keys only query
    • batch_size - to control the NDB query iteration batch size
    • page_size - control the page sizes when paginating connection results
  • Added support for LocalStructuredProperty.
    • Given a property ndb.LocalStructuredType(Something) it will automatically map to a Field(SomethingType) - SomethingType has to be part of the schema.
    • Support for repeated and required propeties.

0.1.3 (2016-05-27)

  • Added graphene_gae.webapp2.GraphQLHandler - a basic HTTP Handler to process GraphQL requests

0.1.1 (2016-05-25)

  • Updated graphene dependency to latest 0.10.1 version.
    • NdbConnection.from_list now gets context as parameter

0.1.0 (2016-05-11)

  • First release on PyPI.
Release History

Release History

1.0.6

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.0.5

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.0.4

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.0.3

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.0.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.0.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
graphene_gae-1.0.6-py2.py3-none-any.whl (14.0 kB) Copy SHA256 Checksum SHA256 py2.py3 Wheel Dec 6, 2016
graphene_gae-1.0.6.tar.gz (25.8 kB) Copy SHA256 Checksum SHA256 Source Dec 6, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting