Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Ariadne Code Generator

Ariadne

Build Status

Python code generator that turns a GraphQL schema and your operations into a fully typed, async (or sync) Python client built on Pydantic. You write your queries, mutations and subscriptions in GraphQL, and ariadne-codegen generates a typed Python method for each one, returning Pydantic models - so you get autocompletion and static type checking instead of hand-writing query strings and parsing raw JSON.

📖 Documentation · Step-by-step example · Configuration reference

Features

Installation

Requires Python 3.10 or newer.

pip install ariadne-codegen

Add subscription (WebSocket) support with:

pip install ariadne-codegen[subscriptions]

Quickstart

Generate a typed client from three files.

1. Describe your schema in schema.graphql:

type Query {
  hello(name: String!): String!
}

2. Write the operations you need in queries.graphql:

query Greet($name: String!) {
  hello(name: $name)
}

3. Point ariadne-codegen at them in pyproject.toml:

[tool.ariadne-codegen]
schema_path = "schema.graphql"
queries_path = "queries.graphql"

Then generate the client:

ariadne-codegen

This creates a graphql_client package. Use it:

import asyncio
from graphql_client import Client


async def main():
    async with Client(url="https://example.com/graphql") as client:
        result = await client.greet(name="World")
        print(result.hello)


asyncio.run(main())

greet is a typed method generated from your Greet operation, and result is a validated Pydantic model. See the step-by-step example for a walk-through of everything that gets generated.

Contributing

Contributions are welcome! See CONTRIBUTING.md for how to report bugs, work on issues, and open pull requests.

Also make sure you follow @AriadneGraphQL on Twitter for latest updates, news and random musings!

Crafted with ❤️ by Mirumee Labs ariadne@mirumee.com

Release files for ariadne-codegen 0.19a4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ariadne-codegen 0.19a4
File Size Uploaded
ariadne_codegen-0.19a4.tar.gz 80.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ariadne-codegen 0.19a4
File Interpreter ABI Platform
ariadne_codegen-0.19a4-py3-none-any.whl Python 3 none any Details

Total release size: 200.7 kB

Release files / ariadne_codegen-0.19a4.tar.gz

Download URL ariadne_codegen-0.19a4.tar.gz
Size 80.7 kB
Tags Source
SHA-256 checksum
How to use checksums
c3ae0624cced039de9f77542488b1d1f025b44c92dfd60b40cedf61cdc5cc74b
BLAKE2b-256 checksum
How to use checksums
7c82818592a36ca694a267778c5a62e9bcfe3b9cd72ff930644aae338b526366
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 25, 2026.

Transparency log

Release files / ariadne_codegen-0.19a4-py3-none-any.whl

Download URL ariadne_codegen-0.19a4-py3-none-any.whl
Size 120.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
58c0e2e01a62acdac0c276e64931736391f5a434d4f9e204b438388e53fe8ce7
BLAKE2b-256 checksum
How to use checksums
76646ef243e3465272e042982e43ab7b528e0e5d9af2f136764f9bb0a50a7275
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 25, 2026.

Transparency log
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page