Go to file
2024-03-12 13:59:23 +01:00
.vscode Fixed tasks 2024-03-12 13:59:23 +01:00
PhotosAPI_Client Updated to PhotosAPI v0.6.0 2024-03-12 12:57:10 +01:00
.gitignore Updated to PhotosAPI v0.6.0 2024-03-12 12:57:10 +01:00
config.yaml Updated post-hooks 2023-06-23 13:09:43 +02:00
README.md Extra . removed 2024-03-12 13:07:11 +01:00
requirements.txt Updated to PhotosAPI v0.6.0 2024-03-12 12:57:10 +01:00

PhotosAPI_Client

Generated using openapi-python-client client library for PhotosAPI

Usage

Please, refer to library README

Building / generating this Client

This project is separated into to parts:

  1. The generator (located where this README is)
  2. The generated library (located under PhotosAPI_Client/)

Generating

  1. Create a virtual environment .venv in the repository root:
    python -m venv .venv / virtualenv .venv
  2. Use this virtual environment:
    source .venv/bin/activate / .venv\Scripts\activate.ps1
  3. Install the dependencies:
    pip install -r requirements.txt
  4. Generate/update the client:
    • Generate: openapi-python-client generate --config config.yaml --url "OPENAPI_SPEC_URL" (replace OPENAPI_SPEC_URL with your URL)
    • Update: openapi-python-client update --config config.yaml --url "OPENAPI_SPEC_URL" (replace OPENAPI_SPEC_URL with your URL)

Building

  1. Create a virtual environment .venv in the repository root:
    python -m venv .venv / virtualenv .venv
  2. Use this virtual environment:
    source .venv/bin/activate / .venv\Scripts\activate.ps1
  3. Install the dependencies:
    pip install -r requirements.txt
  4. Build the client:
    python -m build ./PhotosAPI_Client
  5. Artifacts can be found under PhotosAPI_Client/dist

Generating and building with VSCode

  1. Steps about virtual environments MUST be completed first
  2. Use Terminal > Run Task to select the task you want to start