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
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
Requires-Dist: graphql-core (<4,>=3.1.0b1)
Requires-Dist: graphql-relay (<4,>=3.0)
Requires-Dist: aniso8601 (<9,>=8)
Requires-Dist: unidecode (<2,>=1.1.1)
Provides-Extra: dev
Requires-Dist: black (==19.10b0) ; extra == 'dev'
Requires-Dist: flake8 (<4,>=3.7) ; extra == 'dev'
Requires-Dist: pytest (<6,>=5.3) ; extra == 'dev'
Requires-Dist: pytest-benchmark (<4,>=3.2) ; extra == 'dev'
Requires-Dist: pytest-cov (<3,>=2.8) ; extra == 'dev'
Requires-Dist: pytest-mock (<3,>=2) ; extra == 'dev'
Requires-Dist: pytest-asyncio (<2,>=0.10) ; extra == 'dev'
Requires-Dist: snapshottest (<1,>=0.5) ; extra == 'dev'
Requires-Dist: coveralls (<2,>=1.11) ; extra == 'dev'
Requires-Dist: promise (<3,>=2.3) ; extra == 'dev'
Requires-Dist: mock (<5,>=4.0) ; extra == 'dev'
Requires-Dist: pytz (==2019.3) ; extra == 'dev'
Requires-Dist: iso8601 (<2,>=0.1) ; extra == 'dev'
Provides-Extra: test
Requires-Dist: pytest (<6,>=5.3) ; extra == 'test'
Requires-Dist: pytest-benchmark (<4,>=3.2) ; extra == 'test'
Requires-Dist: pytest-cov (<3,>=2.8) ; extra == 'test'
Requires-Dist: pytest-mock (<3,>=2) ; extra == 'test'
Requires-Dist: pytest-asyncio (<2,>=0.10) ; extra == 'test'
Requires-Dist: snapshottest (<1,>=0.5) ; extra == 'test'
Requires-Dist: coveralls (<2,>=1.11) ; extra == 'test'
Requires-Dist: promise (<3,>=2.3) ; extra == 'test'
Requires-Dist: mock (<5,>=4.0) ; extra == 'test'
Requires-Dist: pytz (==2019.3) ; extra == 'test'
Requires-Dist: iso8601 (<2,>=0.1) ; extra == 'test'

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.


