1.6 KiB
1.6 KiB
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:
- The generator (located where this README is)
- The generated library (located under
PhotosAPI_Client/)
Generating
- Create a virtual environment
.venvin the repository root:
python -m venv .venv/virtualenv .venv - Use this virtual environment:
source .venv/bin/activate/.venv\Scripts\activate.ps1 - Install the dependencies:
pip install -r requirements.txt - Generate/update the client:
- Generate:
openapi-python-client generate --config config.yaml --url "OPENAPI_SPEC_URL"(replaceOPENAPI_SPEC_URLwith your URL) - Update:
openapi-python-client update --config config.yaml --url "OPENAPI_SPEC_URL"(replaceOPENAPI_SPEC_URLwith your URL)
- Generate:
Building
- Create a virtual environment
.venvin the repository root:
python -m venv .venv/virtualenv .venv - Use this virtual environment:
source .venv/bin/activate/.venv\Scripts\activate.ps1 - Install the dependencies:
pip install -r requirements.txt - Build the client:
python -m build ./PhotosAPI_Client - Artifacts can be found under
PhotosAPI_Client/dist
Generating and building with VSCode
- Steps about virtual environments MUST be completed first
- Use
Terminal > Run Taskto select the task you want to start