Skip to content

Latest commit

 

History

History
27 lines (18 loc) · 559 Bytes

README.md

File metadata and controls

27 lines (18 loc) · 559 Bytes

Python API REST/GraphQL Examples

This is a Python example that can be used for reference or as a starting point for teaching how to connect and retrieve data through an API, with both REST and GraphQL.

Setup

  1. Setup virtual environment:

    python3 -m venv .venv
    source .venv/bin/activate
  2. Install packages:

    pip install -r requirements.txt
  3. Run either of the examples:

    python graphql_example.py
    python rest_example.py
  4. Edit the files, play around, and have fun!