This guide is aimed primarily at Pinecone employees working on maintaining and developing the python SDK.
git clone [email protected]:pinecone-io/pinecone-python-client.gitVisit the Poetry site for installation instructions.
Run this from the root of the project.
poetry install -E grpc -E asyncioThese extra groups for grpc and asyncio are optional but required to do development on those optional parts of the SDK.
Run poetry run pre-commit install to enable checks to run when you commit so you don't have to find out during your CI run that minor lint issues need to be addressed.
Some tests require environment variables to be set in order to run.
cp .env.example .envAfter copying the template, you will need to fill in your secrets. .env is in .gitignore, so there's no concern about accidentally committing your secrets.
There is a lot to say about testing the Python SDK. See the testing guide.
See the debugging guide
These instructions can only be followed by Pinecone employees with access to our private APIs repository.
Prerequisites:
- You must be an employee with access to private Pinecone repositories
- You must have Docker Desktop installed and running. Our code generation script uses a dockerized version of the OpenAPI CLI.
- You must have initialized the git submodules under
codegen/
First create a prerelease branch where all the work for the upcoming release will be integrated. For example, for 2025-04 API release I worked off of this branch:
git checkout main
git pull
git checkout release-candidate/2025-04
git push origin release-candidate/2025-04
The release-candidate branch is where we will integrate all changes for an upcoming release which may include work from many different PRs and commits. So we can push it directly with no changes.
Next, to regenerate the generated parts of the SDK using a new API spec, I make a second branch to hold my changes
git checkout jhamon/regen-2025-04Then you run the build script by passing the API version as an argument, like this:
./codegen/build-oas.sh 2025-07For grpc updates, it's a similar story:
./codegen/build-grpc.sh 2025-07Commit the generated files which should be mainly placed under pinecone/core. Commit the sha changes in the git submodule at codegen/apis.
Run the type check with poetry run mypy pinecone. This will usually surface breaking changes as a result of things being renamed or modified.
Push your branch (git push origin jhamon/regen-2025-04 in this example) and open a PR against the RC branch (in this example release-candidate/2025-04). This will allow the full PR test suite to kick off and help you discover what other changes you need to make.
See the release instructions