Skip to main content

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 interface
  • TicketRef - Reference to a created/updated ticket
  • TicketStatus - Status information for a ticket
  • GenericBackend - HTTP-based implementation for REST APIs

Contributing

When adding new platform integrations:

  1. Implement the PMBackend protocol
  2. Add platform-specific optional dependencies
  3. Include comprehensive error handling
  4. Add type hints for all public methods
  5. Write tests for the implementation

License

Apache License 2.0

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

softreck_shared-0.1.2.tar.gz (7.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

softreck_shared-0.1.2-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

File details

Details for the file softreck_shared-0.1.2.tar.gz.

File metadata

  • Download URL: softreck_shared-0.1.2.tar.gz
  • Upload date:
  • Size: 7.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for softreck_shared-0.1.2.tar.gz
Algorithm Hash digest
SHA256 42041f9cfcdaf26ca96b070d3523e912097e685a025585c4ec11e0423e014bb6
MD5 016e0f265c097dc71df83e6f5799564d
BLAKE2b-256 dc34f83743dd8900cd23ccad74404682c9a4dcb528ce040d26a5b06b1b50d05f

See more details on using hashes here.

File details

Details for the file softreck_shared-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for softreck_shared-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f9e899f4b5c4e31391ff37fb685a1bc02c93e59f8212628037f5fb993dbefe37
MD5 2ab41d28ced648b9d32585d17f216dc5
BLAKE2b-256 14e3bfd9b80d8ec03e42ed7891aa7f302c8e550e9138faf981b348fa2e2805da

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page