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 details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

Details for the file APIFixer-1.1.1.tar.gz.

File metadata

  • Download URL: APIFixer-1.1.1.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.6

File hashes

Hashes for APIFixer-1.1.1.tar.gz
Algorithm Hash digest
SHA256 2dca1cfa787371bbacc25535380e93df74cf746162f3692e9d001996352a2dbf
MD5 bd06508e2064022a8d6a55613373f9b5
BLAKE2b-256 82f132f1b31aee4c64e0bbc4cb01dd044ea774058365a6cc217c18602bb039a1

See more details on using hashes here.

File details

Details for the file APIFixer-1.1.1-py3-none-any.whl.

File metadata

  • Download URL: APIFixer-1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 5.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.6

File hashes

Hashes for APIFixer-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 968301e888c970d63494c5e9cbc5175710b9ec09da133de062271af7385de41f
MD5 ccd53b2dcf165b9faed6a57a76842c2c
BLAKE2b-256 a82c927ada61e9478fa6a66a1fb061372d56ac5928503d5b1705fdd4be20d2ef

See more details on using hashes here.

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