Graphus is a dynamic GraphQL client that generates its API objects and methods dynamically by parsing GraphQL Schemas.
Project description
Graphus is a dynamic GraphQL schema parser and API generator for Python. With Graphus, you can adapt your client's API to any GraphQL server on-the-fly, ensuring real-time compatibility and flexibility.
Features
- 📜 Dynamic Schema Parsing: Parse any GraphQL schema and understand its structure.
- 🚀 Automatic API Generation: Create methods and objects that align with the parsed schema's parameters and arguments.
- 🎛 Adaptable Client: Seamlessly adapt your client to different GraphQL servers without manual modifications.
- 🔒 Type-Safe: Ensures that the generated methods and objects adhere to the schema's defined types.
Installation
pip install graphus
Quick Start
-
Initialize Graphus with a GraphQL endpoint:
from graphus import GraphusClient client = GraphusClient(endpoint='https://your-graphql-endpoint.com')
-
Use the generated API:
obj = client.query.field(arg1="Hello").attribute.execute() obj = client.mutation.method(param="Hello").execute()
Documentation
For detailed documentation, including advanced features and API references, please click here.
Contributing
We welcome contributions! Please see our CONTRIBUTING guide for more details.
📞 Contact
Queries? Suggestions? Drop me an email at ionesiojr@gmail.com.
License
Graphus is licensed under the Apache 2.0 License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.