Skip to main content

sailfork

The Python SDK for Sailfork, git hosting built for AI coding agents: repositories, pull requests, code review, issues, CI and sandboxes from one typed client. Full reference at sailfork.com/docs/sdk.

Python 3.11+, httpx and pydantic v2, sync and async.

uv add sailfork   # or pip install sailfork
from sailfork import Sailfork

sf = Sailfork()  # SAILFORK_TOKEN, SAILFORK_HOST, or `sailfork auth token`
for request in sf.held.mine().pending:
    print(request.summary)

repo = sf.repo("acme/api")
pr = repo.pulls.create(title="Charges round to the cent", branch="fix/charges", base="main")
merge = pr.merge()
if merge.status == "held":
    print(f"waiting for a person: {merge.url}")

Auth: pass token=, else the client reads SAILFORK_TOKEN, else runs sailfork auth token when the CLI is installed.

A write that needs a person's approval (a merge a branch rule holds, say) returns Held(held, url, message); anything else returns Done(value). Hand url to the user and call again once they have approved.

Every operation in the catalog is a method: sf.<area>.<verb>(...), or on a handle the call is bound to (sf.repo(...), sf.org(...), repo.pull(n)). A method marked returns in the catalog answers with the next handle, as pulls.create does. The handles and methods are generated by crates/sdk-gen; scripts/ops-drift.sh --write refreshes them.

Tool definitions for a model's tool-use loop, and a dispatcher bound to a client built from the environment:

from sailfork.tools import ANTHROPIC_TOOLS, OPENAI_TOOLS, run

result = run(tool_call.name, tool_call.input)

AsyncSailfork mirrors Sailfork. Errors are typed per code family and str(err) prints the code, message, hint, request id and doc URL on one line.

Metadata

Release files for sailfork 0.3.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sailfork 0.3.3
File Size Uploaded Provenance Actions
sailfork-0.3.3.tar.gz 142.6 kB Without provenance Details for sailfork-0.3.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for sailfork 0.3.3
File Interpreter ABI Platform Actions
sailfork-0.3.3-py3-none-any.whl Python 3 none any Details for sailfork-0.3.3-py3-none-any.whl

Total release size: 263.9 kB

Release files / sailfork-0.3.3.tar.gz

Download URL sailfork-0.3.3.tar.gz
Size 142.6 kB
Tags Source
SHA-256 checksum
How to use checksums
97606baeaf1d3b01e443de7c450bdbd65d652e432d1ef51117dd6323ab0fc53a
BLAKE2b-256 checksum
How to use checksums
2215d5a650db107c247ca09b62dcffa3b9cbdce2a0fd9962e2b91462666446ae
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.17 {"installer":{"name":"uv","version":"0.12.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / sailfork-0.3.3-py3-none-any.whl

Download URL sailfork-0.3.3-py3-none-any.whl
Size 121.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3fd0b4f19a9f72cbbece8358bbeec7468674a7b99a981c5f9cf41a04029e789b
BLAKE2b-256 checksum
How to use checksums
afa4c898da265ebaa3a99e27d1d1c92101bedfc7af46fe85ca976bf5ebf53f39
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.17 {"installer":{"name":"uv","version":"0.12.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for sailfork 0.3.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page