Skip to main content

Core library for worker services

Project description

Worker Core Library

Core library for worker services in the Mesh-Sync platform.

Overview

This is a Python library that provides shared functionality for worker services, including:

  • BullMQ integration
  • Storage providers (S3, Google Drive, SFTP)
  • Authentication and credentials management
  • Database utilities
  • Common utility functions

Installation

From Source

pip install -e .

From GitHub Container Registry (GHCR)

The Docker image is automatically built and published to GHCR:

docker pull ghcr.io/mesh-sync/worker-core-lib:latest

Development

Building Locally

Build the Python package:

pip install build
python -m build

Build the Docker image:

docker build -t worker-core-lib:local .

Running Tests

pip install -e .
pytest

CI/CD Pipeline

This repository uses GitHub Actions for continuous integration and deployment:

Workflow: Build, Test, and Deploy to GHCR

Location: .github/workflows/docker-publish.yml

Triggers:

  • Push to master or main branches
  • Pull requests to master or main branches
  • Release published

Jobs:

  1. Build and Test:
    • Sets up Python 3.10 (matching Dockerfile)
    • Installs dependencies
    • Runs pytest (if tests exist)
    • Builds Python package
    • Builds Docker image
    • Pushes to GHCR (only on push/release, not PRs)

Container Registry: Images are published to GitHub Container Registry (GHCR) at ghcr.io/mesh-sync/worker-core-lib

Tags:

  • latest - Latest build from default branch
  • <branch> - Branch-specific builds
  • <branch>-<sha> - Build with commit SHA
  • v<version> - Semantic version tags (on releases)

Accessing Container Images

Images are publicly available from GHCR:

# Pull latest
docker pull ghcr.io/mesh-sync/worker-core-lib:latest

# Pull specific version
docker pull ghcr.io/mesh-sync/worker-core-lib:v0.0.1

# Pull specific branch
docker pull ghcr.io/mesh-sync/worker-core-lib:master

Usage

See the example in main.py for a complete demonstration of using the core libraries.

License

MIT License

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

worker_core_lib-0.0.1.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

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

worker_core_lib-0.0.1-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

Details for the file worker_core_lib-0.0.1.tar.gz.

File metadata

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

File hashes

Hashes for worker_core_lib-0.0.1.tar.gz
Algorithm Hash digest
SHA256 06fa1f44877955d80411482ed53b63922612a0a5e92fcb0eb57330afc533def3
MD5 369c5e8c0afe7a0838662e68873353fc
BLAKE2b-256 df273bc1484d9aeb5a26bac78b6d646bfe14092b8f9de0b750c848a355fbae05

See more details on using hashes here.

File details

Details for the file worker_core_lib-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for worker_core_lib-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 30c7f23e8b13c74489211de1dbb3e7758c04227626b287c5770abb1dfe9ffff5
MD5 216d75299719f49c427ffc855ba62687
BLAKE2b-256 4776d6d83295877a2853431684c48009bd156f338ebf3a482b958364af69a2c7

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