Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (11.5%) to scientific vocabulary
Keywords
Keywords from Contributors
Repository
A GraphQL client in Python
Basic Info
- Host: GitHub
- Owner: graphql-python
- License: mit
- Language: Python
- Default Branch: master
- Homepage: https://gql.readthedocs.io
- Size: 1.07 MB
Statistics
- Stars: 1,628
- Watchers: 26
- Forks: 184
- Open Issues: 7
- Releases: 43
Topics
Metadata Files
README.md
GQL
This is a GraphQL client for Python.
Plays nicely with graphene, graphql-core, graphql-js and any other GraphQL implementation
compatible with the GraphQL specification.
GQL architecture is inspired by React-Relay and Apollo-Client.
Documentation
The complete documentation for GQL can be found at gql.readthedocs.io.
Features
- Execute GraphQL queries using different protocols:
- http
- websockets:
- apollo or graphql-ws protocol
- Phoenix channels
- AWS AppSync realtime protocol (experimental)
- Possibility to validate the queries locally using a GraphQL schema provided locally or fetched from the backend using an instrospection query
- Supports GraphQL queries, mutations and subscriptions
- Supports sync or async usage, allowing concurrent requests
- Supports File uploads
- Supports Custom scalars / Enums
- Supports Batching requests
- gql-cli script to execute GraphQL queries or download schemas from the command line
- DSL module to compose GraphQL queries dynamically
Installation
You can install GQL with all the optional dependencies using pip:
```bash
Quotes may be required on certain shells such as zsh.
pip install "gql[all]" ```
NOTE: See also the documentation to install GQL with less extra dependencies depending on the transports you would like to use or for alternative installation methods.
Usage
Sync usage
```python from gql import Client, gql from gql.transport.aiohttp import AIOHTTPTransport
Select your transport with a defined url endpoint
transport = AIOHTTPTransport(url="https://countries.trevorblades.com/")
Create a GraphQL client using the defined transport
client = Client(transport=transport)
Provide a GraphQL query
query = gql( """ query getContinents { continents { code name } } """ )
Execute the query on the transport
result = client.execute(query) print(result) ```
Executing the above code should output the following result:
$ python basic_example.py
{'continents': [{'code': 'AF', 'name': 'Africa'}, {'code': 'AN', 'name': 'Antarctica'}, {'code': 'AS', 'name': 'Asia'}, {'code': 'EU', 'name': 'Europe'}, {'code': 'NA', 'name': 'North America'}, {'code': 'OC', 'name': 'Oceania'}, {'code': 'SA', 'name': 'South America'}]}
WARNING: Please note that this basic example won't work if you have an asyncio event loop running. In some python environments (as with Jupyter which uses IPython) an asyncio event loop is created for you. In that case you should use instead the async usage example.
Async usage
```python import asyncio
from gql import Client, gql from gql.transport.aiohttp import AIOHTTPTransport
async def main():
# Select your transport with a defined url endpoint
transport = AIOHTTPTransport(url="https://countries.trevorblades.com/graphql")
# Create a GraphQL client using the defined transport
client = Client(transport=transport)
# Provide a GraphQL query
query = gql(
"""
query getContinents {
continents {
code
name
}
}
"""
)
# Using `async with` on the client will start a connection on the transport
# and provide a `session` variable to execute queries on this connection
async with client as session:
# Execute the query
result = await session.execute(query)
print(result)
asyncio.run(main()) ```
Contributing
See CONTRIBUTING.md
License
Owner
- Name: GraphQL Python
- Login: graphql-python
- Kind: organization
- Location: San Francisco
- Website: http://graphene-python.org/
- Repositories: 23
- Profile: https://github.com/graphql-python
The GraphQL Python community. Created by @syrusakbary and maintained by the community
GitHub Events
Total
- Create event: 12
- Release event: 10
- Issues event: 29
- Watch event: 89
- Delete event: 2
- Issue comment event: 83
- Push event: 48
- Pull request review comment event: 2
- Pull request review event: 8
- Pull request event: 90
- Fork event: 10
Last Year
- Create event: 12
- Release event: 10
- Issues event: 29
- Watch event: 89
- Delete event: 2
- Issue comment event: 83
- Push event: 48
- Pull request review comment event: 2
- Pull request review event: 8
- Pull request event: 90
- Fork event: 10
Committers
Last synced: 9 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Hanusz Leszek | l****z@g****m | 225 |
| Christoph Zwerschke | c****o@o****e | 32 |
| Syrus Akbary | me@s****m | 21 |
| Eran Kampf | e****n@e****m | 14 |
| Manuel Bojato | 3****a | 10 |
| Semyon Pupkov | m****l@s****m | 3 |
| Connor Brinton | c****r@b****m | 2 |
| Malte S. Stretz | m****s@m****e | 2 |
| Nicholas Bollweg | n****g@g****m | 2 |
| XuZvvHYmZfYdWJNRunkJ | 3****c | 2 |
| Ignacio Tolosa | i****2@s****l | 2 |
| Christofer Bertonha | c****a@g****m | 1 |
| DENKweit GmbH | 8****t | 1 |
| Dmitriy | 3****v | 1 |
| E.S | e****n | 1 |
| Florent Clairambault | f****t@c****r | 1 |
| Gabriel Chiong | g****g@g****m | 1 |
| Gerard Dalmau | g****u | 1 |
| Helder Correia | 1****o | 1 |
| Hugo Locurcio | h****o@h****o | 1 |
| Jimmy Merrild Krag | b****c@g****m | 1 |
| Chad Furman | c****d@c****m | 1 |
| Borgstrom ♕ | e****n@b****a | 1 |
| Aurélien | a****n@g****m | 1 |
| Alexandre Detiste | a****e@g****m | 1 |
| Abhishek Shekhar | a****5@g****m | 1 |
| tlowery-scwx | 1****x | 1 |
| sondale-git | 6****t | 1 |
| Florent Clairambault | f****t@h****r | 1 |
| Jonathan Leitschuh | j****h@g****m | 1 |
| and 29 more... | ||
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 126
- Total pull requests: 179
- Average time to close issues: about 2 months
- Average time to close pull requests: 4 days
- Total issue authors: 104
- Total pull request authors: 29
- Average comments per issue: 3.23
- Average comments per pull request: 1.28
- Merged pull requests: 155
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 13
- Pull requests: 99
- Average time to close issues: 14 days
- Average time to close pull requests: 1 day
- Issue authors: 11
- Pull request authors: 6
- Average comments per issue: 1.31
- Average comments per pull request: 0.89
- Merged pull requests: 85
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- leszekhanusz (6)
- FrankC01 (5)
- kloczek (3)
- aalmazan (3)
- Jonas1312 (2)
- wvidana (2)
- Vichoko (2)
- markedwards (2)
- david-waterworth (2)
- HJA24 (2)
- Hadevmin (2)
- Dzeri96 (2)
- Waitak (2)
- Kinzowa (1)
- devkral (1)
Pull Request Authors
- leszekhanusz (139)
- traylenator (4)
- mss (3)
- a-detiste (2)
- MrSampson (2)
- phdesign (2)
- tlowery-scwx (2)
- rahul-gj (2)
- nocnokneo (2)
- kasbaker (2)
- gonzalezzfelipe (1)
- qw-in (1)
- abhishek-12355 (1)
- eknvarli (1)
- mangin (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 5
-
Total downloads:
- pypi 9,580,976 last-month
- Total docker downloads: 764,276,128
-
Total dependent packages: 204
(may contain duplicates) -
Total dependent repositories: 2,545
(may contain duplicates) - Total versions: 65
- Total maintainers: 4
pypi.org: gql
GraphQL client for Python
- Homepage: https://github.com/graphql-python/gql
- Documentation: https://gql.readthedocs.io/
- License: MIT
-
Latest release: 4.0.0
published 6 months ago
Rankings
Maintainers (3)
spack.io: py-gql
This is a GraphQL client for Python. Plays nicely with graphene, graphql-core, graphql-js and any other GraphQL implementation compatible with the spec. GQL architecture is inspired by React-Relay and Apollo- Client.
- Homepage: https://github.com/graphql-python/gql
- License: []
-
Latest release: 0.4.0
published almost 4 years ago
Rankings
Maintainers (1)
conda-forge.org: gql
This is a GraphQL client for Python. Plays nicely with graphene, graphql-core, graphql-js and any other GraphQL implementation compatible with the spec.
- Homepage: https://github.com/graphql-python/gql
- License: MIT
-
Latest release: 3.4.0
published over 3 years ago
Rankings
pypi.org: gql-hub
GraphQL client for Python
- Homepage: https://github.com/graphql-python/gql
- Documentation: https://gql-hub.readthedocs.io/
- License: MIT
-
Latest release: 2.9.10
published over 4 years ago
Rankings
conda-forge.org: gql-with-all
This is a GraphQL client for Python. Plays nicely with graphene, graphql-core, graphql-js and any other GraphQL implementation compatible with the spec.
- Homepage: https://github.com/graphql-python/gql
- License: MIT
-
Latest release: 3.4.0
published over 3 years ago
Rankings
Dependencies
- multidict <5.0,>=4.5
- sphinx >=3.0.0,<4
- sphinx-argparse ==0.2.5
- sphinx_rtd_theme >=0.4,<1
- pycodestyle *
- backoff >=1.11.1,<3.0
- graphql-core >=3.2,<3.3
- yarl >=1.6,<2.0
- actions/checkout v3 composite
- actions/setup-python v4 composite
- pypa/gh-action-pypi-publish v1.1.0 composite
- actions/checkout v3 composite
- actions/setup-python v4 composite
- actions/checkout v3 composite
- actions/setup-python v4 composite
- codecov/codecov-action v1 composite