Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

webscit/hatch-demo

Repository files navigation

Hatch Demo

This is a demonstrator for hatch hooks presented at Python Rennes Meetup 04-2024.

The example is a server specified through openAPI v3.0 specification using connexion.

The hatch hook examples are:

  • version source from openAPI spec
  • metadata source from openAPI spec; for authors, description and license
  • build hook producing Python client from the openAPI spec and in installation in editable mode creates a dummy README file for the client

Table of Contents

Installation

pip install hatch-demo

Test

Run the server example

  1. Run the server
pip install -e .
python -m hatch_demo
  1. Test a request

Using httpie:

http POST http://localhost:8080/openapi/greeting/john
# or
# curl -X POST http://localhost:8080/openapi/greeting/john

You should see:

Hello john

License

hatch-demo is distributed under the terms of the MIT license.

Releases

No releases published

Packages

No packages published

Languages