Skip to content

ritza-co/speakeasy-mocking-example-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FastAPI Destinations Server

A simple server implementation using FastAPI.

Overview

This project provides an example server built with FastAPI for demonstrating SDK generation using Speakeasy. The server provides a set of API endpoints for managing travel destinations.

Requirements

  • Python 3.7+
  • UV

Installation

First, ensure you have uv installed. If you don't have it, install it with:

curl -LsSf https://astral.sh/uv/install.sh | sh

Next, clone the repository:

git clone https://github.com/ritza-co/speakeasy-mocking-example-server.git

cd fastapi-mock-server

Usage

  1. Start the server:

    uv run main.py
  2. Access the API documentation at:

    http://localhost:8000/docs

API Endpoints

Get Destinations

GET /destinations

Returns a list of all available destinations.

Get Destination by ID

GET /destinations/{id}

Returns details for a specific destination.

Add Destination

POST /destinations

Add a new destination to the system.

Update Destination

PUT /destinations/{id}

Update an existing destination.

Delete Destination

DELETE /destinations/{id}

Remove a destination from the system.

Example Response

{
    "id": 1,
    "name": "Paris",
    "country": "France",
    "description": "The city of love",
    "rating": 4.5
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages