Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fastgraphql

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fastgraphql

FastGraphQL is intended to help developer create code driven GraphQL APIs

  • 0.0.12
  • PyPI
  • Socket score

Maintainers
1

FastGraphQL

FastGraphQL

FastGraphQL is a tool for creating code-driven GraphQL APIs.


pypi Python Versions License

codecov tests

Code Smells Security Rating Maintainability Rating Vulnerabilities Bugs Duplicated Lines (%) Technical Debt


Documentation: https://hugowschneider.github.io/fastgraphql

Source Code: https://github.com/hugowschneider/fastgraphql

Disclaimer

This is still a work in progress and all support is welcomed

Motivation

So far most of the projects that use GraphQL need to duplicate many definitions to be able to have a consistent GraphQL API schema alongside well-defined models that governs the development and the application.

FastGraphQL proposes to shortcut the path between python models and GraphQL schema using Pydantic models. This ensures not only a single source of truth when comes to type, input, query and mutation definitions, but also the ability to use Pydantic to features on models and inputs.

Installation

$ pip install "fastgraphql[all]"

You will also need an ASGI server as well to serve your API

$ pip install "uvicorn[standard]"

Usage

The very first Hello Work example.

from fastapi import FastAPI
from fastgraphql import FastGraphQL
from fastgraphql.fastapi import make_ariadne_fastapi_router

app = FastAPI()
fast_graphql = FastGraphQL()


@fast_graphql.query()
def hello() -> str:
    return "Hello FastGraphQL!!!"


app.include_router(make_ariadne_fastapi_router(fast_graphql=fast_graphql))

$ uvicorn main:app --reload

A simple example will not show you the all FastGraphQL capabilities, but it shows how simple this can be.

Learn

To start your journey into FastGraphQL, please refer to Getting Started.

You can find the API documentation here.

Integration

FastGraphQL generates independently of any integration a data structure containing all GraphQL definitions and resolvers, which generates a GraphQL schema.

With that said, all integration will add functionalities and provide easy and alternative deployments of the defined API.

You can find out more about the different integrations under Integrations

Acknowledgment

Thanks to FastAPI for the inspiration!

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc