### Sideko CLI Quickstart Source: https://github.com/sideko-inc/sideko/blob/main/README.md Provides essential commands to get started with the Sideko CLI. Includes logging in to authenticate and initializing SDKs for API interaction. ```bash # authenticate (uses native keychain to store credentials on host) sideko login # interactively create sdks sideko sdk init ``` -------------------------------- ### Legacy Sideko CLI Installation Source: https://github.com/sideko-inc/sideko/blob/main/README.md Installs older versions of the Sideko CLI using curl or pip. This is useful for users who need to maintain compatibility with previous releases. ```bash # via curl curl -fsSL https://raw.githubusercontent.com/Sideko-Inc/sideko/v0.10.2/install.sh | sh ``` ```python # via pip pip install sideko-py==0.10.2 ``` -------------------------------- ### Install Sideko CLI Source: https://github.com/sideko-inc/sideko/blob/main/README.md Installs the Sideko CLI using different package managers and methods. Supports macOS via Homebrew, Python via pip, JavaScript via npm, and a general installation script via curl. ```bash # 🍏 macOS brew install sideko-inc/tap/sideko ``` ```python # 🐍 python - pypi pip install sideko-py ``` ```javascript # 📦 js - npm npm install -g @sideko/cli ``` ```shell # ⚡ curl curl -fsSL https://raw.githubusercontent.com/Sideko-Inc/sideko/main/install.sh | sh ``` -------------------------------- ### Initialize SDK Suite Source: https://github.com/sideko-inc/sideko/blob/main/docs/CLI.md Interactively configures and creates a suite of SDKs for your project. This is the recommended command for getting started with SDK generation. ```bash sideko sdk init ``` -------------------------------- ### LLM Prompt Example Source: https://github.com/sideko-inc/sideko/blob/main/releases/determinism-plus-llms/README.md An example of a prompt to guide the LLM in creating a specific workflow for an API, demonstrating how to define a sequence of actions and conditional logic. ```bash create a flight tracking workflow 1. get all flights 2. select the next flight 3. return "enjoy :)" if the flight has in-flight entertainment and ":(" if not ``` -------------------------------- ### Install Project Dependencies with Poetry Source: https://github.com/sideko-inc/sideko/blob/main/releases/determinism-plus-llms/assets/python/CLAUDE.md Installs the project and its dependencies using the Poetry package manager. This is a fundamental step before running any other commands. ```bash poetry install ``` -------------------------------- ### Install Sideko CLI Source: https://github.com/sideko-inc/sideko/blob/main/releases/determinism-plus-llms/README.md Installs the Sideko command-line interface using various package managers or a shell script. This is the first step to using Sideko for SDK generation. ```bash npm install -g @sideko/cli ``` ```bash pip install sideko-py ``` ```bash brew install sideko-inc/tap/sideko ``` ```shell curl -fsSL https://raw.githubusercontent.com/Sideko-Inc/sideko/main/install.sh | sh ``` -------------------------------- ### Python Client Function Implementation Example Source: https://github.com/sideko-inc/sideko/blob/main/releases/determinism-plus-llms/assets/python/CLAUDE.md Provides an example of implementing client functions in Python, showing how to import and instantiate specific client classes for combining multiple API calls. ```python from module.resources.api.spec.client import SpecClient # ... inside a client method ... spec_client = SpecClient(base_client=self._base_client) # ... use spec_client ... # Example with auth_names and cast_to spec_client.some_method(auth_names=['read'], cast_to=type(None)) ``` -------------------------------- ### Install Sideko-Python Source: https://github.com/sideko-inc/sideko/blob/main/sideko-py/README.md Installs the Sideko-Python package using pip, making the SDK client generator available for use. ```shell pip install sideko-py ``` -------------------------------- ### TypeScript Example Resource Client Implementation Source: https://github.com/sideko-inc/sideko/blob/main/releases/determinism-plus-llms/assets/typescript/CLAUDE.md Implements the 'ExampleClient' class, extending 'CoreResourceClient'. It demonstrates calling other resource clients ('ResourceClientA', 'ResourceClientB') and processing their responses. ```typescript import type { types } from ""; import { CoreResourceClient, type RequestOptions } from "/core"; import type * as requests from "/resources/example-resource/request-types"; import { ResourceClientA } from "/resources/a"; import { ResourceClientB } from "/resources/b"; export class ExampleClient extends CoreResourceClient { /** * Example Description */ async exampleMethod(request: requests.ExampleMethodRequest = {}, opts?: RequestOptions): Promise { const resourceA = new ResourceClientA(this._client, this._opts); const resourceB = new ResourceClientB(this._client, this._opts); const resA = await resourceA.get({ id: request.id }); const resB = await resourceB.create({ a: resA.id, val: request.val }); return { aId: resA.id, bId: resB.id }; } } ``` -------------------------------- ### TypeScript Example Resource Index File Source: https://github.com/sideko-inc/sideko/blob/main/releases/determinism-plus-llms/assets/typescript/CLAUDE.md An example 'index.ts' file for a new resource, exporting request types and the client class. This follows the project's structure for defining new resources. ```typescript export { ExampleMethodRequest, } from "./request-types"; export { ExampleClient } from "./resource-client"; ``` -------------------------------- ### Python Contract Test Example Source: https://github.com/sideko-inc/sideko/blob/main/releases/determinism-plus-llms/assets/python/CLAUDE.md Illustrates the creation of contract tests in Python, focusing on verifying successful requests with all parameters provided and with only required parameters. ```python import pytest # Test with all parameters def test_feature_with_all_params(): # ... call method with all params ... assert response.status_code == 200 # Test with only required parameters def test_feature_with_required_params(): # ... call method with only required params ... assert response.status_code == 200 ``` -------------------------------- ### Bash Commands for Project Management Source: https://github.com/sideko-inc/sideko/blob/main/releases/determinism-plus-llms/assets/typescript/CLAUDE.md Common bash commands for managing the project, including installing dependencies, running tests, and adding new dependencies. ```bash npm i npm test npm test -- --testNamePattern="client.exampleResource.exampleMethod" npm add (dependency_name) ``` -------------------------------- ### Example usage of exampleMethod Source: https://github.com/sideko-inc/sideko/blob/main/releases/determinism-plus-llms/assets/typescript/CLAUDE.md This code snippet demonstrates how to use the exampleMethod from the exampleResource module. It shows the initialization of the Sideko client and the call to exampleMethod with the required 'id' parameter. The response is expected to be of type ExampleMethodOutput. ```TypeScript import Client from ""; const client = new Client({ apiKey: process.env["API_KEY"]!!, }); const res = await client.exampleResource.exampleMethod({ id: "3e4666bf-d5e5-4aa7-b8ce-cefe41c7568a" }); ``` -------------------------------- ### Python Resource README Documentation Source: https://github.com/sideko-inc/sideko/blob/main/releases/determinism-plus-llms/assets/python/CLAUDE.md Instructs on creating a `README.md` file within each new resource folder in Python projects, following a specific style guide for documentation. ```python # Inside resources/new_resource/README.md ## New Resource Documentation This section details the functionality and usage of the new resource. ``` -------------------------------- ### Import Sideko-Python in Python Shell Source: https://github.com/sideko-inc/sideko/blob/main/sideko-py/README.md Demonstrates how to import the `sideko_py` library in a Python shell after successful installation and development setup. ```python import sideko_py ``` -------------------------------- ### TypeScript Example Resource Request Types Source: https://github.com/sideko-inc/sideko/blob/main/releases/determinism-plus-llms/assets/typescript/CLAUDE.md Defines the request types for an example resource, specifically 'ExampleMethodRequest', which includes an 'id' and an optional 'val' property. ```typescript export type ExampleMethodRequest = { id: string; val?: string; } ``` -------------------------------- ### Build and Install Sideko Python Module Source: https://github.com/sideko-inc/sideko/blob/main/sideko-py/README.md Builds and installs the Python module locally using Maturin, allowing direct use of the generated SDKs within the Python environment. ```shell maturin develop ``` -------------------------------- ### Python TypedDict Example Source: https://github.com/sideko-inc/sideko/blob/main/releases/determinism-plus-llms/assets/python/CLAUDE.md Defines a TypedDict named 'Example' with a required string field 'name' and a Pydantic BaseModel '_SerializerExample' for handling case conversions and file omissions, aliasing the 'name' field. ```Python import pydantic import typing_extensions class Example(typing_extensions.TypedDict): """ Example type description """ name: typing_extensions.Required[str] """ A great description of the name parameter on this example typed dict """ class _SerializerExample(pydantic.BaseModel): """ Serializer for Example handling case conversions and file omissions as dictated by the API """ model_config = pydantic.ConfigDict( populate_by_name=True, ) name: str = pydantic.Field( alias="name", ) ``` -------------------------------- ### TypeScript Type Definition for Example Source: https://github.com/sideko-inc/sideko/blob/main/releases/determinism-plus-llms/assets/typescript/CLAUDE.md Defines a TypeScript type 'Example' with an 'id' property, used for representing examples within the project. It includes JSDoc comments for clarity. ```typescript import * as z from "zod"; import { zodTransform } from "/portal-client/core"; /** * Example Type */ export type Example = { /** * the unique identifier of this example */ id: string; }; ``` -------------------------------- ### Install Maturin for Python Bindings Source: https://github.com/sideko-inc/sideko/blob/main/sideko-py/README.md Installs Maturin, a tool used to build and publish Python packages with Rust extensions, essential for Sideko's local development. ```shell pip install maturin ``` -------------------------------- ### Python Async Test Example Source: https://github.com/sideko-inc/sideko/blob/main/releases/determinism-plus-llms/assets/python/CLAUDE.md Demonstrates how to create asynchronous test versions using the `@pytest.mark.asyncio` decorator in Python. This is essential for testing async client functions. ```python import pytest @pytest.mark.asyncio async def test_async_operation(): result = await async_client.some_async_method() assert result is not None ``` -------------------------------- ### Get Personal API Key Source: https://github.com/sideko-inc/sideko/blob/main/docs/CLI.md Retrieves your personal Sideko API key and copies it to the clipboard. ```bash sideko account get-my-api-key ``` -------------------------------- ### Python Pydantic Model Example Source: https://github.com/sideko-inc/sideko/blob/main/releases/determinism-plus-llms/assets/python/CLAUDE.md Implements a Pydantic BaseModel 'ModelExample' that allows arbitrary types and populates fields by name. It includes a 'name' field with an alias and a detailed description. ```Python import pydantic class ModelExample(pydantic.BaseModel): """ A description of the purpose of this example model """ model_config = pydantic.ConfigDict( arbitrary_types_allowed=True, populate_by_name=True, ) name: str = pydantic.Field( alias="name", ) """ A great description of the name field on this example model """ ``` -------------------------------- ### Python Function Signature Example Source: https://github.com/sideko-inc/sideko/blob/main/releases/determinism-plus-llms/assets/python/CLAUDE.md Demonstrates a Python function signature for a 'create' method, accepting an 'asset' parameter, an optional 'name' parameter, and optional 'request_options', returning a 'models.CreatedAssets' type. ```Python def create( self, *, asset: params.Asset, name: typing.Union[ typing.Optional[str], type_utils.NotGiven ] = type_utils.NOT_GIVEN, request_options: typing.Optional[RequestOptions] = None, ) -> models.CreatedAssets: ``` -------------------------------- ### TypeScript Function Signature Example Source: https://github.com/sideko-inc/sideko/blob/main/releases/determinism-plus-llms/assets/typescript/CLAUDE.md Illustrates a TypeScript function signature for a method, including a description, request parameter type, optional request options, and a Promise return type. ```typescript /** * Functionality Description */ method(request: requests.MethodRequest, opts?: RequestOptions): Promise { } ``` -------------------------------- ### Python Type Hinting for Object Inputs Source: https://github.com/sideko-inc/sideko/blob/main/releases/determinism-plus-llms/assets/python/CLAUDE.md Guides on creating typed dictionary classes for object inputs in Python and using them as type hints. This promotes structured data handling. ```python from typing import TypedDict import params class MyExampleParam(TypedDict): key1: str key2: int param_name: params.MyExampleParam ``` -------------------------------- ### Get API Statistics Source: https://github.com/sideko-inc/sideko/blob/main/docs/CLI.md Displays statistics gathered from an API's specification. Requires the API name and optionally accepts a version. The output can be formatted as raw JSON or prettified. ```bash sideko api stats --name --version --display ``` -------------------------------- ### Python Client Function Signature Convention Source: https://github.com/sideko-inc/sideko/blob/main/releases/determinism-plus-llms/assets/python/CLAUDE.md Defines the standard convention for Python client function signatures, starting with 'self, *' to prevent positional arguments and including a default `request_options` parameter. ```python def my_client_function(self, arg1: str, arg2: int, request_options: typing.Optional[RequestOptions] = None): pass ``` -------------------------------- ### Sideko CLI Workflow Source: https://github.com/sideko-inc/sideko/blob/main/releases/determinism-plus-llms/README.md Demonstrates the basic workflow for creating an SDK using the Sideko CLI, including logging in, initializing an SDK, committing changes, and prompting for LLM enhancements. ```bash sideko login sideko sdk init git init && git add . && git commit -m 'deterministic commit' ``` -------------------------------- ### Test exampleMethod with all parameters Source: https://github.com/sideko-inc/sideko/blob/main/releases/determinism-plus-llms/assets/typescript/CLAUDE.md This test case verifies the successful execution of the exampleMethod when all optional parameters are provided. It initializes the client with mock server environment and asserts that the response is defined. ```TypeScript import Client, { Environment } from ""; describe("tests client.exampleResource.exampleMethod", () => { test.concurrent( "Desciption actions | testId: success_all_params | Desciption of test", async () => { const client = new Client({ apiKey: "API_KEY", environment: Environment.MockServer, }); const response = await client.exampleResource.exampleMethod( { id: "abc", val: "data", } ); expect(response).toBeDefined(); } ) }); ``` -------------------------------- ### Python New Resource Client Implementation Source: https://github.com/sideko-inc/sideko/blob/main/releases/determinism-plus-llms/assets/python/CLAUDE.md Provides Python code for implementing new resource clients, including synchronous and asynchronous versions. It shows how to initialize clients, define methods like 'your_new_method' with parameters and return types, and interact with custom clients. ```Python from .client import AsyncYourResourceClient, YourResourceClient __all__ = ["AsyncYourResourceClient", "YourResourceClient"] ``` ```Python import typing from .core import ( AsyncBaseClient, RequestOptions, SyncBaseClient, type_utils, ) from .types import models from .resources.custom import CustomClient class ResourceClient: def __init__(self, *, base_client: SyncBaseClient) -> None: self._base_client = base_client def your_new_method( self, *, required_param: str, optional_param: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None ) -> models.NewMethodResponse: """ Brief description Longer description explaining the functionality. HTTP_METHOD /api/endpoint/path Args: required_param: Description of required parameter optional_param: Description of optional parameter request_options: Additional options to customize the HTTP request Returns: Success response description Raises: ApiError: A custom exception class that provides additional context for API errors, including the HTTP status code and response body. """ your_client = CustomClient(base_client=self._base_client) result = your_client.call_api( required_param=param1, optional_param=optional_param, request_options=request_options ) return models.NewMethodResponse(data=result) class AsyncYourResourceClient: def __init__(self, *, base_client: AsyncBaseClient) -> None: self._base_client = base_client async def your_new_method( self, *, required_param: str, optional_param: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None ) -> models.NewMethodResponse: """ [Same docstring as sync version, but explain that it is async] """ your_client = AsyncCustomClient(base_client=self._base_client) result = await your_client.call_api( required_param=param1, optional_param=optional_param, request_options=request_options ) return models.NewMethodResponse(data=result) ``` -------------------------------- ### Sideko SDK Create Command Source: https://github.com/sideko-inc/sideko/blob/main/docs/CLI.md Creates an SDK using an existing SDK configuration file for various programming languages. It allows specifying the API version, semantic version of the SDK, and options for including GitHub Actions and handling linting errors. ```bash sideko sdk create [OPTIONS] --config --lang ``` -------------------------------- ### Create New API Source: https://github.com/sideko-inc/sideko/blob/main/docs/CLI.md Creates a new API with an initial version. Requires the API name and the path to the OpenAPI specification. Optional flags allow for specifying the version, allowing linting errors, disabling mocks, and controlling display format. ```bash sideko api create --name --spec --version --allow-lint-errors --disable-mock --display ``` -------------------------------- ### Sideko API Create Command Source: https://github.com/sideko-inc/sideko/blob/main/docs/CLI.md Explains how to create a new API version using the `sideko api version create` command. It requires the API name and specification file, and supports options for version bumping, handling linting errors, disabling mocks, and controlling output display. ```bash sideko api version create [OPTIONS] --name --spec Options: --name api name or id e.g. my-api --version semantic version (e.g. `2.1.5`) or version bump (`auto`, `patch`, `minor`, `major`, `rc-patch`, `rc-minor`, `rc-major`, `release`) Default value: `auto` --spec path to openapi specification (YAML or JSON format) --allow-lint-errors Allow linting errors to be present in the provided spec [default: false] By default creating a new version with an OpenAPI that contains linting errors is disallowed. If you wish to allow linting errors you may experience issues later with SDK generation or mock servers. --disable-mock disable mock server for new version [default: enabled] --display display result as a raw json or prettified Default value: `pretty` Possible values: `raw`, `pretty` ``` -------------------------------- ### Sideko CLI Usage Source: https://github.com/sideko-inc/sideko/blob/main/docs/CLI.md Illustrates the general usage pattern for the Sideko CLI, showing how to invoke commands and options, including subcommand structure and global options. ```bash sideko [OPTIONS] ``` -------------------------------- ### List All APIs Source: https://github.com/sideko-inc/sideko/blob/main/docs/CLI.md Lists all available APIs within the Sideko project. The display format can be controlled to show raw JSON or a prettified output. ```bash sideko api list --display ``` -------------------------------- ### Set up Python Virtual Environment Source: https://github.com/sideko-inc/sideko/blob/main/sideko-py/README.md Creates and activates a virtual Python environment for local development, isolating project dependencies. ```shell python3 -m venv .venv source .venv/bin/activate ``` -------------------------------- ### Synchronous Client Method Call Source: https://github.com/sideko-inc/sideko/blob/main/releases/determinism-plus-llms/assets/python/CLAUDE.md Demonstrates how to initialize and use the synchronous Sideko client to call a resource method with required parameters. ```Python from import from os import getenv client = (api_key=getenv("API_KEY")) res = client.your_resource.method_name(required_param="value") ``` -------------------------------- ### Sideko Doc Deploy Command Source: https://github.com/sideko-inc/sideko/blob/main/docs/CLI.md Triggers the deployment of documentation websites to preview or production environments. It requires the documentation project name or ID and can be configured to deploy to production or wait for completion. ```bash sideko doc deploy [OPTIONS] --name ``` -------------------------------- ### Sideko CLI Welcome Banner Source: https://github.com/sideko-inc/sideko/blob/main/docs/CLI.md Displays the ASCII art welcome banner for the Sideko CLI, along with a tagline indicating its purpose of automating API ecosystems. ```text _ _ _ __ _(_) __| | ___ | | __ ___ / __|| | / _` | / _ \| |/ / / _ \ \__ \| || (_| || __/| < | (_) | |___/|_| \__,_| \___||_|\_\ \___/ your api ecosystem on autopilot ``` -------------------------------- ### Asynchronous Client Method Call Source: https://github.com/sideko-inc/sideko/blob/main/releases/determinism-plus-llms/assets/python/CLAUDE.md Demonstrates how to initialize and use the asynchronous Sideko client to call a resource method with required parameters. ```Python from import from os import getenv client = (api_key=getenv("API_KEY")) res = await client.your_resource.method_name(required_param="value") ``` -------------------------------- ### Test Resource Creation (Sync) Source: https://github.com/sideko-inc/sideko/blob/main/releases/determinism-plus-llms/assets/python/CLAUDE.md Tests the synchronous creation of a resource with all parameters, validating the response schema and status code. ```Python import io import pydantic import pytest import typing from import AsyncClient, Client from .environment import Environment from .types import models def test_create_201_success_all_params(): """Tests a POST request to the /project/{name} endpoint. Operation: create Test Case ID: success_all_params Expected Status: 201 Mode: Synchronous execution Empty response expected Validates: - Authentication requirements are satisfied - All required input parameters are properly handled - Response status code is correct - Response data matches expected schema This test uses example data to verify the endpoint behavior. """ # tests calling sync method with example data client = Client(api_key="API_KEY", environment=Environment.MOCK_SERVER) response = client.your_resource.your_new_method(required_param="example string", optional_param="example string") try: pydantic.TypeAdapter(models.NewMethodResponse).validate_python(response) is_valid_response_schema = True except pydantic.ValidationError: is_valid_response_schema = False assert is_valid_response_schema, "failed response type check" ``` -------------------------------- ### Sideko Doc List Command Source: https://github.com/sideko-inc/sideko/blob/main/docs/CLI.md Lists all available documentation websites managed by Sideko. It allows specifying the display format for the results, such as raw or pretty. ```bash sideko doc list [OPTIONS] ``` -------------------------------- ### Test Resource Creation (Async) Source: https://github.com/sideko-inc/sideko/blob/main/releases/determinism-plus-llms/assets/python/CLAUDE.md Tests the asynchronous creation of a resource with all parameters, validating the response schema and status code. ```Python import io import pydantic import pytest import typing from import AsyncClient, Client from .environment import Environment from .types import models @pytest.mark.asyncio async def test_await_create_201_success_all_params(): """Tests a POST request to the /project/{name} endpoint. Operation: create Test Case ID: success_all_params Expected Status: 201 Mode: Asynchronous execution Empty response expected Validates: - Authentication requirements are satisfied - All required input parameters are properly handled - Response status code is correct - Response data matches expected schema This test uses example data to verify the endpoint behavior. """ # tests calling async method with example data client = AsyncClient(api_key="API_KEY", environment=Environment.MOCK_SERVER) response = await client.your_resource.your_new_method(required_param="example string", optional_param="example string") try: pydantic.TypeAdapter(models.NewMethodResponse).validate_python(response) is_valid_response_schema = True except pydantic.ValidationError: is_valid_response_schema = False assert is_valid_response_schema, "failed response type check" ``` -------------------------------- ### Run Project Tests with Poetry Source: https://github.com/sideko-inc/sideko/blob/main/releases/determinism-plus-llms/assets/python/CLAUDE.md Executes the project's testing suite using Poetry. This command ensures that all tests pass, verifying the functionality of the SDK. ```bash poetry run pytest ``` -------------------------------- ### Sideko Login Command Source: https://github.com/sideko-inc/sideko/blob/main/docs/CLI.md Details the usage of the `sideko login` command, which authenticates the CLI interactively via a browser or by manually providing an API key. It also specifies options for outputting the API key. ```bash sideko login [OPTIONS] Options: --key manually provide your api key to the cli, this will take priority over browser login --output path to file to store api key, default: $HOME/.sideko ``` -------------------------------- ### Sideko SDK Config Sync Command Source: https://github.com/sideko-inc/sideko/blob/main/docs/CLI.md Synchronizes an SDK configuration file with a specified API version. It supports syncing with local OpenAPI specifications and allows for custom output paths for the configuration file. ```bash sideko sdk config sync [OPTIONS] --config ``` -------------------------------- ### Download API Version Specification Source: https://github.com/sideko-inc/sideko/blob/main/docs/CLI.md Downloads the OpenAPI specification for a given API version. Requires the API name and optionally accepts a version and output path. The output path can specify the file format. ```bash sideko api version download --name --version --output ``` -------------------------------- ### Open Source Network Request Libraries Source: https://github.com/sideko-inc/sideko/blob/main/releases/determinism-plus-llms/README.md Highlights the open-source network request libraries provided by Sideko for different programming languages, emphasizing their role as the core dependency in generated SDKs. ```javascript https://github.com/Sideko-Inc/make-request-js ``` ```python https://github.com/Sideko-Inc/make-request-py ``` -------------------------------- ### Generate SDK Configuration Source: https://github.com/sideko-inc/sideko/blob/main/docs/CLI.md Generates the default SDK configuration file for a specified API. Requires the API name as an argument. ```bash sideko sdk config init --api-name ``` -------------------------------- ### Python Test Case for New Functionality Source: https://github.com/sideko-inc/sideko/blob/main/releases/determinism-plus-llms/assets/python/CLAUDE.md Outlines the requirement to create tests for new functionality within the `tests/` directory. Tests should be stateless and verify contract conditions. ```python import pytest # Example test structure def test_new_feature(): assert True @pytest.mark.asyncio async def test_new_feature_async(): assert True ``` -------------------------------- ### Test exampleMethod with required parameters only Source: https://github.com/sideko-inc/sideko/blob/main/releases/determinism-plus-llms/assets/typescript/CLAUDE.md This test case checks the functionality of exampleMethod when only the mandatory 'id' parameter is supplied. It ensures the client can be initialized and the method called successfully, expecting a defined response. ```TypeScript import Client, { Environment } from ""; describe("tests client.exampleResource.exampleMethod", () => { test.concurrent( "Desciption actions | testId: success_required_only | Desciption of test", async () => { const client = new Client({ apiKey: "API_KEY", environment: Environment.MockServer, }); const response = await client.exampleResource.exampleMethod({ id: "abc" }); expect(response).toBeDefined(); } ) }); ``` -------------------------------- ### Python Typed Dict and Model Initialization Source: https://github.com/sideko-inc/sideko/blob/main/releases/determinism-plus-llms/assets/python/CLAUDE.md Details the process of adding newly created typed dictionaries and Pydantic models to their respective `__init__.py` files in Python, including both the import section and the `__all__` list. ```python # In types/params/__init__.py from .my_example_param import MyExampleParam __all__ = [ "MyExampleParam", ] # In types/models/__init__.py from .my_example_model import MyExampleModel __all__ = [ "MyExampleModel", ] ``` -------------------------------- ### Sideko API Version List Command Source: https://github.com/sideko-inc/sideko/blob/main/docs/CLI.md Details the `sideko api version list` command for retrieving a list of API versions. It requires the API name and allows filtering by limit and controlling the display format. ```bash sideko api version list [OPTIONS] --name Options: --name api name or id e.g. my-api --limit limit results to most recent N versions --display display result as a raw json or prettified Default value: `pretty` Possible values: `raw`, `pretty` ``` -------------------------------- ### Python Type Hinting for Primitives Source: https://github.com/sideko-inc/sideko/blob/main/releases/determinism-plus-llms/assets/python/CLAUDE.md Demonstrates the use of standard Python types for primitive data types in type hints. This ensures clarity and type safety in function signatures. ```python bool, int, float, str ``` -------------------------------- ### Add New Dependency with Poetry Source: https://github.com/sideko-inc/sideko/blob/main/releases/determinism-plus-llms/assets/python/CLAUDE.md Adds a new dependency to the project using Poetry. This command updates the project's dependencies and configuration. ```bash poetry add (dependency_name) ``` -------------------------------- ### Sideko SDK Released Command Source: https://github.com/sideko-inc/sideko/blob/main/docs/CLI.md Marks an SDK as released. This command can identify the SDK by its repository path or a specific ID, ensuring proper release tracking. ```bash sideko sdk released [OPTIONS] ``` -------------------------------- ### Python Type Hinting for Binary Data Input Source: https://github.com/sideko-inc/sideko/blob/main/releases/determinism-plus-llms/assets/python/CLAUDE.md Specifies the use of `httpx._types.FileTypes` for handling binary data as input parameters in Python functions, often used for file uploads. ```python from httpx import _types param_name: _types.FileTypes ``` -------------------------------- ### Sideko SDK Update Command Source: https://github.com/sideko-inc/sideko/blob/main/docs/CLI.md Updates an SDK to implement changes from APIs. This command requires the path to the SDK configuration and the root of the SDK repository. It supports automatic version bumping and updating with specific API versions. ```bash sideko sdk update [OPTIONS] --config --repo ``` -------------------------------- ### Run Specific Test File with Poetry Source: https://github.com/sideko-inc/sideko/blob/main/releases/determinism-plus-llms/assets/python/CLAUDE.md Executes tests for a particular test file using Poetry and pytest, with verbose output enabled. This is useful for focused testing. ```bash poetry run pytest tests/test_specific_file.py -v ``` -------------------------------- ### Python Type Hinting for Object Responses Source: https://github.com/sideko-inc/sideko/blob/main/releases/determinism-plus-llms/assets/python/CLAUDE.md Explains how to create Pydantic models for object responses and use them as type hints in Python. This ensures structured and validated response data. ```python from pydantic import BaseModel import models class MyExampleModel(BaseModel): field1: str field2: int def get_data() -> models.MyExampleModel: # ... implementation ... ``` -------------------------------- ### Python Type Hinting for Unions Source: https://github.com/sideko-inc/sideko/blob/main/releases/determinism-plus-llms/assets/python/CLAUDE.md Demonstrates how to use `typing.Union` for type hinting when a variable can accept multiple types in Python. This allows for flexibility in function parameters or return values. ```python from typing import Union Union[Type1, Type2, ...] ``` -------------------------------- ### Python Mock Server Environment Usage Source: https://github.com/sideko-inc/sideko/blob/main/releases/determinism-plus-llms/assets/python/CLAUDE.md Specifies the use of the `Environment.MOCK_SERVER` enum in Python tests to ensure tests run against a stateless mock server, promoting reliable and isolated testing. ```python from some_module import Environment # ... in test setup ... client = Client(environment=Environment.MOCK_SERVER) ``` -------------------------------- ### Python Type Hinting for Binary Data Response Source: https://github.com/sideko-inc/sideko/blob/main/releases/determinism-plus-llms/assets/python/CLAUDE.md Indicates the use of `BinaryResponse` for handling binary data as function return types in Python, typically for file downloads or raw data. ```python from core import BinaryResponse def download_file() -> BinaryResponse: # ... implementation ... ``` -------------------------------- ### Sideko Config Autocomplete Command Source: https://github.com/sideko-inc/sideko/blob/main/docs/CLI.md Generates shell completion scripts for the Sideko CLI. It supports various shells like bash, fish, zsh, and PowerShell, writing the completion output to stdout. ```bash sideko config autocomplete --shell ``` -------------------------------- ### Sideko API Version Update Command Source: https://github.com/sideko-inc/sideko/blob/main/docs/CLI.md Describes the `sideko api version update` command, used for updating an existing API version. It requires the API name and supports various options for specifying the update details. ```bash sideko api version update [OPTIONS] --name ``` -------------------------------- ### Type Check Project Modules with Poetry Source: https://github.com/sideko-inc/sideko/blob/main/releases/determinism-plus-llms/assets/python/CLAUDE.md Runs the type checker (mypy) on a specified module within the project using Poetry. This helps catch type-related errors. ```bash poetry run mypy / ``` -------------------------------- ### Lint OpenAPI Specification Source: https://github.com/sideko-inc/sideko/blob/main/docs/CLI.md Lints a local OpenAPI file to check for errors. Accepts the spec file path, API name, and version. Options include showing only errors, saving results to CSV, and controlling the display format. ```bash sideko api lint --spec --name --version --errors --save --display ``` -------------------------------- ### Python Type Hinting for Self-Referencing Objects Source: https://github.com/sideko-inc/sideko/blob/main/releases/determinism-plus-llms/assets/python/CLAUDE.md Explains how to use quoted type names for self-referencing objects in Python type hints, typically used within class definitions. ```python "MyClass" ``` -------------------------------- ### Python Type Hinting for String Enums Source: https://github.com/sideko-inc/sideko/blob/main/releases/determinism-plus-llms/assets/python/CLAUDE.md Shows how to use `typing_extensions.Literal` for defining string enumerations in Python type hints. This restricts values to a specific set of strings. ```python from typing_extensions import Literal Literal["option1", "option2"] ``` -------------------------------- ### Python Type Hinting for Arrays Source: https://github.com/sideko-inc/sideko/blob/main/releases/determinism-plus-llms/assets/python/CLAUDE.md Illustrates the use of `typing.List` for type hinting arrays (lists) in Python. It specifies the type of elements within the list. ```python from typing import List List[T] ``` -------------------------------- ### Sideko Logout Command Source: https://github.com/sideko-inc/sideko/blob/main/docs/CLI.md Logs out of Sideko by removing the API key from the operating system's native key service. This ensures secure management of credentials. ```bash sideko logout ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.