Skip to content

gunyu1019/ahttp-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ahttp-generator

The ahttp-generator is a tool for generating Python SDKs from OpenAPI specifications.


🛠 Installation

Python 3.10 or higher is required.

# Linux/MacOS
$ pip install ahttp-generator

# Windows
$ py -3 -m pip install chzzkpy

To install the development version.

$ git clone https://github.com/gunyu1019/ahttp-generator.git -b develop
$ cd chzzkpy
$ python3 -m pip install -U .

🚀 Getting Started

Generating an SDK

# Linux/MacOS
$ python3 -m ahttp_generator -i ./openapi.json -o ./my_sdk

# Windows
$ py -3 -m ahttp_generator -i ./openapi.json -o ./my_sdk

Using the Generated SDK

import asyncio
from my_sdk import MyClient

async def main():
    async with MyClient(api_key="YOUR_TOKEN") as client:
        player = await client.get_player(
            platform="steam", 
            player_id="account.123..."
        )
        print(f"Name: {player.data.attributes.name}")

if __name__ == "__main__":
    asyncio.run(main())

About

A tool for generating Python SDKs from OpenAPI specifications.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages