Skip to main content

Collect MQ messages and save them into database.

Project description

mq2db

Dump data from a message queue into a database.

Note: mq2db currently uses ZeroMQ sockets as its message-queue backend.

mq2db connects to one or more configured MQ endpoints, parses each received message with a loader, and writes the resulting rows into SQLAlchemy-supported databases.

Installation

After the package is published to PyPI:

python -m pip install mq2db

For development from this repository:

python -m pip install -e '.[test]'

Usage

mq2db path/to/config.yaml

If the mq2db configuration is nested under a larger YAML file, pass the section:

mq2db path/to/config.yaml --section mq2db.specific.setting

Configuration

Example configuration is here: example.yaml. More examples can also be found in the tests directory.

The top-level mq2db configuration contains a targets mapping. Each target defines:

  • ZeroMQ socket settings, such as type, method, address, topic, and receive method.
  • A loader class, such as mq2db.DictLoader, mq2db.JSONLoader, mq2db.TextLoader, mq2db.CSVLoader, or a custom importable class.
  • Database settings, including SQLAlchemy URL, table columns, keys, indices, automatic timestamp/raw columns, and write interval.

Development

python -m pip install -e '.[dev]'
pytest
python -m build
twine check dist/*

Release

Releases use semantic version tags prefixed with v, such as v1.0.0. Pushing a matching tag publishes the package to PyPI through GitHub Actions:

git tag v1.0.0
git push origin v1.0.0

License

mq2db is distributed under the MIT License. See 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

mq2db-1.0.0.tar.gz (11.5 kB view details)

Uploaded Source

Built Distribution

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

mq2db-1.0.0-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file mq2db-1.0.0.tar.gz.

File metadata

  • Download URL: mq2db-1.0.0.tar.gz
  • Upload date:
  • Size: 11.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for mq2db-1.0.0.tar.gz
Algorithm Hash digest
SHA256 a89daf0038ed0e640899d747d6a773dab0d35a0821768a3c2c6d20ad32432d81
MD5 b10618bb79323ffd04d9b18175fef877
BLAKE2b-256 ebb8f7f35f775125c950d2af4ec1b6c89247dfe9543f3a111d85923ad8ae1254

See more details on using hashes here.

Provenance

The following attestation bundles were made for mq2db-1.0.0.tar.gz:

Publisher: release.yml on taishi-hashimoto/mq2db

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mq2db-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: mq2db-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 7.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for mq2db-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 56ca5fa584f3eab08ccfaf7a926831d8df8b78080db4c72f12f265e9de406d03
MD5 56d16dc342799ed72f927a88919f5f12
BLAKE2b-256 ab2db849d4c90d6cbf4b2f7b7edb72fa87054977ecb95706ebe888457ea200e7

See more details on using hashes here.

Provenance

The following attestation bundles were made for mq2db-1.0.0-py3-none-any.whl:

Publisher: release.yml on taishi-hashimoto/mq2db

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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