forbes 285bd1fa11
All checks were successful
Update Downstream Submodules / update-dependents (kindred/silo-calc, silo-client) (push) Successful in 5s
Update Downstream Submodules / update-dependents (kindred/silo-mod, silo-client) (push) Successful in 6s
Merge pull request 'feat: add .kc metadata and dependency resolution API methods' (#19) from feat/kc-metadata-api into main
Reviewed-on: #19
2026-02-19 01:43:15 +00:00

silo-client

Shared Python HTTP client for the Silo REST API.

Usage

Consumers subclass SiloSettings to bridge the client to their configuration storage, then instantiate SiloClient:

from silo_client import SiloClient, SiloSettings

class MySettings(SiloSettings):
    def get_api_url(self):
        return "http://localhost:8080/api"
    def get_api_token(self):
        return os.environ.get("SILO_API_TOKEN", "")
    def get_ssl_verify(self):
        return True
    def get_ssl_cert_path(self):
        return ""
    def save_auth(self, username, role="", source="", token=""):
        ...  # persist credentials
    def clear_auth(self):
        ...  # remove credentials

client = SiloClient(MySettings())
items = client.list_items(search="M3 screw")

Dependencies

None beyond the Python standard library (urllib, ssl, json).

License

MIT

Description
No description provided
Readme MIT 164 KiB
Languages
Python 100%