journald-send 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- journald_send-0.1.0/.crushignore +1 -0
- journald_send-0.1.0/.github/workflows/ci.yaml +149 -0
- journald_send-0.1.0/.gitignore +77 -0
- journald_send-0.1.0/.readthedocs.yaml +30 -0
- journald_send-0.1.0/CHANGELOG.md +13 -0
- journald_send-0.1.0/Cargo.lock +194 -0
- journald_send-0.1.0/Cargo.toml +16 -0
- journald_send-0.1.0/LICENSE +13 -0
- journald_send-0.1.0/PKG-INFO +114 -0
- journald_send-0.1.0/README.md +97 -0
- journald_send-0.1.0/docs/api.rst +62 -0
- journald_send-0.1.0/docs/conf.py +27 -0
- journald_send-0.1.0/docs/index.rst +11 -0
- journald_send-0.1.0/examples/basic.py +9 -0
- journald_send-0.1.0/examples/custom_fields.py +13 -0
- journald_send-0.1.0/examples/structured_logging.py +16 -0
- journald_send-0.1.0/justfile +13 -0
- journald_send-0.1.0/pyproject.toml +88 -0
- journald_send-0.1.0/src/journald_send/__init__.py +80 -0
- journald_send-0.1.0/src/journald_send/py.typed +0 -0
- journald_send-0.1.0/src/lib.rs +282 -0
- journald_send-0.1.0/tests/test_journald_send.py +244 -0
- journald_send-0.1.0/uv.lock +829 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!*.md
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
# This file is autogenerated by maturin v1.12.6
|
|
2
|
+
# To update, run
|
|
3
|
+
#
|
|
4
|
+
# maturin generate-ci github
|
|
5
|
+
#
|
|
6
|
+
name: continuous-integration
|
|
7
|
+
|
|
8
|
+
on:
|
|
9
|
+
push:
|
|
10
|
+
branches:
|
|
11
|
+
- main
|
|
12
|
+
- master
|
|
13
|
+
tags:
|
|
14
|
+
- '*'
|
|
15
|
+
pull_request:
|
|
16
|
+
workflow_dispatch:
|
|
17
|
+
|
|
18
|
+
permissions:
|
|
19
|
+
contents: read
|
|
20
|
+
|
|
21
|
+
jobs:
|
|
22
|
+
linux:
|
|
23
|
+
runs-on: ${{ matrix.platform.runner }}
|
|
24
|
+
strategy:
|
|
25
|
+
matrix:
|
|
26
|
+
platform:
|
|
27
|
+
- runner: ubuntu-latest
|
|
28
|
+
target: x86_64
|
|
29
|
+
- runner: ubuntu-latest
|
|
30
|
+
target: x86
|
|
31
|
+
- runner: ubuntu-latest
|
|
32
|
+
target: aarch64
|
|
33
|
+
- runner: ubuntu-latest
|
|
34
|
+
target: armv7
|
|
35
|
+
- runner: ubuntu-latest
|
|
36
|
+
target: s390x
|
|
37
|
+
- runner: ubuntu-latest
|
|
38
|
+
target: ppc64le
|
|
39
|
+
python-version:
|
|
40
|
+
- "3.12"
|
|
41
|
+
- "3.13"
|
|
42
|
+
- "3.14"
|
|
43
|
+
- "3.14t"
|
|
44
|
+
steps:
|
|
45
|
+
- uses: actions/checkout@v6
|
|
46
|
+
- uses: actions/setup-python@v6
|
|
47
|
+
with:
|
|
48
|
+
python-version: ${{ matrix.python-version }}
|
|
49
|
+
- name: Build wheels
|
|
50
|
+
uses: PyO3/maturin-action@v1
|
|
51
|
+
with:
|
|
52
|
+
target: ${{ matrix.platform.target }}
|
|
53
|
+
args: --release --out dist -i python${{ matrix.python-version }}
|
|
54
|
+
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
|
|
55
|
+
manylinux: auto
|
|
56
|
+
- name: Upload wheels
|
|
57
|
+
uses: actions/upload-artifact@v6
|
|
58
|
+
with:
|
|
59
|
+
name: wheels-linux-${{ matrix.platform.target }}-${{ matrix.python-version }}
|
|
60
|
+
path: dist
|
|
61
|
+
|
|
62
|
+
musllinux:
|
|
63
|
+
runs-on: ${{ matrix.platform.runner }}
|
|
64
|
+
strategy:
|
|
65
|
+
matrix:
|
|
66
|
+
platform:
|
|
67
|
+
- runner: ubuntu-latest
|
|
68
|
+
target: x86_64
|
|
69
|
+
- runner: ubuntu-latest
|
|
70
|
+
target: x86
|
|
71
|
+
- runner: ubuntu-latest
|
|
72
|
+
target: aarch64
|
|
73
|
+
- runner: ubuntu-latest
|
|
74
|
+
target: armv7
|
|
75
|
+
python-version:
|
|
76
|
+
- "3.12"
|
|
77
|
+
- "3.13"
|
|
78
|
+
- "3.14"
|
|
79
|
+
- "3.14t"
|
|
80
|
+
steps:
|
|
81
|
+
- uses: actions/checkout@v6
|
|
82
|
+
- uses: actions/setup-python@v6
|
|
83
|
+
with:
|
|
84
|
+
python-version: ${{ matrix.python-version }}
|
|
85
|
+
- name: Build wheels
|
|
86
|
+
uses: PyO3/maturin-action@v1
|
|
87
|
+
with:
|
|
88
|
+
target: ${{ matrix.platform.target }}
|
|
89
|
+
args: --release --out dist -i python${{ matrix.python-version }}
|
|
90
|
+
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
|
|
91
|
+
manylinux: musllinux_1_2
|
|
92
|
+
- name: Upload wheels
|
|
93
|
+
uses: actions/upload-artifact@v6
|
|
94
|
+
with:
|
|
95
|
+
name: wheels-musllinux-${{ matrix.platform.target }}-${{ matrix.python-version }}
|
|
96
|
+
path: dist
|
|
97
|
+
|
|
98
|
+
sdist:
|
|
99
|
+
runs-on: ubuntu-latest
|
|
100
|
+
steps:
|
|
101
|
+
- uses: actions/checkout@v6
|
|
102
|
+
- name: Build sdist
|
|
103
|
+
uses: PyO3/maturin-action@v1
|
|
104
|
+
with:
|
|
105
|
+
command: sdist
|
|
106
|
+
args: --out dist
|
|
107
|
+
- name: Upload sdist
|
|
108
|
+
uses: actions/upload-artifact@v6
|
|
109
|
+
with:
|
|
110
|
+
name: wheels-sdist
|
|
111
|
+
path: dist
|
|
112
|
+
|
|
113
|
+
docs:
|
|
114
|
+
runs-on: ubuntu-latest
|
|
115
|
+
steps:
|
|
116
|
+
- uses: actions/checkout@v6
|
|
117
|
+
- uses: actions/setup-python@v6
|
|
118
|
+
with:
|
|
119
|
+
python-version: "3.14"
|
|
120
|
+
- name: Install uv
|
|
121
|
+
uses: astral-sh/setup-uv@v7
|
|
122
|
+
- name: Install docs dependencies
|
|
123
|
+
run: uv sync --group docs
|
|
124
|
+
- name: Build and install package
|
|
125
|
+
run: uv run maturin develop
|
|
126
|
+
- name: Build documentation
|
|
127
|
+
run: .venv/bin/sphinx-build -b html docs docs/_build
|
|
128
|
+
|
|
129
|
+
release:
|
|
130
|
+
name: Release
|
|
131
|
+
runs-on: ubuntu-latest
|
|
132
|
+
if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
|
|
133
|
+
needs: [linux, musllinux, sdist]
|
|
134
|
+
# Follow recommendation
|
|
135
|
+
environment: pypi
|
|
136
|
+
permissions:
|
|
137
|
+
# Use to sign the release artifacts
|
|
138
|
+
id-token: write
|
|
139
|
+
# Used to upload release artifacts
|
|
140
|
+
contents: write
|
|
141
|
+
steps:
|
|
142
|
+
- uses: actions/download-artifact@v7
|
|
143
|
+
with:
|
|
144
|
+
pattern: wheels-*
|
|
145
|
+
path: dist
|
|
146
|
+
merge-multiple: true
|
|
147
|
+
- name: Publish to PyPI
|
|
148
|
+
if: ${{ startsWith(github.ref, 'refs/tags/') }}
|
|
149
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/target
|
|
2
|
+
|
|
3
|
+
# Byte-compiled / optimized / DLL files
|
|
4
|
+
__pycache__/
|
|
5
|
+
.pytest_cache/
|
|
6
|
+
*.py[cod]
|
|
7
|
+
|
|
8
|
+
# C extensions
|
|
9
|
+
*.so
|
|
10
|
+
|
|
11
|
+
# Distribution / packaging
|
|
12
|
+
.Python
|
|
13
|
+
.venv/
|
|
14
|
+
env/
|
|
15
|
+
bin/
|
|
16
|
+
build/
|
|
17
|
+
develop-eggs/
|
|
18
|
+
dist/
|
|
19
|
+
eggs/
|
|
20
|
+
lib/
|
|
21
|
+
lib64/
|
|
22
|
+
parts/
|
|
23
|
+
sdist/
|
|
24
|
+
var/
|
|
25
|
+
include/
|
|
26
|
+
man/
|
|
27
|
+
venv/
|
|
28
|
+
*.egg-info/
|
|
29
|
+
.installed.cfg
|
|
30
|
+
*.egg
|
|
31
|
+
|
|
32
|
+
# Installer logs
|
|
33
|
+
pip-log.txt
|
|
34
|
+
pip-delete-this-directory.txt
|
|
35
|
+
pip-selfcheck.json
|
|
36
|
+
|
|
37
|
+
# Unit test / coverage reports
|
|
38
|
+
htmlcov/
|
|
39
|
+
.tox/
|
|
40
|
+
.coverage
|
|
41
|
+
.cache
|
|
42
|
+
nosetests.xml
|
|
43
|
+
coverage.xml
|
|
44
|
+
|
|
45
|
+
# Translations
|
|
46
|
+
*.mo
|
|
47
|
+
|
|
48
|
+
# Mr Developer
|
|
49
|
+
.mr.developer.cfg
|
|
50
|
+
.project
|
|
51
|
+
.pydevproject
|
|
52
|
+
|
|
53
|
+
# Rope
|
|
54
|
+
.ropeproject
|
|
55
|
+
|
|
56
|
+
# Django stuff:
|
|
57
|
+
*.log
|
|
58
|
+
*.pot
|
|
59
|
+
|
|
60
|
+
.DS_Store
|
|
61
|
+
tmp
|
|
62
|
+
|
|
63
|
+
# Sphinx documentation
|
|
64
|
+
docs/_build/
|
|
65
|
+
|
|
66
|
+
# PyCharm
|
|
67
|
+
.idea/
|
|
68
|
+
|
|
69
|
+
# VSCode
|
|
70
|
+
.vscode/
|
|
71
|
+
.helix
|
|
72
|
+
|
|
73
|
+
# Pyenv
|
|
74
|
+
.python-version
|
|
75
|
+
|
|
76
|
+
*.local.md
|
|
77
|
+
.crush
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# .readthedocs.yaml
|
|
2
|
+
# Read the Docs configuration file
|
|
3
|
+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
|
|
4
|
+
|
|
5
|
+
# Required
|
|
6
|
+
version: 2
|
|
7
|
+
|
|
8
|
+
# Build documentation in the docs/ directory with Sphinx
|
|
9
|
+
sphinx:
|
|
10
|
+
configuration: docs/conf.py
|
|
11
|
+
|
|
12
|
+
# Optionally build your docs in additional formats such as PDF
|
|
13
|
+
formats:
|
|
14
|
+
- pdf
|
|
15
|
+
|
|
16
|
+
# Optionally set the version of Python and requirements required to build your docs
|
|
17
|
+
build:
|
|
18
|
+
os: ubuntu-24.04
|
|
19
|
+
tools:
|
|
20
|
+
python: "3.12"
|
|
21
|
+
rust: "latest"
|
|
22
|
+
jobs:
|
|
23
|
+
create_environment:
|
|
24
|
+
- asdf plugin add uv
|
|
25
|
+
- asdf install uv latest
|
|
26
|
+
- asdf global uv latest
|
|
27
|
+
- UV_PROJECT_ENVIRONMENT=$READTHEDOCS_VIRTUALENV_PATH uv sync --all-extras --group docs --group dev
|
|
28
|
+
- UV_PROJECT_ENVIRONMENT=$READTHEDOCS_VIRTUALENV_PATH uv run maturin develop
|
|
29
|
+
install:
|
|
30
|
+
- "true"
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
This file follows the "common changelog" format: https://common-changelog.org/#2-format
|
|
6
|
+
|
|
7
|
+
## [0.1.0] - 2026-04-12
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
- Initial release: Rust-based journald sender with Python bindings via PyO3.
|
|
11
|
+
- journald_send.send() function, Priority IntEnum, and module-level priority constants.
|
|
12
|
+
- Examples demonstrating Priority usage and custom fields.
|
|
13
|
+
- Instructions to build the native extension into the project's virtualenv via `maturin develop` and run tests with `pytest`.
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
# This file is automatically @generated by Cargo.
|
|
2
|
+
# It is not intended for manual editing.
|
|
3
|
+
version = 4
|
|
4
|
+
|
|
5
|
+
[[package]]
|
|
6
|
+
name = "bitflags"
|
|
7
|
+
version = "2.11.0"
|
|
8
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
9
|
+
checksum = "843867be96c8daad0d758b57df9392b6d8d271134fce549de6ce169ff98a92af"
|
|
10
|
+
|
|
11
|
+
[[package]]
|
|
12
|
+
name = "errno"
|
|
13
|
+
version = "0.3.14"
|
|
14
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
15
|
+
checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb"
|
|
16
|
+
dependencies = [
|
|
17
|
+
"libc",
|
|
18
|
+
"windows-sys",
|
|
19
|
+
]
|
|
20
|
+
|
|
21
|
+
[[package]]
|
|
22
|
+
name = "heck"
|
|
23
|
+
version = "0.5.0"
|
|
24
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
25
|
+
checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
|
|
26
|
+
|
|
27
|
+
[[package]]
|
|
28
|
+
name = "journald-send"
|
|
29
|
+
version = "0.1.0"
|
|
30
|
+
dependencies = [
|
|
31
|
+
"memfd",
|
|
32
|
+
"pyo3",
|
|
33
|
+
"rustix",
|
|
34
|
+
]
|
|
35
|
+
|
|
36
|
+
[[package]]
|
|
37
|
+
name = "libc"
|
|
38
|
+
version = "0.2.184"
|
|
39
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
40
|
+
checksum = "48f5d2a454e16a5ea0f4ced81bd44e4cfc7bd3a507b61887c99fd3538b28e4af"
|
|
41
|
+
|
|
42
|
+
[[package]]
|
|
43
|
+
name = "linux-raw-sys"
|
|
44
|
+
version = "0.12.1"
|
|
45
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
46
|
+
checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53"
|
|
47
|
+
|
|
48
|
+
[[package]]
|
|
49
|
+
name = "memfd"
|
|
50
|
+
version = "0.6.5"
|
|
51
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
52
|
+
checksum = "ad38eb12aea514a0466ea40a80fd8cc83637065948eb4a426e4aa46261175227"
|
|
53
|
+
dependencies = [
|
|
54
|
+
"rustix",
|
|
55
|
+
]
|
|
56
|
+
|
|
57
|
+
[[package]]
|
|
58
|
+
name = "once_cell"
|
|
59
|
+
version = "1.21.4"
|
|
60
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
61
|
+
checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50"
|
|
62
|
+
|
|
63
|
+
[[package]]
|
|
64
|
+
name = "portable-atomic"
|
|
65
|
+
version = "1.13.1"
|
|
66
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
67
|
+
checksum = "c33a9471896f1c69cecef8d20cbe2f7accd12527ce60845ff44c153bb2a21b49"
|
|
68
|
+
|
|
69
|
+
[[package]]
|
|
70
|
+
name = "proc-macro2"
|
|
71
|
+
version = "1.0.106"
|
|
72
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
73
|
+
checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934"
|
|
74
|
+
dependencies = [
|
|
75
|
+
"unicode-ident",
|
|
76
|
+
]
|
|
77
|
+
|
|
78
|
+
[[package]]
|
|
79
|
+
name = "pyo3"
|
|
80
|
+
version = "0.28.3"
|
|
81
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
82
|
+
checksum = "91fd8e38a3b50ed1167fb981cd6fd60147e091784c427b8f7183a7ee32c31c12"
|
|
83
|
+
dependencies = [
|
|
84
|
+
"libc",
|
|
85
|
+
"once_cell",
|
|
86
|
+
"portable-atomic",
|
|
87
|
+
"pyo3-build-config",
|
|
88
|
+
"pyo3-ffi",
|
|
89
|
+
"pyo3-macros",
|
|
90
|
+
]
|
|
91
|
+
|
|
92
|
+
[[package]]
|
|
93
|
+
name = "pyo3-build-config"
|
|
94
|
+
version = "0.28.3"
|
|
95
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
96
|
+
checksum = "e368e7ddfdeb98c9bca7f8383be1648fd84ab466bf2bc015e94008db6d35611e"
|
|
97
|
+
dependencies = [
|
|
98
|
+
"target-lexicon",
|
|
99
|
+
]
|
|
100
|
+
|
|
101
|
+
[[package]]
|
|
102
|
+
name = "pyo3-ffi"
|
|
103
|
+
version = "0.28.3"
|
|
104
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
105
|
+
checksum = "7f29e10af80b1f7ccaf7f69eace800a03ecd13e883acfacc1e5d0988605f651e"
|
|
106
|
+
dependencies = [
|
|
107
|
+
"libc",
|
|
108
|
+
"pyo3-build-config",
|
|
109
|
+
]
|
|
110
|
+
|
|
111
|
+
[[package]]
|
|
112
|
+
name = "pyo3-macros"
|
|
113
|
+
version = "0.28.3"
|
|
114
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
115
|
+
checksum = "df6e520eff47c45997d2fc7dd8214b25dd1310918bbb2642156ef66a67f29813"
|
|
116
|
+
dependencies = [
|
|
117
|
+
"proc-macro2",
|
|
118
|
+
"pyo3-macros-backend",
|
|
119
|
+
"quote",
|
|
120
|
+
"syn",
|
|
121
|
+
]
|
|
122
|
+
|
|
123
|
+
[[package]]
|
|
124
|
+
name = "pyo3-macros-backend"
|
|
125
|
+
version = "0.28.3"
|
|
126
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
127
|
+
checksum = "c4cdc218d835738f81c2338f822078af45b4afdf8b2e33cbb5916f108b813acb"
|
|
128
|
+
dependencies = [
|
|
129
|
+
"heck",
|
|
130
|
+
"proc-macro2",
|
|
131
|
+
"pyo3-build-config",
|
|
132
|
+
"quote",
|
|
133
|
+
"syn",
|
|
134
|
+
]
|
|
135
|
+
|
|
136
|
+
[[package]]
|
|
137
|
+
name = "quote"
|
|
138
|
+
version = "1.0.45"
|
|
139
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
140
|
+
checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924"
|
|
141
|
+
dependencies = [
|
|
142
|
+
"proc-macro2",
|
|
143
|
+
]
|
|
144
|
+
|
|
145
|
+
[[package]]
|
|
146
|
+
name = "rustix"
|
|
147
|
+
version = "1.1.4"
|
|
148
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
149
|
+
checksum = "b6fe4565b9518b83ef4f91bb47ce29620ca828bd32cb7e408f0062e9930ba190"
|
|
150
|
+
dependencies = [
|
|
151
|
+
"bitflags",
|
|
152
|
+
"errno",
|
|
153
|
+
"libc",
|
|
154
|
+
"linux-raw-sys",
|
|
155
|
+
"windows-sys",
|
|
156
|
+
]
|
|
157
|
+
|
|
158
|
+
[[package]]
|
|
159
|
+
name = "syn"
|
|
160
|
+
version = "2.0.117"
|
|
161
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
162
|
+
checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99"
|
|
163
|
+
dependencies = [
|
|
164
|
+
"proc-macro2",
|
|
165
|
+
"quote",
|
|
166
|
+
"unicode-ident",
|
|
167
|
+
]
|
|
168
|
+
|
|
169
|
+
[[package]]
|
|
170
|
+
name = "target-lexicon"
|
|
171
|
+
version = "0.13.5"
|
|
172
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
173
|
+
checksum = "adb6935a6f5c20170eeceb1a3835a49e12e19d792f6dd344ccc76a985ca5a6ca"
|
|
174
|
+
|
|
175
|
+
[[package]]
|
|
176
|
+
name = "unicode-ident"
|
|
177
|
+
version = "1.0.24"
|
|
178
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
179
|
+
checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75"
|
|
180
|
+
|
|
181
|
+
[[package]]
|
|
182
|
+
name = "windows-link"
|
|
183
|
+
version = "0.2.1"
|
|
184
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
185
|
+
checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5"
|
|
186
|
+
|
|
187
|
+
[[package]]
|
|
188
|
+
name = "windows-sys"
|
|
189
|
+
version = "0.61.2"
|
|
190
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
191
|
+
checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc"
|
|
192
|
+
dependencies = [
|
|
193
|
+
"windows-link",
|
|
194
|
+
]
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
[package]
|
|
2
|
+
name = "journald-send"
|
|
3
|
+
version = "0.1.0"
|
|
4
|
+
edition = "2024"
|
|
5
|
+
license = "Apache-2.0"
|
|
6
|
+
readme = "README.md"
|
|
7
|
+
|
|
8
|
+
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
|
9
|
+
[lib]
|
|
10
|
+
name = "_core"
|
|
11
|
+
crate-type = ["cdylib"]
|
|
12
|
+
|
|
13
|
+
[dependencies]
|
|
14
|
+
pyo3 = "0.28.3"
|
|
15
|
+
rustix = { version = "1.1.4", default-features = false, features = ["net"] }
|
|
16
|
+
memfd = "0.6.5"
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
Copyright 2026 Nguyễn Hồng Quân
|
|
2
|
+
|
|
3
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
you may not use this file except in compliance with the License.
|
|
5
|
+
You may obtain a copy of the License at
|
|
6
|
+
|
|
7
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
|
|
9
|
+
Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
See the License for the specific language governing permissions and
|
|
13
|
+
limitations under the License.
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: journald-send
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Classifier: Programming Language :: Rust
|
|
5
|
+
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
6
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
7
|
+
Classifier: Typing :: Typed
|
|
8
|
+
License-File: LICENSE
|
|
9
|
+
Author-email: Nguyễn Hồng Quân <ng.hong.quan@gmail.com>
|
|
10
|
+
License-Expression: Apache-2.0
|
|
11
|
+
Requires-Python: >=3.12
|
|
12
|
+
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
|
|
13
|
+
Project-URL: Documentation, https://journald-send.readthedocs.io
|
|
14
|
+
Project-URL: Homepage, https://github.com/hongquan/journald-send
|
|
15
|
+
Project-URL: Repository, https://github.com/hongquan/journald-send
|
|
16
|
+
|
|
17
|
+
# 📜 journald-send
|
|
18
|
+
|
|
19
|
+
A lightweight Python library to send messages to [journald] (Linux system logging) using its native protocol.
|
|
20
|
+
|
|
21
|
+
## 💡 Features
|
|
22
|
+
|
|
23
|
+
- Simple function to log messages directly to [journald] using its native protocol.
|
|
24
|
+
- Best for structured logging.
|
|
25
|
+
- Pure-Rust (not depending on [libc], although PyO3 may include it when linking with CPython).
|
|
26
|
+
- Not depend on C-based `libsystemd` (``journald-send`` only writes to journald, does not read or interact with [systemd]).
|
|
27
|
+
|
|
28
|
+
## 🤔 Motivation
|
|
29
|
+
|
|
30
|
+
Previously, I use [systemd-python], but this library is slow to make release, and its support of Python 3.14, especially free-threaded mode, is unknown.
|
|
31
|
+
So I make `journald-send` to support Python 3.14 and free-threaded mode.
|
|
32
|
+
It is implemented with pure-Rust [rustix] and [memfd] crates, which provides elegant, Rust ergonomic API comparing to libc.
|
|
33
|
+
|
|
34
|
+
## 📦 Installation
|
|
35
|
+
|
|
36
|
+
Install via pip:
|
|
37
|
+
|
|
38
|
+
```
|
|
39
|
+
pip install journald-send
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Or using uv:
|
|
43
|
+
|
|
44
|
+
```
|
|
45
|
+
uv add journald-send
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## 🐍 Usage
|
|
49
|
+
|
|
50
|
+
Import and use the send function:
|
|
51
|
+
|
|
52
|
+
```python
|
|
53
|
+
import journald_send
|
|
54
|
+
journald_send.send("Hello, journald!")
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## 📁 Examples
|
|
58
|
+
|
|
59
|
+
See examples in the *examples* folder.
|
|
60
|
+
|
|
61
|
+
## 📖 Documentation
|
|
62
|
+
|
|
63
|
+
Full documentation is available at [Read the Docs](https://journald-send.readthedocs.io).
|
|
64
|
+
|
|
65
|
+
## 🤝 Contributing
|
|
66
|
+
|
|
67
|
+
Contributions welcome; open an issue or PR.
|
|
68
|
+
|
|
69
|
+
## 🔧 Development
|
|
70
|
+
|
|
71
|
+
### Prerequisites
|
|
72
|
+
|
|
73
|
+
- Python >= 3.12
|
|
74
|
+
- Rust toolchain
|
|
75
|
+
- [uv] package manager
|
|
76
|
+
|
|
77
|
+
### Setup
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
uv sync --all-groups
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
### Build
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
uv run maturin develop
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
### Run Tests
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
uv run pytest
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
### Build Documentation
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
just docs
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
## 🙏 Credits
|
|
102
|
+
|
|
103
|
+
This project learned from [tracing-journald] crate for how to talk with [journald] at low level.
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
[journald]: https://wiki.archlinux.org/title/Systemd/Journal
|
|
107
|
+
[systemd]: https://systemd.io/
|
|
108
|
+
[systemd-python]: https://pypi.org/project/systemd-python/
|
|
109
|
+
[uv]: https://github.com/astral-sh/uv
|
|
110
|
+
[libc]: https://docs.rs/libc
|
|
111
|
+
[rustix]: https://docs.rs/rustix
|
|
112
|
+
[memfd]: https://docs.rs/memfd
|
|
113
|
+
[tracing-journald]: https://docs.rs/tracing-journald
|
|
114
|
+
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# 📜 journald-send
|
|
2
|
+
|
|
3
|
+
A lightweight Python library to send messages to [journald] (Linux system logging) using its native protocol.
|
|
4
|
+
|
|
5
|
+
## 💡 Features
|
|
6
|
+
|
|
7
|
+
- Simple function to log messages directly to [journald] using its native protocol.
|
|
8
|
+
- Best for structured logging.
|
|
9
|
+
- Pure-Rust (not depending on [libc], although PyO3 may include it when linking with CPython).
|
|
10
|
+
- Not depend on C-based `libsystemd` (``journald-send`` only writes to journald, does not read or interact with [systemd]).
|
|
11
|
+
|
|
12
|
+
## 🤔 Motivation
|
|
13
|
+
|
|
14
|
+
Previously, I use [systemd-python], but this library is slow to make release, and its support of Python 3.14, especially free-threaded mode, is unknown.
|
|
15
|
+
So I make `journald-send` to support Python 3.14 and free-threaded mode.
|
|
16
|
+
It is implemented with pure-Rust [rustix] and [memfd] crates, which provides elegant, Rust ergonomic API comparing to libc.
|
|
17
|
+
|
|
18
|
+
## 📦 Installation
|
|
19
|
+
|
|
20
|
+
Install via pip:
|
|
21
|
+
|
|
22
|
+
```
|
|
23
|
+
pip install journald-send
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Or using uv:
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
uv add journald-send
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## 🐍 Usage
|
|
33
|
+
|
|
34
|
+
Import and use the send function:
|
|
35
|
+
|
|
36
|
+
```python
|
|
37
|
+
import journald_send
|
|
38
|
+
journald_send.send("Hello, journald!")
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## 📁 Examples
|
|
42
|
+
|
|
43
|
+
See examples in the *examples* folder.
|
|
44
|
+
|
|
45
|
+
## 📖 Documentation
|
|
46
|
+
|
|
47
|
+
Full documentation is available at [Read the Docs](https://journald-send.readthedocs.io).
|
|
48
|
+
|
|
49
|
+
## 🤝 Contributing
|
|
50
|
+
|
|
51
|
+
Contributions welcome; open an issue or PR.
|
|
52
|
+
|
|
53
|
+
## 🔧 Development
|
|
54
|
+
|
|
55
|
+
### Prerequisites
|
|
56
|
+
|
|
57
|
+
- Python >= 3.12
|
|
58
|
+
- Rust toolchain
|
|
59
|
+
- [uv] package manager
|
|
60
|
+
|
|
61
|
+
### Setup
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
uv sync --all-groups
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### Build
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
uv run maturin develop
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### Run Tests
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
uv run pytest
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### Build Documentation
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
just docs
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
## 🙏 Credits
|
|
86
|
+
|
|
87
|
+
This project learned from [tracing-journald] crate for how to talk with [journald] at low level.
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
[journald]: https://wiki.archlinux.org/title/Systemd/Journal
|
|
91
|
+
[systemd]: https://systemd.io/
|
|
92
|
+
[systemd-python]: https://pypi.org/project/systemd-python/
|
|
93
|
+
[uv]: https://github.com/astral-sh/uv
|
|
94
|
+
[libc]: https://docs.rs/libc
|
|
95
|
+
[rustix]: https://docs.rs/rustix
|
|
96
|
+
[memfd]: https://docs.rs/memfd
|
|
97
|
+
[tracing-journald]: https://docs.rs/tracing-journald
|