It is a lightweight framework to organize and document the key elements of a distributed system, focusing on its use cases and service design. It structures the metadata without exposing any underlying technical or implementation-specific details.
Project description
bisslog-schema-py
bisslog-schema-py is a lightweight framework to organize and document the key elements of a distributed system, focusing on its use cases and service design.
It structures the metadata without exposing any underlying technical or implementation-specific details.
The goal is to design and document a distributed system from a service-centric perspective, emphasizing business use cases and their criticality, while remaining technology-agnostic.
🚀 Installation
You can install bisslog-pymongo using pip:
pip install bisslog_pymongo
Main Concepts
ServiceInfo
The ServiceInfo class models a service in the system.
Each service can define:
name: Name of the service.description: A short explanation of the service's responsibility.type: Logical category (e.g., "microservice", "library", etc.).service_type: Type of service (e.g., "functional", "technical").team: The responsible or owning team.tags: Arbitrary metadata tags for classification.use_cases: A list ofUseCaseInfoobjects representing the service's use cases.
Service metadata can be loaded dynamically from external YAML or JSON files.
UseCaseInfo
The UseCaseInfo class represents a use case belonging to a service, with the following fields:
keyname: Unique identifier for the use case.name: Human-readable name.description: A detailed description of what the use case does.actor: The entity (user, system, platform) that initiates the use case.type: Logical operation type (e.g., "create", "read", "update", "delete").criticality: Business importance of the use case, represented as aCriticalityEnum.tags: Metadata tags for further classification.triggers: List ofTriggerInfoentries defining how the use case is triggered.
TriggerInfo and TriggerOptions
Triggers define how a use case is initiated.
Available trigger types (enumerated by TriggerEnum) include:
HTTP: HTTP request initiation.WebSocket: WebSocket-based interaction.Consumer: Event-driven trigger (e.g., queues).Schedule: Time-based scheduled triggers.
Each trigger may have associated options (e.g., route, method, authenticator).
CriticalityEnum
CriticalityEnum provides a standardized set of criticality levels for use cases:
| Level | Value |
|---|---|
| NONE | 0 |
| VERY_LOW | 10 |
| LOW | 20 |
| MEDIUM | 50 |
| HIGH | 70 |
| VERY_HIGH | 90 |
| CRITICAL | 100 |
This scale helps prioritize use cases based on their business or operational impact.
Loading Service Metadata
You can load service definitions from YAML or JSON files using the read_service_metadata function.
It automatically searches for metadata files in predefined locations if a path is not provided.
Example:
from bisslog_schema.metadata import read_service_metadata
service_info = read_service_metadata()
print(service_info.name)
for use_case in service_info.use_cases:
print(f"{use_case.keyname}: {use_case.name}")
Example YAML for Service Definition
Here is an example of how to define a service and its use cases using YAML:
---
name: "webhook receiver"
type: "microservice"
description: "Receives events from external platforms and converts them into company events for internal processing"
service_type: "functional"
team: "code-infrastructure"
tags:
service: "webhook-receptor"
use_cases:
- keyname: "notifyEventFromWebhookDynamicPlatform"
name: "notify external event from external platform"
description: "Receives and transforms external events into internal company events"
actor: "external platform"
type: "transfer data"
criticality: "high"
triggers:
- type: "http"
options:
method: "post"
route: "/webhook-receptor/{platform}/{token}"
apigw: "webhook-receptor"
tags:
accessibility: "private"
# More use cases...
Note: The criticality field can use either named levels (e.g., "high") or direct numeric values (e.g., 90).
Why use bisslog-schema-py?
-
Technology-agnostic: Focus on service and use case modeling, independent of the underlying implementation.
-
Organized metadata: Centralizes your distributed system documentation.
-
Extensible: Easily expandable with new fields and trigger types.
-
Integration-friendly: Can be used for CI/CD validation or automated documentation generation.
Future Improvements
-
Validation of a metadata structure against a schema.
-
Additional trigger option models (authentication, caching, timeouts).
-
Support for linking external specifications (e.g., OpenAPI, AsyncAPI).
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file bisslog_schema-0.0.1.tar.gz.
File metadata
- Download URL: bisslog_schema-0.0.1.tar.gz
- Upload date:
- Size: 22.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
30cf8f77ede4ef5cba23621405e4904c0eb0539297e91c04a1de5111ebc209d8
|
|
| MD5 |
5a70f632f92d0bdd34434645b6222307
|
|
| BLAKE2b-256 |
65f6c6e1f82904f055e5e5203967980d0793136592af87c3421fdb2e4e8dfaa9
|
File details
Details for the file bisslog_schema-0.0.1-py3-none-any.whl.
File metadata
- Download URL: bisslog_schema-0.0.1-py3-none-any.whl
- Upload date:
- Size: 10.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dc548be8061f91947e3648d42a019ebfe96ef5f4538541e4dd00bca94c47111e
|
|
| MD5 |
359a3be33cd2feae0b596e6027c3b92b
|
|
| BLAKE2b-256 |
188de09ef4f19a56513101cb5c3b230bb9e5f110c678a4962a6c38395f042dc1
|