From Newsgroup: comp.lang.python.announce
pethost 0.4.7 is on PyPI.
pethost is the Python SDK for Pethost (
https://pethost.dev/), a hosting
service that runs Docker Compose projects at one flat monthly price. The
SDK has the 16 calls of Pethost's API, the same ones an AI agent gets
through Pethost's MCP server, and its streams:
- read the machine and its projects: services, domains, problems
- deploy: create a project, change its files, deploy a GitHub commit,
go back to an earlier deploy
- create Postgres, MariaDB or Valkey databases and link them to an app
- query container logs and HTTP requests, or follow them as they happen
- run a command in a service, read files, move files
- typed throughout, a synchronous client and an asyncio one, all
generated from the API's own definition
Install: pip install pethost (or: uv add pethost)
Requires: Python 3.10+, an API token made in the Pethost panel
License: MIT
from pethost import Pethost
with Pethost() as pethost: # the token: PETHOST_TOKEN
answer = pethost.get_machine()
print(answer.machine.hostname)
for project in answer.projects:
print(project.project_id)
Home:
https://pethost.dev/
Docs:
https://pethost.dev/docs/api/
Code:
https://github.com/pethost-dev/sdk
PyPI:
https://pypi.org/project/pethost/
The SDK is free and open source; Pethost itself is a paid service.
Stephan Gomer <
stephan@pethost.dev>
--- Synchronet 3.22a-Linux NewsLink 1.2