Squash-merge lib-standardisation: adopt repo standards across packaging, tooling, docs, and CI. - standardize pyproject.toml (canonical packaging, lint config, extras, GSDFC pydoclint) - add py.typed marker, modernize type hints and Google-style docstrings - nest generated docs under docs/lib and docs/mcp; add hand-written wiki - adopt standard Type A PyPI CI pipeline (tag==version guard + quality gate) - promote generated CHANGELOG.md; bump version to 0.0.7
44 lines
3.1 KiB
JSON
44 lines
3.1 KiB
JSON
{
|
|
"module": "openapi_first.templates.model_app.data",
|
|
"content": {
|
|
"path": "openapi_first.templates.model_app.data",
|
|
"docstring": "In-memory data store using Pydantic models.\n\nThis module is NOT thread-safe and is intended for demos and scaffolds only.\nThis module provides a minimal, process-local data store for the\nmodel-based CRUD example application. It stores and returns domain\nobjects defined using Pydantic models and is intended solely for\ndemonstration and scaffolding purposes.\n\nThe implementation intentionally avoids:\n- persistence\n- concurrency guarantees\n- transactional semantics\n- validation beyond what Pydantic provides\n\nIt is not part of the ``openapi_first`` library API surface.",
|
|
"objects": {
|
|
"list_items": {
|
|
"name": "list_items",
|
|
"kind": "function",
|
|
"path": "openapi_first.templates.model_app.data.list_items",
|
|
"signature": "list_items() -> list[Item]",
|
|
"docstring": "Return all items in the data store.\n\nReturns\n-------\nlist[Item]\n A list of item domain objects."
|
|
},
|
|
"get_item": {
|
|
"name": "get_item",
|
|
"kind": "function",
|
|
"path": "openapi_first.templates.model_app.data.get_item",
|
|
"signature": "get_item(item_id: int) -> Item",
|
|
"docstring": "Retrieve a single item by ID.\n\nParameters\n----------\nitem_id : int\n Identifier of the item to retrieve.\n\nReturns\n-------\nItem\n The requested item.\n\nRaises\n------\nKeyError\n If the item does not exist."
|
|
},
|
|
"create_item": {
|
|
"name": "create_item",
|
|
"kind": "function",
|
|
"path": "openapi_first.templates.model_app.data.create_item",
|
|
"signature": "create_item(payload: ItemCreate) -> Item",
|
|
"docstring": "Create a new item in the data store.\n\nA new identifier is assigned automatically. No additional validation\nis performed beyond Pydantic model validation.\n\nParameters\n----------\npayload : ItemCreate\n Data required to create a new item.\n\nReturns\n-------\nItem\n The newly created item."
|
|
},
|
|
"update_item": {
|
|
"name": "update_item",
|
|
"kind": "function",
|
|
"path": "openapi_first.templates.model_app.data.update_item",
|
|
"signature": "update_item(item_id: int, payload: ItemCreate) -> Item",
|
|
"docstring": "Replace an existing item in the data store.\n\nThis function performs a full replacement of the stored item.\nPartial updates are not supported.\n\nParameters\n----------\nitem_id : int\n Identifier of the item to update.\npayload : ItemCreate\n New item data.\n\nReturns\n-------\nItem\n The updated item.\n\nRaises\n------\nKeyError\n If the item does not exist."
|
|
},
|
|
"delete_item": {
|
|
"name": "delete_item",
|
|
"kind": "function",
|
|
"path": "openapi_first.templates.model_app.data.delete_item",
|
|
"signature": "delete_item(item_id: int) -> None",
|
|
"docstring": "Remove an item from the data store.\n\nParameters\n----------\nitem_id : int\n Identifier of the item to delete.\n\nRaises\n------\nKeyError\n If the item does not exist."
|
|
}
|
|
}
|
|
}
|
|
} |