Shared components for Softreck ecosystem
Project description
Softreck Shared Integrations
Common integration components for the Softreck ecosystem.
Overview
This package provides shared interfaces and implementations for:
- Ticket management systems (Jira, GitHub, GitLab)
- Project management backends
- Issue tracking platforms
Installation
pip install softreck-shared
Usage
Base Interfaces
from softreck_shared.integrations import PMBackend, TicketRef, TicketStatus
# Implement a custom backend
class MyBackend(PMBackend):
def create_ticket(self, title: str, body: str, **kwargs) -> TicketRef:
# Implementation
pass
def update_ticket(self, ticket_id: str, **kwargs) -> None:
# Implementation
pass
Generic Backend
from softreck_shared.integrations import GenericBackend
# Use with any REST API
backend = GenericBackend(
base_url="https://api.example.com",
api_key="your-api-key"
)
# Create a ticket
ticket = backend.create_ticket(
title="Bug fix",
body="Fix the login issue",
labels=["bug", "urgent"],
priority="high"
)
Platform-Specific Backends
Install with optional dependencies:
# For Jira
pip install softreck-shared[jira]
# For GitHub
pip install softreck-shared[github]
# For GitLab
pip install softreck-shared[gitlab]
# Or all at once
pip install softreck-shared[all]
from softreck_shared.integrations import JiraBackend, GitHubBackend, GitLabBackend
# Jira
jira = JiraBackend(
server="https://company.atlassian.net",
username="user@example.com",
api_key="your-api-key"
)
# GitHub
github = GitHubBackend(
token="github-token",
repo="owner/repo"
)
# GitLab
gitlab = GitLabBackend(
url="https://gitlab.com",
token="gitlab-token"
)
Architecture
The shared integrations follow a protocol-based design:
PMBackend- Protocol defining the interfaceTicketRef- Reference to a created/updated ticketTicketStatus- Status information for a ticketGenericBackend- HTTP-based implementation for REST APIs
Contributing
When adding new platform integrations:
- Implement the
PMBackendprotocol - Add platform-specific optional dependencies
- Include comprehensive error handling
- Add type hints for all public methods
- Write tests for the implementation
License
Apache License 2.0
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
softreck_shared-0.1.2.tar.gz
(7.4 kB
view details)
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