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.1.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.1-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: softreck_shared-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 641425cc14254f9ece987d02d2226c92617669c7789794f4f0408ee0c4592316
MD5 1ea734c2ae251052fe506cb56396afd6
BLAKE2b-256 b81f9de7d16ef805e093081d807326c54d411d9473c6a0530bc370df1b93453c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for softreck_shared-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 91fd6991462051aa72cb96f190c33b59d901c09f4fb49f5b3d583404436ac616
MD5 9db9573b40e0b1ceacde54ad9c1cea7b
BLAKE2b-256 ad713bfbd328c4e4b561f7fd22442322ff2c89a80f33e39459dd426fb9203e4c

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