Skip to content

fw-client

Introduction

fw-client is a Python package that provides a robust HTTP client for the Flywheel API. It is designed to be reliable in production environments with built-in error handling, retry mechanisms, and connection pooling. This package serves as a foundation for applications that need to communicate with Flywheel programmatically.

Key Features

  • Robust Error Handling: Automatically handles transient network errors and API failures
  • Retry Mechanisms: Configurable retry policies for different types of failures
  • Connection Pooling: Efficient reuse of HTTP connections for better performance
  • JSON API Support: Specialized for working with Flywheel's JSON API
  • Production Hardened: Designed for reliability in mission-critical applications

Installation

The package can be installed using pip:

pip install fw-client

Basic Usage

1
2
3
4
5
6
7
8
from fw_client import FWClient

# Create a client with your API key
fw = FWClient("site.flywheel.io:djEuU79cNFk8pk4tLwxybb1YHqhzhyEXAMPLE")

# Make API requests
projects = fw.get("/api/projects")
projects_label = [project.label for project in projects]

The Flywheel API is documented here.

Resources

  • Flywheel SDK: Higher-level Python SDK built on top of the Flywheel API
  • fw-file: Package for working with various file formats in Flywheel