### Initialize Development Environment Source: https://github.com/launchdarkly/python-server-sdk/blob/main/CONTRIBUTING.md Install project dependencies and activate the virtual environment using uv. ```bash uv sync source .venv/bin/activate ``` -------------------------------- ### Install Optional Dependencies Source: https://github.com/launchdarkly/python-server-sdk/blob/main/CONTRIBUTING.md Install specific extra dependencies or all available extras for the SDK. ```bash uv sync --extra redis --extra consul --extra dynamodb --extra test-filesource uv sync --all-extras ``` -------------------------------- ### Build Documentation Source: https://github.com/launchdarkly/python-server-sdk/blob/main/CONTRIBUTING.md Generate local documentation files to preview changes. ```bash make docs ``` -------------------------------- ### Build and view docs Source: https://github.com/launchdarkly/python-server-sdk/blob/main/docs/README.md Commands to build and view the generated documentation locally. ```bash make html view docs/build/html/index.html ``` -------------------------------- ### Verify SDK Package Provenance Source: https://github.com/launchdarkly/python-server-sdk/blob/main/PROVENANCE.md Download the specific SDK wheel from PyPI and verify its provenance against the LaunchDarkly GitHub repository. ```bash # Download package from PyPI $ pip download --only-binary=:all: launchdarkly-server-sdk==${SDK_VERSION} # Verify provenance using the GitHub CLI $ gh attestation verify launchdarkly_server_sdk-${SDK_VERSION}-py3-none-any.whl --owner launchdarkly ``` -------------------------------- ### Expected Verification Output Source: https://github.com/launchdarkly/python-server-sdk/blob/main/PROVENANCE.md Sample output showing a successful verification of the artifact attestation. ```text Loaded digest sha256:... for file://launchdarkly_server_sdk-9.15.0-py3-none-any.whl Loaded 1 attestation from GitHub API The following policy criteria will be enforced: - Predicate type must match:................ https://slsa.dev/provenance/v1 - Source Repository Owner URI must match:... https://github.com/launchdarkly - Subject Alternative Name must match regex: (?i)^https://github.com/launchdarkly/ - OIDC Issuer must match:................... https://token.actions.githubusercontent.com ✓ Verification succeeded! The following 1 attestation matched the policy criteria - Attestation #1 - Build repo:..... launchdarkly/python-server-sdk - Build workflow:. .github/workflows/release-please.yml - Signer repo:.... launchdarkly/python-server-sdk - Signer workflow: .github/workflows/release-please.yml ``` -------------------------------- ### Run Linter Source: https://github.com/launchdarkly/python-server-sdk/blob/main/CONTRIBUTING.md Execute mypy to verify type hints and identify potential code issues. ```bash make lint ``` -------------------------------- ### Execute Unit Tests Source: https://github.com/launchdarkly/python-server-sdk/blob/main/CONTRIBUTING.md Run unit tests, either excluding or including database integrations. ```bash make test ``` ```bash make test-all ``` -------------------------------- ### Set SDK Version Source: https://github.com/launchdarkly/python-server-sdk/blob/main/PROVENANCE.md Define the SDK version variable to be used in subsequent verification commands. ```bash # Set the version of the SDK to verify SDK_VERSION=9.16.0 ``` -------------------------------- ### Define private attribute type hints Source: https://github.com/launchdarkly/python-server-sdk/blob/main/CONTRIBUTING.md Use this comment-based syntax for type hinting private attributes to maintain compatibility with older Python versions supported by the SDK. ```python self._some_attribute = None # type: Optional[int] ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.