Python SDK for the Driftstone API.
Project description
Driftstone - Python
Python SDK for the Driftstone repository API.
Install
pip install driftstone
Quick Start
from driftstone import Driftstone
client = Driftstone(api_key="your-api-key")
repo = client.repos.create(
"hello-world",
initial_files={"README.md": "# Example Repo\n"},
)
branch = client.repos.create_branch(
"hello-world",
"feature/readme",
from_ref=repo.default_branch,
)
client.repos.write_file(
"hello-world",
"README.md",
branch=branch.name,
message="Update README",
content="# Example Repo\nUpdated content.\n",
)
client.repos.merge(
"hello-world",
head=branch.name,
base=repo.default_branch,
message="Merge README update",
)
Using A Context Manager
from driftstone import Driftstone
with Driftstone(api_key="your-api-key") as client:
repo = client.repos.get("hello-world")
readme = client.repos.read_file(
repo.name,
"README.md",
branch=repo.default_branch,
)
print(readme.content)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
driftstone-0.3.0.tar.gz
(7.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file driftstone-0.3.0.tar.gz.
File metadata
- Download URL: driftstone-0.3.0.tar.gz
- Upload date:
- Size: 7.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2e6299100398eff8d45722e4358d957abc968c07f98bf72a07adce390e185f7f
|
|
| MD5 |
897813bff192c6855edb8ad5526a56af
|
|
| BLAKE2b-256 |
ffc851950e96c39b6e22ba662f6b5979d58e33071558680c9f80fbf0e1361830
|
File details
Details for the file driftstone-0.3.0-py3-none-any.whl.
File metadata
- Download URL: driftstone-0.3.0-py3-none-any.whl
- Upload date:
- Size: 9.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ac61fce027935c8f32fc6a0e32a5b61257a89127fa8556b4930f7570521bf7ac
|
|
| MD5 |
10fe95fafaba40a8a972ea6a06865744
|
|
| BLAKE2b-256 |
ab0aab42cd6788d8d98c2ffee607949c40fd8327cba62e897c1c71795bf2d12c
|