Metadata-Version: 2.1
Name: jetblack-graphene
Version: 3.0b0
Summary: GraphQL Framework for Python
Home-page: https://github.com/graphql-python/graphene
Author: Syrus Akbary
Author-email: me@syrusakbary.com
License: MIT
Description: Forked version of Graphene
        --------------------------
        
        This is a forked version of graphene with support for subscriptions.
        
        For executing a subscription, you can directly call the ``subscribe`` method on it.
        This method is async and must be awaited.
        
        .. code:: python
        
            import asyncio
            from datetime import datetime
            from graphene import ObjectType, String, Schema, Field
        
            # All schema require a query.
            class Query(ObjectType):
                hello = String()
        
                def resolve_hello(root, info):
                    return 'Hello, world!'
        
            class Subscription(ObjectType):
                time_of_day = Field(String)
        
                async def subscribe_time_of_day(root, info):
                    while True:
                        yield { 'time_of_day': datetime.now().isoformat()}
                        await asyncio.sleep(1)
        
            SCHEMA = Schema(query=Query, subscription=Subscription)
        
            async def main(schema):
        
                subscription = 'subscription { timeOfDay }'
                result = await schema.subscribe(subscription)
                async for item in result:
                    print(item.data['timeOfDay'])
        
            asyncio.run(main(SCHEMA))
        
        The ``result`` is an async iterator which yields items in the same manner as a query.
        
Keywords: api graphql protocol rest relay graphene
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Libraries
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Provides-Extra: test
Provides-Extra: dev
