Skip to main content

An asynchronous, event-driven Python framework using NATS messaging system

Project description

Hooklet v3

codecov

Hooklet is an event-driven framework that enables building distributed systems using message broker architecture. The v3 version centralize different data transmission models (pub/sub, req/reply) with respect to different underlying implementations. (e.g. NATS, ZeroMQ, native Python asyncio)

Architecture

Core Components

  1. Pilot

    • Abstract message broker layer
    • Predefined/Customized header support
    • Topic based data routing
  2. Node

    • High level data transmission model base on Pilot

Testing

Hooklet includes both unit tests and integration tests. Integration tests require a NATS server with JetStream support.

Running Tests

# Run all tests (unit + integration, auto-starts NATS with Docker)
./scripts/test.sh all

# Run only unit tests
./scripts/test.sh unittest

# Run only integration tests (auto-starts NATS with Docker)
./scripts/test.sh integration

# Clean test caches
./scripts/test.sh clean

Integration Test Requirements

Integration tests need a NATS server running on localhost:4222 with JetStream enabled. The test script will automatically:

  1. Check if NATS is already running
  2. If not, start NATS using docker-compose up -d nats
  3. Run the integration tests
  4. Clean up the Docker container if it was started by the script

Manual NATS Setup

If you prefer to manage NATS manually:

# Option 2: Using Docker directly
docker run -d --name nats-server -p 4222:4222 -p 8222:8222 nats:latest -js

CI/CD

Integration tests run automatically in GitHub Actions with a hosted NATS instance for every push and pull request to the main branch.

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

hooklet-0.5.5.tar.gz (24.3 kB view details)

Uploaded Source

Built Distribution

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

hooklet-0.5.5-py3-none-any.whl (21.7 kB view details)

Uploaded Python 3

File details

Details for the file hooklet-0.5.5.tar.gz.

File metadata

  • Download URL: hooklet-0.5.5.tar.gz
  • Upload date:
  • Size: 24.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.11

File hashes

Hashes for hooklet-0.5.5.tar.gz
Algorithm Hash digest
SHA256 62147f68707a491f4d57e82a270eebf40b36599b5698ebde139f8fd5bfe2b783
MD5 7cbfb9329e5cb8bf63e5584eb70913d7
BLAKE2b-256 e473c7c6ffe25220e16941e84c26ba6b3e2cb4cb56f83369df3d95663ad22bec

See more details on using hashes here.

File details

Details for the file hooklet-0.5.5-py3-none-any.whl.

File metadata

  • Download URL: hooklet-0.5.5-py3-none-any.whl
  • Upload date:
  • Size: 21.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.11

File hashes

Hashes for hooklet-0.5.5-py3-none-any.whl
Algorithm Hash digest
SHA256 c3086d7ba1e88dddae1a492f48ff452dec19891fbb861fcb68b00d3c5c5de63c
MD5 e5b396cb0da69e1c6cb46bd815c07117
BLAKE2b-256 2b03f6b22e8b25ecacb9178ad84224e174b12599e10d6237d37f89a44a8203ac

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