83faa993b28284054504305997339acab9e62e31
Issues #3 and #4. Remove: - CATEGORY_NAMES dict (170 Kindred-specific category codes) - sanitize_filename(), parse_part_number(), get_category_folder_name() - import re (only used by removed sanitize_filename) These are consumer-side concerns (filesystem path construction) that don't belong in a generic HTTP client. Categories should be fetched dynamically from the server via the schema API. Add schema methods: - list_schemas() — GET /api/schemas - get_schema_form(name) — GET /api/schemas/{name}/form - add_enum_value(schema, segment, code, label) — POST enum value - update_enum_value(schema, segment, code, **fields) — PUT enum value - delete_enum_value(schema, segment, code) — DELETE enum value Bump version 0.1.0 -> 0.2.0.
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
Languages
Python
100%