Skip to main content

APIFixer is a Python class that automatically starts an API server, checks its routes, generates documentation based on the OpenAI API, and tests API endpoints to fix bugs and improve API performance.

Project description

APIFixer

APIFixer is a powerful automation tool built for API developers. It starts an API server using Uvicorn, analyzes its routes, generates detailed documentation using OpenAI, and performs automated tests of API endpoints. Key features include:

  1. API Server Startup: Allows you to easily start the server with minimal configuration.
  2. API Documentation Generation: Uses OpenAI to generate detailed documentation based on API routes.
  3. Automatic testing of API routes: Checks for errors and writes the results to a log file.
  4. Support for auto-close server: Ability to automatically close the server after all tasks are completed.
  5. This tool simplifies the API development and testing process, minimizes errors, and creates easy-to-use documentation.

Developed by Bohdan Terskow (c) 2024

Usage Process

Parameter Setup:

Define parameters when initializing the APIFixer class, such as resource (resource), host (host), port (port), and the OpenAI API key (openai_api_key).

Start the server and generate documentation:

Call the run method to start the server. This method also starts the route validation process, which automatically generates documentation and performs API testing.

Testing and Logging:

API route validation and testing occurs in the background and the results are written to a log file.

Auto-close server:

If auto_close_server=True is set, the server will automatically close after all tasks are completed.

fixer = APIFixer(
    resource='main:app',
    host='127.0.0.1',
    port=8000,
    openai_api_key='your_openai_api_key'
)

fixer.run(auto_close_server=True)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

APIFixer-1.1.1.tar.gz (4.8 kB view hashes)

Uploaded Source

Built Distribution

APIFixer-1.1.1-py3-none-any.whl (5.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page