Python library for interacting with the Bild External API.
This repo is currently intended to be used directly from source (not from PyPI yet).
git clone https://github.com/AJFrio/Bild-Python.git
cd Bild-Python
python3 -m venv .venv
source .venv/bin/activate
pip install requestsexport BILD_API_KEY="YOUR_JWT_TOKEN"Or pass token directly in code.
from bild import BildClient
client = BildClient() # uses BILD_API_KEY from env
# or: client = BildClient(token="YOUR_JWT_TOKEN")
projects = client.api.projects.list()
print(projects)from bild import BildClient
client = BildClient()
users = client.api.users.list()
projects = client.api.projects.list()
print("Users:", users)
print("Projects:", projects)client.api.users.add(
emails=["person@example.com"],
role="Member",
projects=[{"id": "project-id", "projectAccess": "Editor"}]
)files = client.api.files.list("project-id")
print(files)result = client.api.files.universal_format(
project_id="project-id",
branch_id=None, # auto-resolves main/default branch
file_id="file-id",
file_version=None, # auto-resolves latest file version
output_format="stl"
)
print(result)links = client.api.shared_links.list("project-id")
print(links)
new_link = client.api.shared_links.create("project-id", {
"name": "Review Link",
"fileIds": ["file-id"]
})
print(new_link)search_result = client.api.search.query({"query": "bolt"})
print(search_result)client.api.usersclient.api.projectsclient.api.project_usersclient.api.branches_commitsclient.api.filesclient.api.file_uploadclient.api.file_checkin_checkoutclient.api.shared_linksclient.api.files_move_deleteclient.api.files_metadataclient.api.feedback_itemsclient.api.packagesclient.api.revisionsclient.api.approvalsclient.api.bomsclient.api.search
client = BildClient(
token="YOUR_JWT_TOKEN",
base_url="https://api.portle.io/api"
)raw = client.get("projects")
print(raw)