Skip to content

Commit 4cd72c7

Browse files
docs: split api_reference into per-module subdirectories and update examples
Restructure the API reference docs by breaking the monolithic adapters.md, helpers.md, models.md, and utils.md files into dedicated per-module subdirectories (adapters/, helpers/, models/), each with an index and individual pages per component. Update mkdocs config and example pages accordingly.
1 parent c1417b9 commit 4cd72c7

48 files changed

Lines changed: 1074 additions & 1506 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/api_reference/adapters.md

Lines changed: 0 additions & 483 deletions
This file was deleted.
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# Base SQLAlchemy
2+
3+
The `base/sqlalchemy` subpackage provides the foundational SQLAlchemy components shared across all relational database adapters, including the abstract port interface, session managers, and session manager registries.
4+
5+
## ports
6+
7+
Abstract port interface defining the contract all SQLAlchemy-based adapters must fulfil.
8+
9+
::: archipy.adapters.base.sqlalchemy.ports
10+
options:
11+
show_root_heading: true
12+
show_source: true
13+
14+
## session_manager_ports
15+
16+
Abstract interface for SQLAlchemy session managers, decoupling session lifecycle from adapter logic.
17+
18+
::: archipy.adapters.base.sqlalchemy.session_manager_ports
19+
options:
20+
show_root_heading: true
21+
show_source: true
22+
23+
## session_manager_registry
24+
25+
Registry for tracking and resolving active session manager instances.
26+
27+
::: archipy.adapters.base.sqlalchemy.session_manager_registry
28+
options:
29+
show_root_heading: true
30+
show_source: true
31+
32+
## session_managers
33+
34+
Concrete session manager implementations that handle SQLAlchemy session creation, scoping, and teardown.
35+
36+
::: archipy.adapters.base.sqlalchemy.session_managers
37+
options:
38+
show_root_heading: true
39+
show_source: true
40+
41+
## adapters
42+
43+
The base SQLAlchemy adapter implements generic CRUD operations that concrete database adapters (PostgreSQL, SQLite, StarRocks) inherit from.
44+
45+
::: archipy.adapters.base.sqlalchemy.adapters
46+
options:
47+
show_root_heading: true
48+
show_source: true
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Elasticsearch
2+
3+
The `elasticsearch` adapter provides integration with Elasticsearch for full-text search, document indexing, and analytics queries.
4+
5+
## ports
6+
7+
Abstract port interface defining the Elasticsearch adapter contract.
8+
9+
::: archipy.adapters.elasticsearch.ports
10+
options:
11+
show_root_heading: true
12+
show_source: true
13+
14+
## adapters
15+
16+
Concrete Elasticsearch adapter implementing index management, document CRUD, and search operations.
17+
18+
::: archipy.adapters.elasticsearch.adapters
19+
options:
20+
show_root_heading: true
21+
show_source: true
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Email
2+
3+
The `email` adapter provides integration with email services for sending transactional and notification emails.
4+
5+
## ports
6+
7+
Abstract port interface defining the email adapter contract.
8+
9+
::: archipy.adapters.email.ports
10+
options:
11+
show_root_heading: true
12+
show_source: true
13+
14+
## adapters
15+
16+
Concrete email adapter implementing SMTP-based email sending with ArchiPy conventions.
17+
18+
::: archipy.adapters.email.adapters
19+
options:
20+
show_root_heading: true
21+
show_source: true
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Adapters
2+
3+
The `adapters` module provides concrete implementations of external system integrations following the Ports & Adapters pattern. Each adapter directory exposes a `ports.py` (abstract interface) and an `adapters.py` (concrete implementation).
4+
5+
## Submodules
6+
7+
| Adapter | Description |
8+
|---|---|
9+
| [Base SQLAlchemy](base.md) | Shared SQLAlchemy session management and base CRUD adapter |
10+
| [Redis](redis.md) | Redis cache and key-value store adapter |
11+
| [PostgreSQL](postgres.md) | PostgreSQL database adapter via SQLAlchemy |
12+
| [SQLite](sqlite.md) | SQLite database adapter via SQLAlchemy |
13+
| [StarRocks](starrocks.md) | StarRocks analytical database adapter via SQLAlchemy |
14+
| [Kafka](kafka.md) | Apache Kafka message streaming adapter |
15+
| [Keycloak](keycloak.md) | Keycloak identity and access management adapter |
16+
| [MinIO](minio.md) | MinIO object storage adapter |
17+
| [ScyllaDB](scylladb.md) | ScyllaDB/Cassandra wide-column store adapter |
18+
| [Elasticsearch](elasticsearch.md) | Elasticsearch search engine adapter |
19+
| [Temporal](temporal.md) | Temporal workflow orchestration adapter |
20+
| [Email](email.md) | Email service adapter |
21+
| [Payment Gateways](payment_gateways.md) | Internet payment gateway adapters (Parsian Shaparak) |
22+
23+
## Source Code
24+
25+
📁 Location: `archipy/adapters/`
26+
27+
🔗 [Browse Source](https://github.com/SyntaxArc/ArchiPy/tree/master/archipy/adapters)
28+
29+
## API Stability
30+
31+
| Adapter | Status | Notes |
32+
|---|---|---|
33+
| Base SQLAlchemy | 🟢 Stable | Production-ready |
34+
| Redis | 🟢 Stable | Production-ready |
35+
| PostgreSQL | 🟢 Stable | Production-ready |
36+
| SQLite | 🟢 Stable | Production-ready |
37+
| StarRocks | 🟡 Beta | API may change |
38+
| Kafka | 🟢 Stable | Production-ready |
39+
| Keycloak | 🟢 Stable | Production-ready |
40+
| MinIO | 🟢 Stable | Production-ready |
41+
| ScyllaDB | 🟢 Stable | Production-ready |
42+
| Elasticsearch | 🟢 Stable | Production-ready |
43+
| Temporal | 🟢 Stable | Production-ready |
44+
| Email | 🟢 Stable | Production-ready |
45+
| Payment Gateways | 🟢 Stable | Production-ready |
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Kafka
2+
3+
The `kafka` adapter provides integration with Apache Kafka for producing and consuming messages in event-driven architectures.
4+
5+
## ports
6+
7+
Abstract port interface defining the Kafka adapter contract for message production and consumption.
8+
9+
::: archipy.adapters.kafka.ports
10+
options:
11+
show_root_heading: true
12+
show_source: true
13+
14+
## adapters
15+
16+
Concrete Kafka adapter implementing producer and consumer patterns with ArchiPy conventions.
17+
18+
::: archipy.adapters.kafka.adapters
19+
options:
20+
show_root_heading: true
21+
show_source: true
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Keycloak
2+
3+
The `keycloak` adapter provides integration with Keycloak for identity and access management, including token validation, user management, and role-based access control.
4+
5+
## ports
6+
7+
Abstract port interface defining the Keycloak adapter contract.
8+
9+
::: archipy.adapters.keycloak.ports
10+
options:
11+
show_root_heading: true
12+
show_source: true
13+
14+
## adapters
15+
16+
Concrete Keycloak adapter wrapping the Keycloak REST API for authentication and authorization operations.
17+
18+
::: archipy.adapters.keycloak.adapters
19+
options:
20+
show_root_heading: true
21+
show_source: true
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# MinIO
2+
3+
The `minio` adapter provides integration with MinIO (and S3-compatible object storage) for uploading, downloading, and managing binary objects.
4+
5+
## ports
6+
7+
Abstract port interface defining the MinIO adapter contract for object storage operations.
8+
9+
::: archipy.adapters.minio.ports
10+
options:
11+
show_root_heading: true
12+
show_source: true
13+
14+
## adapters
15+
16+
Concrete MinIO adapter wrapping the MinIO Python SDK with ArchiPy conventions for object storage operations.
17+
18+
::: archipy.adapters.minio.adapters
19+
options:
20+
show_root_heading: true
21+
show_source: true
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Payment Gateways
2+
3+
The `internet_payment_gateways` adapter provides integration with internet payment gateways. Currently supports Parsian Shaparak, an Iranian payment gateway.
4+
5+
## Parsian Shaparak
6+
7+
### adapters
8+
9+
Concrete Parsian Shaparak payment gateway adapter implementing payment initiation, verification, and reversal.
10+
11+
::: archipy.adapters.internet_payment_gateways.ir.parsian.adapters
12+
options:
13+
show_root_heading: true
14+
show_source: true
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# PostgreSQL
2+
3+
The `postgres/sqlalchemy` adapter provides a PostgreSQL-specific SQLAlchemy integration, including a concrete adapter, session manager, and session manager registry that extend the base SQLAlchemy components.
4+
5+
## session_managers
6+
7+
PostgreSQL-specific session manager handling connection pooling and lifecycle for PostgreSQL databases.
8+
9+
::: archipy.adapters.postgres.sqlalchemy.session_managers
10+
options:
11+
show_root_heading: true
12+
show_source: true
13+
14+
## session_manager_registry
15+
16+
Registry for PostgreSQL session manager instances.
17+
18+
::: archipy.adapters.postgres.sqlalchemy.session_manager_registry
19+
options:
20+
show_root_heading: true
21+
show_source: true
22+
23+
## adapters
24+
25+
Concrete PostgreSQL adapter built on top of the base SQLAlchemy adapter with PostgreSQL-specific configuration.
26+
27+
::: archipy.adapters.postgres.sqlalchemy.adapters
28+
options:
29+
show_root_heading: true
30+
show_source: true

0 commit comments

Comments
 (0)