ariadne
Python library for implementing GraphQL servers using schema-first approach.
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 (12.6%) to scientific vocabulary
Keywords
Keywords from Contributors
Repository
Python library for implementing GraphQL servers using schema-first approach.
Basic Info
- Host: GitHub
- Owner: mirumee
- License: bsd-3-clause
- Language: Python
- Default Branch: main
- Homepage: https://ariadnegraphql.org
- Size: 3.01 MB
Statistics
- Stars: 2,290
- Watchers: 39
- Forks: 186
- Open Issues: 41
- Releases: 51
Topics
Metadata Files
README.md
Ariadne
Ariadne is a Python library for implementing GraphQL servers.
- Schema-first: Ariadne enables Python developers to use schema-first approach to the API implementation. This is the leading approach used by the GraphQL community and supported by dozens of frontend and backend developer tools, examples, and learning resources. Ariadne makes all of this immediately available to you and other members of your team.
- Simple: Ariadne offers small, consistent and easy to memorize API that lets developers focus on business problems, not the boilerplate.
- Open: Ariadne was designed to be modular and open for customization. If you are missing or unhappy with something, extend or easily swap with your own.
Documentation is available here.
Ariadne ecosystem
| Repository | Description | | ---------- | ----------- | | Ariadne | Python library for implementing GraphQL servers using a schema-first approach. | | Ariadne codegen | GraphQL client code generator for Python. | | Ariadne GraphQL modules | Ariadne package for implementing Ariadne GraphQL schemas using a modular approach. | | Ariadne auth | A collection of authentication and authorization utilities for Ariadne. | | Ariadne lambda | Deploy Ariadne GraphQL applications as AWS Lambda functions. | | Ariadne GraphQL proxy | A GraphQL proxy for Ariadne that allows you to combine multiple GraphQL APIs into a single API. |
Features
- Simple, quick to learn and easy to memorize API.
- Compatibility with GraphQL.js version 15.5.1.
- Queries, mutations and input types.
- Asynchronous resolvers and query execution.
- Subscriptions.
- Custom scalars, enums and schema directives.
- Unions and interfaces.
- File uploads.
- Defining schema using SDL strings.
- Loading schema from
.graphql,.gql, and.graphqlsfiles. - WSGI middleware for implementing GraphQL in existing sites.
- Apollo Tracing and OpenTracing extensions for API monitoring.
- Opt-in automatic resolvers mapping between
camelCaseandsnake_case, and a@convert_kwargs_to_snake_casefunction decorator for convertingcamelCasekwargs tosnake_case. - Built-in simple synchronous dev server for quick GraphQL experimentation and GraphQL Playground.
- Support for Apollo GraphQL extension for Visual Studio Code.
- GraphQL syntax validation via
gql()helper function. Also provides colorization if Apollo GraphQL extension is installed. - No global state or object registry, support for multiple GraphQL APIs in same codebase with explicit type reuse.
- Support for
Apollo Federation.
Installation
Ariadne can be installed with pip:
console
pip install ariadne
Ariadne requires Python 3.9 or higher.
Quickstart
The following example creates an API defining Person type and single query field people returning a list of two persons. It also starts a local dev server with GraphQL Playground available on the http://127.0.0.1:8000 address.
Start by installing uvicorn, an ASGI server we will use to serve the API:
console
pip install uvicorn
Then create an example.py file for your example application:
```python from ariadne import ObjectType, QueryType, gql, makeexecutableschema from ariadne.asgi import GraphQL
Define types using Schema Definition Language (https://graphql.org/learn/schema/)
Wrapping string in gql function provides validation and better error traceback
type_defs = gql(""" type Query { people: [Person!]! }
type Person {
firstName: String
lastName: String
age: Int
fullName: String
}
""")
Map resolver functions to Query fields using QueryType
query = QueryType()
Resolvers are simple python functions
@query.field("people") def resolvepeople(*): return [ {"firstName": "John", "lastName": "Doe", "age": 21}, {"firstName": "Bob", "lastName": "Boberson", "age": 24}, ]
Map resolver functions to custom type fields using ObjectType
person = ObjectType("Person")
@person.field("fullName") def resolvepersonfullname(person, *_): return "%s %s" % (person["firstName"], person["lastName"])
Create executable GraphQL schema
schema = makeexecutableschema(type_defs, query, person)
Create an ASGI app using the schema, running in debug mode
app = GraphQL(schema, debug=True) ```
Finally run the server:
console
uvicorn example:app
For more guides and examples, please see the documentation.
Versioning policy
ariadne follows a custom versioning scheme where the minor version increases for breaking changes, while the patch version increments for bug fixes, enhancements, and other non-breaking updates.
Since ariadne has not yet reached a stable API, this approach is in place until version 1.0.0. Once the API stabilizes, the project will adopt Semantic Versioning.
Contributing
We are welcoming contributions to Ariadne! If you've found a bug or issue, feel free to use GitHub issues. If you have any questions or feedback, don't hesitate to catch us on GitHub discussions.
For guidance and instructions, please see CONTRIBUTING.md.
Website and the docs have their own GitHub repository: mirumee/ariadne-website
Also make sure you follow @AriadneGraphQL on Twitter for latest updates, news and random musings!
Crafted with ❤️ by Mirumee Software hello@mirumee.com
Owner
- Name: Mirumee Commerce Lab
- Login: mirumee
- Kind: organization
- Email: hello@mirumee.com
- Location: Wrocław
- Website: https://mirumee.com
- Repositories: 73
- Profile: https://github.com/mirumee
We design and develop unique headless products and composable e-commerce systems.
GitHub Events
Total
- Create event: 25
- Release event: 9
- Issues event: 17
- Watch event: 91
- Delete event: 15
- Issue comment event: 45
- Push event: 164
- Pull request review comment event: 10
- Pull request review event: 23
- Pull request event: 49
- Fork event: 11
Last Year
- Create event: 25
- Release event: 9
- Issues event: 17
- Watch event: 91
- Delete event: 15
- Issue comment event: 45
- Push event: 164
- Pull request review comment event: 10
- Pull request review event: 23
- Pull request event: 49
- Fork event: 11
Committers
Last synced: 6 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Rafał Pitoń | r****l@m****m | 754 |
| pytest-benchmark | 359 | |
| dependabot[bot] | 4****] | 96 |
| dependabot-preview[bot] | 2****] | 67 |
| Patryk Zawadzki | p****s@r****m | 37 |
| Yasin Bahtiyar | y****n@b****g | 36 |
| Jakub Draganek | j****k@g****m | 35 |
| kuchichan | p****i@m****m | 30 |
| Adam Bogdał | a****m@b****l | 27 |
| Home | h****e@A****l | 21 |
| Nick Harris | n****s@c****m | 15 |
| Kuba | k****1@g****m | 13 |
| smaaland | a****n@b****m | 11 |
| Delyan Ruskov | d****v@g****m | 11 |
| Fernando Soares | f****s@l****r | 9 |
| T. Kameyama | t****o@v****t | 8 |
| Karol Jagodziński | k****o@g****m | 8 |
| Fernando Soares | 4****o | 7 |
| Emilio | e****o@f****m | 6 |
| Daniel Rice | d****4@g****m | 6 |
| Michael | 3****c | 5 |
| brianschrader | b****r@s****v | 4 |
| Maciej Wiśniowski | p****o@g****m | 4 |
| Paweł Kucmus | p****s@g****m | 3 |
| nils | n****0@g****m | 3 |
| Robert Myers | r****s@r****m | 3 |
| Gerard Dalmau | g****u@p****m | 3 |
| Alex Rothberg | a****g@g****m | 3 |
| Bogdan Mustiata | b****a@g****m | 3 |
| DamianCzajkowski | 4****i | 3 |
| and 56 more... | ||
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 119
- Total pull requests: 139
- Average time to close issues: 10 months
- Average time to close pull requests: 2 months
- Total issue authors: 71
- Total pull request authors: 33
- Average comments per issue: 2.61
- Average comments per pull request: 1.94
- Merged pull requests: 116
- Bot issues: 0
- Bot pull requests: 20
Past Year
- Issues: 14
- Pull requests: 44
- Average time to close issues: about 2 months
- Average time to close pull requests: 4 days
- Issue authors: 12
- Pull request authors: 9
- Average comments per issue: 0.29
- Average comments per pull request: 0.43
- Merged pull requests: 32
- Bot issues: 0
- Bot pull requests: 9
Top Authors
Issue Authors
- rafalp (35)
- cancan101 (4)
- markedwards (3)
- kevinvalk (3)
- and3rson (2)
- SamuelAsare (2)
- mRcSchwering (2)
- salwator (2)
- dacevedo12 (2)
- Kwaidan00 (2)
- dariuszkuc (2)
- vlaci (2)
- patrys (1)
- korsNaike (1)
- fabaff (1)
Pull Request Authors
- rafalp (62)
- dependabot[bot] (28)
- KarolJagodzinski (10)
- reallistic (7)
- patrys (6)
- pkucmus (5)
- Kwaidan00 (4)
- A-Dudek (4)
- DamianCzajkowski (4)
- iafilin (4)
- pylipp (3)
- antoni-szych-rtbhouse (2)
- Minister944 (2)
- danplischke (2)
- dacevedo12 (2)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 2
-
Total downloads:
- pypi 844,551 last-month
- Total docker downloads: 4,590,270
-
Total dependent packages: 22
(may contain duplicates) -
Total dependent repositories: 294
(may contain duplicates) - Total versions: 62
- Total maintainers: 4
pypi.org: ariadne
Ariadne is a Python library for implementing GraphQL servers.
- Homepage: https://ariadnegraphql.org/
- Documentation: https://ariadne.readthedocs.io/
- License: BSD License
-
Latest release: 0.26.2
published 10 months ago
Rankings
conda-forge.org: ariadne
- Homepage: https://ariadnegraphql.org/
- License: BSD-3-Clause
-
Latest release: 0.16.1
published over 3 years ago
Rankings
Dependencies
- actions/checkout v3 composite
- actions/setup-python v4 composite
- actions/checkout master composite
- actions/setup-python v4 composite
- pypa/gh-action-pypi-publish release/v1 composite
- actions/checkout v3 composite
- actions/setup-python v4 composite
- codecov/codecov-action v3 composite
- graphql-core >=3.2.0,<3.3
- starlette >0.17,<1.0
- typing_extensions >=3.6.0
- fastapi * test
- anyio ==3.6.2 test
- fastapi ==0.89.1 test
- idna ==3.4 test
- pydantic ==1.10.4 test
- sniffio ==1.3.0 test
- starlette ==0.22.0 test
- typing-extensions ==4.4.0 test
- flask * test
- click ==8.1.3 test
- flask ==2.2.5 test
- itsdangerous ==2.1.2 test
- jinja2 ==3.1.2 test
- markupsafe ==2.1.2 test
- werkzeug ==2.2.3 test
- starlette * test
- anyio ==3.6.2 test
- idna ==3.4 test
- sniffio ==1.3.0 test
- starlette ==0.27.0 test
