Metadata-Version: 2.4
Name: codecraftai-storage-database
Version: 1.2.2
Summary: Code Craft AI - Storage Database
License-Expression: LicenseRef-CodeCraftAI-Source-Available
License-File: LICENSE.md
Keywords: python
Author: Myron Walker
Author-email: myron.walker@gmail.com
Requires-Python: >=3.10,<4.0
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: POSIX
Requires-Dist: codecraftai-credentials (>=1.0.0,<2.0.0)
Requires-Dist: codecraftai-dataprofiles (>=1.0.0,<2.0.0)
Requires-Dist: codecraftai-foundations (>=1.0.0,<2.0.0)
Requires-Dist: codecraftai-runtime (>=1.0.0,<2.0.0)
Requires-Dist: psycopg2-binary (>=2.0.10,<3.0.0)
Requires-Dist: sqlalchemy (>=2.0.43,<3.0.0)
Requires-Dist: sqlalchemy-utils (>=0.43.0,<0.44.0)
Project-URL: Issues, https://github.com/code-craft-ai-company/codecraftai-storage-database/issues
Project-URL: Repository, https://github.com/code-craft-ai-company/codecraftai-storage-database
Description-Content-Type: text/x-rst

==================================
Code Craft AI Storage Database
==================================

The ``codecraftai-storage-database`` package contains the common and shared types and code that provide a standardized way for an application or service to initialize connections, sessions, and to work with databases across the ccai suite.

Highlights
==========

- Shared database-connection initialization primitives.
- Session management and lifecycle helpers.
- Base types that downstream packages reuse when exposing persistence.
- Factors out common patterns so individual applications do not reinvent connection plumbing.

Repository Structure
====================

- ``development/`` - Runtime environment scripts.
- ``repository-setup/`` - Repository homing and setup scripts.
- ``source/packages/`` - Package source code.
- ``source/testroots/ccai/`` - TestBase test roots.
- ``userguide/`` - Standards, conventions, and documentation.

Environment Setup
=================

When working in a Codex container:

.. code-block:: bash

   ./development/setup-agent-container

For local development:

.. code-block:: bash

   ./repository-setup/rehome-repository
   ./development/setup-envrionment

Running Tests
=============

Activate the virtual environment:

.. code-block:: bash

   source .venv/bin/activate

Run the single-host test suite:

.. code-block:: bash

   testbase testing run --root source/testroots/ccai --includes=ccai.tests.singlehost.storage --output=./.output

Standards and Conventions
=========================

- Naming conventions: ``userguide/10-02-naming-conventions.rst``
- Code organization: ``userguide/10-01-code-organization.rst``
- Coding standards: ``userguide/10-00-coding-standards.rst``

Additional Resources
====================

- User guide entry point: ``userguide/userguide.rst``

