https://store-images.s-microsoft.com/image/apps.49917.3b969135-6586-462a-aa22-4b2f9311dd2f.d0ca47cf-fc02-46aa-998a-517f74732d63.6f034366-743f-477b-ae07-f08acfc65e15

Fastapi-on-Ubutnu22.04LTS

Apps4Rent LLC

Fastapi-on-Ubutnu22.04LTS

Apps4Rent LLC

FastAPI on Ubuntu22.04LTS is a high-performance Python framework for building APIs with automatic Swagger/OpenAPI documentation.

This image provides a minimal, pre-configured FastAPI environment on Ubuntu22.04LTS, including Uvicorn for ASGI support. Ideal for developers needing a quick-start API solution.

Key Features:

  • Pre-installed Python 3.10+ and FastAPI dependencies.
  • Auto-generated Swagger UI (/docs) and ReDoc (/redoc).
  • Uvicorn with hot-reload (--reload) for development.

Usage Instructions:

  1. Prerequisites:
    • Ensure port 8000 is open in your VM's network settings (inbound rule).
  2. Access the VM and update packages:
    sudo apt update -y && sudo apt upgrade -y
    sudo su
    cd /root
  3. Activate the FastAPI environment:
    source fastapi_env/bin/activate
  4. Run the test app:
    uvicorn app:app --host 0.0.0.0 --port 8000 --reload
  5. Access the API:
    • Interactive docs: http://[Your-VM-IP]:8000/docs
    • Alternative docs: http://[Your-VM-IP]:8000/redoc
  6. Verify installation (optional):
    sudo systemctl start fastapi
    sudo systemctl enable fastapi
    sudo systemctl status fastapi

Disclaimer: This image uses open-source software (MIT License).