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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a89daf0038ed0e640899d747d6a773dab0d35a0821768a3c2c6d20ad32432d81
|
|
| MD5 |
b10618bb79323ffd04d9b18175fef877
|
|
| BLAKE2b-256 |
ebb8f7f35f775125c950d2af4ec1b6c89247dfe9543f3a111d85923ad8ae1254
|
Provenance
The following attestation bundles were made for mq2db-1.0.0.tar.gz:
Publisher:
release.yml on taishi-hashimoto/mq2db
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mq2db-1.0.0.tar.gz -
Subject digest:
a89daf0038ed0e640899d747d6a773dab0d35a0821768a3c2c6d20ad32432d81 - Sigstore transparency entry: 1470558921
- Sigstore integration time:
-
Permalink:
taishi-hashimoto/mq2db@3fb435ab96418d2ddf48f87638b29e3f30ceb0cb -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/taishi-hashimoto
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@3fb435ab96418d2ddf48f87638b29e3f30ceb0cb -
Trigger Event:
push
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
56ca5fa584f3eab08ccfaf7a926831d8df8b78080db4c72f12f265e9de406d03
|
|
| MD5 |
56d16dc342799ed72f927a88919f5f12
|
|
| BLAKE2b-256 |
ab2db849d4c90d6cbf4b2f7b7edb72fa87054977ecb95706ebe888457ea200e7
|
Provenance
The following attestation bundles were made for mq2db-1.0.0-py3-none-any.whl:
Publisher:
release.yml on taishi-hashimoto/mq2db
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mq2db-1.0.0-py3-none-any.whl -
Subject digest:
56ca5fa584f3eab08ccfaf7a926831d8df8b78080db4c72f12f265e9de406d03 - Sigstore transparency entry: 1470559076
- Sigstore integration time:
-
Permalink:
taishi-hashimoto/mq2db@3fb435ab96418d2ddf48f87638b29e3f30ceb0cb -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/taishi-hashimoto
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@3fb435ab96418d2ddf48f87638b29e3f30ceb0cb -
Trigger Event:
push
-
Statement type: